
Public-Key Cryptography and PGP, Explained Plainly
Ordinary (“symmetric”) encryption uses one shared key for both locking and unlocking — which raises an obvious chicken-and-egg problem: how do two people agree on a shared secret key over a channel they don’t trust yet? Public-key cryptography solves exactly this.
The two-key trick
Each person generates a keypair: a public key, freely shareable with anyone, and a private key, kept secret and never shared. The mathematical relationship between them is designed so that:
- Anything encrypted with your public key can only be decrypted with your matching private key.
- Anything signed with your private key can be verified by anyone using your public key, proving it came from you without revealing your private key at all.
This means a stranger can encrypt a message to you using nothing but your published public key, and only you can read it — no prior shared secret required, and no secure channel needed to set it up.
Where PGP fits in
PGP (“Pretty Good Privacy,” and its open standard descendant OpenPGP) is the most widely used implementation of this idea for email and file encryption. In practice, a PGP-encrypted message actually combines both approaches: it encrypts the message body with a fast one-time symmetric key, then encrypts that key with the recipient’s public key — the best of both, since symmetric encryption is far faster for large content, and public-key encryption solves the key-exchange problem for the small piece that matters.
The part people get wrong: the web of trust
Public-key crypto guarantees that a message encrypted to a given public key can only be read by whoever holds the matching private key. It does not guarantee that the public key you found actually belongs to the person you think it does — anyone can generate a keypair and label it with any name they like. PGP’s answer to this is the “web of trust”: people cryptographically sign each other’s keys after verifying identity some other way (in person, ideally), building a chain of vouching you can inspect. Skip this verification step, and you could be encrypting perfectly securely to an impostor’s key without ever finding out.
Why this still matters today
Modern messaging apps (Signal, WhatsApp) automate public-key exchange behind the scenes so users never see it directly — but it’s the same underlying idea, just with better UX and, in Signal’s case, additional protections layered on top (see the dedicated post on the Signal Protocol). PGP itself remains relevant specifically where email is unavoidable — journalist tip lines, security disclosure inboxes, and SecureDrop instances still rely on it, precisely because it doesn’t require both parties to be using the same app in real time.
The one habit that matters most
Whatever tool you use, verify a public key out-of-band — a fingerprint compared over a phone call, in person, or through an independently-verified channel — before trusting it for anything sensitive. The cryptography is essentially unbreakable with current technology; the much weaker link is almost always “did I actually confirm whose key this is.”