Shor's algorithm
Shor's algorithm is a recipe for a quantum computer that can factor large numbers and solve related problems quickly. Those are exactly the problems that RSA and ECC rely on being hard.
A master key design that already exists on paper. Nobody has yet built a machine big enough to cut it.
- RSA Factoring large numbers becomes easy with Shor's algorithm. Used for: Certificates, signatures, key loading Must be replaced.
- Elliptic curves ECDH, ECDSA and Ed25519 fall to a variant of Shor's algorithm. Used for: Key exchange, passkeys, crypto wallets Must be replaced.
- Diffie-Hellman The classic key exchange rests on a problem Shor's algorithm solves. Used for: VPNs, older TLS Replaced by ML-KEM.
- AES-128 Grover's algorithm in theory reduces it to about 64-bit strength. Used for: Disk, Wi-Fi, web traffic The UK NCSC still treats it as safe.
- AES-256 Even with Grover's algorithm, far beyond reach. Used for: Long-lived secrets Recommended where data must stay secret for decades.
- SHA-256 and SHA-3 Hash functions are only modestly affected. Used for: Signatures, passwords, blockchains Stay in use, including inside post-quantum signatures.
Why it matters
Shor's algorithm is the reason public-key cryptography is being replaced worldwide.
Where you meet it
In the maths. It has only been run on tiny toy examples so far.
Go deeper history and technical detail
Published by Peter Shor in 1994. It turns factoring into finding the period of a repeating pattern, which a quantum computer does efficiently using the quantum Fourier transform. It does not meaningfully affect symmetric ciphers like AES or hash functions.
Read or watch next
- Thirty Years Later, a Speed Boost for Quantum FactoringQuanta Magazine (2023), article
- Shor, I'll do itScott Aaronson (2007), blog post
- Quantum Computing for EveryoneChris Bernhardt (2019), book
- Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum ComputerPeter Shor (1994, revised 1996), paper
- What is post-quantum cryptography (PQC)?Cloudflare Learning Center, guide
- Selected Areas in Cryptology (Spring 2022, Part I)Tanja Lange, Eindhoven University of Technology, lecture series
Related terms
Cite this page Encryption Observer, “Shor's algorithm”, encryption.observer/terms/shor/, checked December 2026.