How Public-Key Cryptography Works
One key locks, a different key unlocks — and that changes everything.
Symmetric encryption needs both sides to already share a secret. Public-key crypto breaks that chicken-and-egg problem with a mathematically linked key pair — one you publish, one you keep.
Legend — how to read this diagram
Two superpowers
- Encryption. Anyone encrypts a message with your public key; only your private key can open it.
- Signatures. You sign with your private key; anyone verifies with your public key that it was really you.
- Key exchange. Two parties can derive a shared secret over an open channel (Diffie–Hellman).
- Trust. Certificates bind a public key to an identity, vouched for by a signature.
Why it's hard to break
Trapdoor functions. Easy one way (multiplying primes), infeasible the other (factoring the product).
Key size vs. speed. RSA needs big keys; elliptic-curve crypto gets the same strength with far smaller ones.
Slow by design. Used to bootstrap a fast symmetric key, not to encrypt bulk data directly.
Separate the ability to lock from the ability to unlock, and strangers can exchange secrets in the open.
No comments:
Post a Comment