Principles · Overview

Public-key cryptography: how to communicate secretly with someone you have never met

The idea of public-key cryptography explained clearly: public and private keys, one-way functions, digital signatures, certificates, the secret British history, attacks and today’s uses.

For millennia cryptography had a rule that seemed like a law of nature: to communicate secretly you must first share a secret. Sender and recipient had to meet, or trust a courier, to exchange the key. In 1976 two American researchers published an idea that overturned this rule: you can communicate secretly with anyone, using a key that everyone can know.

This is public-key cryptography, also called asymmetric cryptography. Everyone has two mathematically linked keys: a public one, to be distributed freely, and a private one, to be kept safe. What is encrypted with the public key can only be opened with the private key; what is signed with the private key is verified with the public key. Without this idea there would be no e-commerce, digital signatures, HTTPS websites or encrypted messaging apps.

2keys per person: one to share, one to keep
1976the year of Diffie and Hellman’s paper that made the idea public
1997the year it emerged that British intelligence had had it first

What it makes possible

Confidentiality
Anyone can encrypt a message for you with your public key; only you can read it.
Signature
You can sign a document with your private key; anyone can verify that it is yours and intact.
Key agreement
Two people can agree on a secret key while communicating only in public.
Authentication
You can prove you hold a private key without ever revealing it, as passkeys do.

The best-known algorithms are RSA, Diffie-Hellman key exchange and elliptic curves; their most widespread application is the digital signature.

↑