Public-key cryptography
Each person has two linked keys. The public key can be shared with anyone. The private key is kept secret. Something locked with the public key can only be opened with the private key, and something signed with the private key can be checked by anyone with the public key.
A postbox in the street. Anyone can drop a letter in through the slot, but only the person with the key can open it and read the post.
Why it matters
Two strangers on the internet can set up a secure connection without ever meeting to swap a secret. It also makes digital signatures possible.
In plain words
Each person has two linked keys. The public key can be shared with anyone. The private key is kept secret. Something locked with the public key can only be opened with the private key, and something signed with the private key can be checked by anyone with the public key.
Think of it like this
A postbox in the street. Anyone can drop a letter in through the slot, but only the person with the key can open it and read the post.
Why it matters
Two strangers on the internet can set up a secure connection without ever meeting to swap a secret. It also makes digital signatures possible.
Where you meet it
Every secure website, passkeys, software updates on your phone, chip cards.
More diagrams: How a digital signature works · What happens when you open a secure website
Go deeper history and technical detail
Also called asymmetric cryptography. It was published by Whitfield Diffie and Martin Hellman in 1976, with RSA following in 1977 (GCHQ researchers had found similar ideas earlier, kept secret until 1997). Public-key maths is slow, so in practice it is used to agree or protect a symmetric key, and the symmetric key then encrypts the data. Its security rests on maths problems that are hard for ordinary computers, such as factoring large numbers. Some of those problems are easy for a large quantum computer.
Read or watch next
- The Code BookSimon Singh (1999), book
- How Public Key Cryptography Really WorksQuanta Magazine (2024), article
- CryptoSteven Levy (2001), book
- How Does Math Keep Secrets?The Joy of Why, Quanta Magazine (2024), podcast episode
- New Directions in CryptographyWhitfield Diffie and Martin Hellman (1976), paper
- CryptographyJonathan Katz, University of Maryland on Coursera, course
Related terms
Cite this page Encryption Observer, “Public-key cryptography”, encryption.observer/terms/public-key-cryptography/, checked December 2026.