All articles

PGP: how public-key and private-key encryption works

PGP exists because of a fight over whether software counts as speech. Phil Zimmermann released Pretty Good Privacy in 1991; by 1993 the US government was investigating him for "munitions export without a license," since strong cryptography was legally classified alongside weapons under the ITAR arms-control regime.

A key pair: public and private

Unlike symmetric encryption (like AES), where a single key both encrypts and decrypts, PGP uses a pair of mathematically related keys. The public key can be freely handed out — anyone can use it to encrypt a message meant only for you — and only the matching private key, which never leaves your machine, can decrypt it.

How the case against Zimmermann ended

Zimmermann's defense team had the entire PGP source code published as a printed book, arguing that printed text was protected speech under the First Amendment — you could photograph the pages and re-scan them into code. The investigation was dropped in 1996 without charges, and US export rules on cryptography were substantially relaxed by 1999, but the episode set the template for every encryption-export debate since.

Digital signatures — the same idea in reverse

To sign a message, the author hashes it and then encrypts that hash with their own private key. Anyone can verify the signature using the author's public key; a successful check proves the message came from the private key's owner and wasn't altered afterward.

Why you'd need this

  • Encrypting confidential messages for a recipient without exchanging secrets in advance.
  • Signing software releases or Git commits to prove authorship — this is exactly how Linux kernel maintainers verify contributions today.
  • Verifying the authenticity of signed emails or files from outside sources.

Web of Trust instead of a central CA

Unlike X.509 certificates, where a centralized certificate authority vouches for identity, PGP relies on a "Web of Trust": users sign each other's public keys themselves, attesting that they personally verified who a key belongs to. Trust in an unfamiliar key builds up indirectly, through a chain of signatures from people you already trust — a deliberately decentralized answer to the same identity problem that export-control law once tried to keep locked down.

Try the tool