🔐Public-Key Cryptography
Also known as Asymmetric Encryption, Asymmetric Cryptography, Key Pair, Public and Private Keys
Two keys that work as a pair. One is shared, and one is kept secret.
Think of it like
Think of it like a mailbox. Anyone can drop a letter in, but only you have the key.
Example
Emma puts her public key on a server. When she logs in, the server sends a test that only her private key can answer.
Why it matters
It lets two strangers talk safely without first meeting to share a secret. The secure web depends on it.
Definition
Example code
console
$ ls ~/.ssh
id_ed25519 id_ed25519.pubCommon mistake
Key takeaways
- 1Two keys. One public, one private.
- 2Lock and unlock. What one locks, only the other opens.
- 3Share only the public one. The private key never leaves you.