Public-key crypto.
A padlock anyone can snap shut, but only you hold the key to open.
- But how do we swap the key?1
Old codes used one shared key — and two strangers can’t agree on it without someone overhearing.
- Take a padlock. Keep the key.2
A key pair fixes that: a public key you hand to everyone, a private key you never let go of.
- Sealed it with your padlock.3
Anyone can snap your public padlock shut on a message — no password agreed first.
- And only I can open it.4
Only your private key opens it. The secret lands safely, the eavesdropper gets nothing.
- My signature — verify away.5
Run it backwards: lock with your private key and anyone can check it with the public one.
- Signed, and untampered.6
Since only you hold the private key, a passing check proves the message is really from you.
Semicolony semicolony.dev/eli5/public-key-crypto/comic