Public-key cryptography: frequently asked questions
Short answers to the most common doubts about public-key cryptography.
If the public key is public, why is it secure?
Because the private key cannot be derived from the public key in reasonable time. Knowing it only lets you encrypt for the owner or verify their signatures.
How does it differ from symmetric cryptography?
In symmetric cryptography the same key encrypts and decrypts and must be shared secretly; in asymmetric cryptography there are two keys and the public one can circulate freely.
Why not use public-key cryptography alone?
Because it is much slower. It is used to exchange keys and sign; data are encrypted with symmetric algorithms.
What is a digital certificate?
An electronic document, signed by an authority, that links a public key to the identity of its holder.
Who invented public-key cryptography?
Publicly, Diffie and Hellman in 1976, followed by Rivest, Shamir and Adleman. In secret, Ellis, Cocks and Williamson at Britain’s GCHQ a few years earlier.
Will quantum computers make it useless?
They would break today’s algorithms, but standardised post-quantum public-key algorithms already exist and are coming into use.
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 today
Where public-key cryptography is used every day: HTTPS, digital signatures, messaging, passkeys, cryptocurrencies, software updates.
Public-key cryptography: try it yourself
Exercises on modular exponentiation, one-wayness and verifying a signature, with solutions.