Public-Key Cryptography Explained
๐ 7 min read
Quick Answer
Public-key cryptography is the quiet invention behind almost everything secure online: HTTPS, encrypted messaging, digital signatures, and Bitcoin all rely on it. The core idea, a pair of mathematically linked keys where one is public and one is secret, is surprisingly intuitive once you see it, and understanding it demystifies how digital trust actually works.
๐ก A simple way to see it
Imagine a mailbox with two different keys. Anyone can use the public key to lock a letter inside (encrypt), but only you, with the private key, can open it (decrypt). Flip it around and you can "sign" something with your private key that everyone can verify with your public key. One pair, two superpowers.
The key pair
Public-key (or "asymmetric") cryptography gives you two linked keys: a public key you can share freely, and a private key you keep secret. What one key locks, only the other can unlock. Crucially, you cannot work out the private key from the public one, which is what makes the whole system safe to use in the open.
Encryption: locking a message
To send you a private message, anyone can encrypt it with your public key. From that moment, only your private key can decrypt it, not even the sender can read it back. This lets total strangers exchange secrets over an open network without ever sharing a password first, the problem that stumped cryptography for centuries.
Digital signatures: proving it is you
Run it in reverse and you get signatures. You "sign" data with your private key, and anyone can verify with your public key that it really came from you and was not altered. This is how software updates, documents and, crucially, Bitcoin transactions prove authenticity, no signature, no trust.
Where you already rely on it
Every HTTPS padlock, every end-to-end encrypted chat, and every Bitcoin transaction uses public-key cryptography. When you spend Bitcoin, you are signing a transaction with your private key to prove ownership, "not your keys, not your coins" is this exact idea. It is the invisible foundation of digital trust.
๐ Key takeaway
Public-key cryptography uses a pair of linked keys, a shareable public key and a secret private key, where what one locks only the other unlocks. It enables both private messages (encrypt with the public key) and digital signatures (sign with the private key, verify with the public). It is the foundation of HTTPS, encrypted messaging and Bitcoin ownership.
Why this matters for you
Every secure app and Bitcoin wallet used across Asia rests on public-key cryptography. Understanding it turns "keep your private key safe" from a slogan into something you genuinely grasp, which is the difference between confidently self-custodying Bitcoin and nervously trusting a custodian. It is core digital literacy for the region's fast-growing online population.
Frequently asked questions
What is the difference between a public and private key?โผ
A public key can be shared freely and is used to encrypt messages to you or to verify your signatures. A private key is kept secret and is used to decrypt those messages or to create signatures. You cannot derive the private key from the public one, which is what makes the system secure.
How does public-key cryptography secure Bitcoin?โผ
Your Bitcoin is controlled by a private key. To spend it, you sign the transaction with that key, and the network verifies the signature against your public key (address). This proves ownership without revealing the private key, which is why "not your keys, not your coins".
Is public-key cryptography the same as encryption?โผ
It is a type of cryptography that enables both encryption (locking messages with a public key) and digital signatures (proving authenticity with a private key). Regular "symmetric" encryption uses one shared key; public-key cryptography uses a linked pair, solving the problem of sharing secrets safely.
Keep learning
๐ Sources & further reading
Authoritative references and primary sources used in this guide.