In the game, this was passing notes in classPlay “Secret Notes in Class”
| In the game | In real IT |
|---|---|
| You and your friend | Two people exchanging messages |
| Share set (padlock and stamp sample) | Public key |
| Own set (key and stamp) | Private key |
| Lock with a padlock / open with the key | Encrypt / decrypt |
| Stamp / check against the sample | Sign / verify a signature |
| Kids in between | Eavesdropper |
The public key is a padlock, the private key is the key
A public key is like a “padlock” you can hand to anyone. It can lock, but it can’t unlock. The private key is the one “key” that opens that padlock, and only its owner holds it. The two are a pair: whatever one locks, only the other can open.
To send a secret: “the other person’s public key”
If A sends B a secret, A locks it with B’s public key (padlock) and sends it. Even if someone peeks on the way, only B, who holds the private key, can open it.
To sign: “your own private key”
A digital signature proves “the sender really sent it” and “it wasn’t altered on the way.” It only means something if only the sender could have made it, so you sign with the private key only you hold, and everyone checks it with the public key they all have.
- Encrypt with the receiver’s public key; decrypt with the receiver’s private key
- Sign with the sender’s private key; verify with the sender’s public key
- Never give your private key to anyone