Public-key cryptography today
Where public-key cryptography is used every day: HTTPS, digital signatures, messaging, passkeys, cryptocurrencies, software updates.
- Websites
- Every HTTPS connection uses public-key cryptography to authenticate the site and agree a session key.
- Digital signatures
- Contracts, deeds, invoices and digitally signed documents rest on key pairs and certificates.
- Encrypted messaging
- End-to-end encrypted apps exchange public keys between users’ devices.
- Passkeys
- They replace passwords with a key pair: the site stores only the public key.
- Cryptocurrencies
- An address derives from a public key; spending requires a signature with the private key.
- Software updates
- Systems verify the signature of updates before installing them.
- Server access
- Administrators log into servers with key pairs instead of passwords.
The post-quantum transition
In 2024 standards bodies published the first quantum-resistant public-key cryptography standards. In the coming years browsers, operating systems and services will add them alongside, and then substitute them for, the current algorithms.
Public-key cryptography: try it yourself
Exercises on modular exponentiation, one-wayness and verifying a signature, with solutions.
The pages of this topic
Back to the overviewPublic-key cryptography: how it works
The open padlock as a metaphor, encryption with the public key, signing with the private key and hybrid cryptography.
Public-key cryptography: history
From the secret insights of Britain’s GCHQ to Diffie and Hellman’s paper, from RSA to elliptic curves and certificate infrastructures.
Public-key cryptography: the maths
Trapdoor one-way functions: multiplication and factoring, modular exponentiation and the discrete logarithm.
Public-key cryptography: worked example
A digital signature with small numbers, using the example RSA keys, to see how private and public keys work together.
Public-key cryptography: weaknesses and attacks
The man-in-the-middle attack, weak keys, side channels and the quantum threat: where public-key cryptography can fail.
Public-key cryptography: frequently asked questions
Short answers to the most common doubts about public-key cryptography.