In this lesson you will learn to:
- Explain the difference between a public and a private key.
- Describe why it is safe to share a public key.
- Explain why losing a private key is serious.
One secret, one shareable
For most of history, secret communication used a single shared key: the same secret locked and unlocked the message. The difficulty was getting that secret to the other person safely.
In 1976 Whitfield Diffie and Martin Hellman published a different idea, and in 1977 Ron Rivest, Adi Shamir and Leonard Adleman described the RSA system. In public-key cryptography, each person has a pair of mathematically linked keys:
- a private key, which is kept secret, and
- a public key, which can be shared with anyone.
A one-way street
The public key is calculated from the private key. Going in that direction is easy. Going backwards — working out the private key from the public key — is practically impossible with today's computers. That one-way relationship is what makes it safe to publish the public key.
A helpful picture is a letterbox. Anyone who knows the address (the public key) can recognise the box. Only the person with the key to the box (the private key) can open it. The comparison is not perfect, but it captures the asymmetry.
What the keys are used for
Public-key systems are used in two main ways:
- Encryption: anyone can lock a message with your public key; only your private key can unlock it.
- Signatures: you create a signature with your private key; anyone can check it with your public key. Lesson 2.3 is about this.
Blockchains rely mainly on signatures. Bitcoin and many others use elliptic-curve cryptography, which offers strong security with relatively short keys.
Keys on a blockchain
On a public blockchain, there are no usernames or passwords controlled by a company. The record says, in effect, "this value can be moved by whoever can produce a valid signature for this public key". Holding the private key is the permission.
That has two consequences worth repeating:
- If someone else obtains your private key, they gain the same control you have, and the network cannot tell the difference.
- If you lose your private key and every backup of it, nobody can reset it for you. There is no help desk at the protocol level.
Module 5 looks at how people manage this responsibility in practice.
A note on the future
Large, working quantum computers could one day weaken some of today's public-key systems. Standards bodies are already publishing new, quantum-resistant algorithms, and blockchain developers discuss how to migrate. It is an active research area rather than an immediate risk.
Key takeaways
- Public-key cryptography uses a linked pair: a private key kept secret and a public key shared freely.
- Deriving the public key is easy; reversing it is practically impossible.
- On a blockchain, holding the private key is the permission to sign.
- Lost or stolen keys cannot be reset by the network.
Check yourself
Why is it safe to share a public key?
Because working out the private key from the public key is practically impossible.
What does a private key let its holder do?
Create digital signatures (and decrypt messages encrypted to the matching public key).
What happens if a private key is lost with no backup?
Nobody can recover it; whatever it controlled can no longer be signed for.
Sources
This lesson is for general education about how the technology works. It is not a recommendation to acquire, sell or hold any crypto-asset and is not financial advice.