Shor, Grover And What Quantum Computers Actually Break
Two quantum algorithms drive the threat to cryptography. One breaks today's public-key algorithms outright; the other only weakens symmetric ciphers and hashes. Here is the difference and why it matters.
Checked against primary sources and independently reviewed on . Sources are listed at the end.
Headlines often say quantum computers will “break encryption”. That is half right, and the half that is wrong leads organisations to waste effort in some places and underinvest in others. Two quantum algorithms matter for cryptography, and they have very different effects.
Shor’s algorithm breaks the public-key algorithms used for key exchange and signatures. Grover’s algorithm speeds up brute-force guessing, which weakens symmetric encryption and hash functions without breaking them. This article explains each one in plain terms and sets out what NIST, the US standards body, says to do about them.
Shor’s Algorithm: A Shortcut Through The Hard Maths
As the previous article explained, RSA depends on factoring being hard, and Diffie-Hellman and elliptic curve cryptography depend on discrete logarithms being hard. On a normal computer, the best known methods for these problems slow down dramatically as the numbers get bigger, which is why a 2048-bit RSA key is safe from classical attack.
In a paper first posted in 1995, Peter Shor described quantum algorithms that solve both factoring and discrete logarithms in polynomial time.1 In plain language, the effort grows gently as keys get longer instead of exploding. Making the key bigger therefore buys very little protection. An organisation cannot escape Shor’s algorithm by moving from RSA-2048 to RSA-4096; it has to move to different mathematics.
That is why NIST groups RSA, ECDSA, EdDSA, finite field Diffie-Hellman and ECDH together as quantum-vulnerable. Its draft transition plan proposes deprecating the 112-bit security versions after 2030 and disallowing all of them after 2035.2 The plan is still an initial public draft as of October 2026.
The catch is scale. Shor’s algorithm needs a large, error-corrected quantum computer, often called a cryptographically relevant quantum computer (CRQC). NIST’s November 2024 draft states that no such machine exists yet.2 How large it would need to be is covered in How Many Qubits To Break RSA, and the Inside Shor’s Algorithm article walks through the steps without equations.
Grover’s Algorithm: Faster Guessing, Not A Shortcut
Symmetric ciphers such as AES and hash functions such as SHA-256 do not rely on factoring or discrete logarithms. The generic way to attack them is to try keys or inputs until one works. In 1996 Lov Grover published a quantum search method that finds a marked item among N possibilities in roughly the square root of N steps, compared with about N divided by two on average for a classical search.3
Applied to a 128-bit key, a square-root speed-up means something on the order of 2 to the power 64 quantum steps instead of 2 to the power 128 classical guesses. That sounds dramatic, but 2 to the power 64 is still a vast number of operations, each of which has to run on an error-corrected quantum machine. The effect is that a symmetric key loses some margin. It does not become breakable the way RSA does.
NIST’s position follows from this. Its draft says the symmetric standards are “significantly less vulnerable to known quantum attacks” than the public-key standards, and that every approved symmetric primitive (a basic building block such as a cipher or hash function) offering at least 128 bits of classical security is believed to meet at least its lowest post-quantum security category.2 NIST does not expect to transition away from these standards as part of the post-quantum migration. The only symmetric options it plans to drop are a few at the 112-bit level, which it will disallow in 2030.2
| Shor’s Algorithm | Grover’s Algorithm | |
|---|---|---|
| What it attacks | Factoring and discrete logarithms | Brute-force search for keys or hash inputs |
| Algorithms affected | RSA, Diffie-Hellman, ECDH, ECDSA, EdDSA | AES, SHA-2, SHA-3 and other symmetric primitives |
| Size of the speed-up | Turns an infeasible problem into a feasible one | At most a square-root reduction in guesses |
| Does a bigger key help? | No, the maths itself must be replaced | Yes, larger keys and outputs restore the margin |
| NIST plan | Deprecate 112-bit versions after 2030, disallow all after 2035 (proposed) | Keep approved primitives of 128 bits or more; drop 112-bit options in 2030 |
| Action | Replace with ML-KEM, ML-DSA or SLH-DSA | Keep, and prefer larger sizes for long-lived or highly sensitive data |
How NIST Measures Post-Quantum Strength
NIST anchors its post-quantum security scale on the symmetric algorithms themselves. Category 1 is defined as being at least as hard to break as a key search on AES-128. Category 3 matches AES-192 and Category 5 matches AES-256. Categories 2 and 4 use collision searches on 256-bit and 384-bit hash functions, with SHA-256 and SHA3-384 as the examples.2
That choice tells you something. NIST would not use AES-128 as the floor for its new quantum-resistant algorithms if it thought AES-128 itself was about to fall to quantum attack. In the same draft, SHA-256 rates Category 2 for collision resistance and Category 5 for preimage resistance.2 A collision attack looks for any two inputs that produce the same hash, while a preimage attack has to find an input matching one particular hash, which is a much harder task. That is why the same function earns two different ratings.
What This Means In Practice
The practical lesson is to put effort where the break is. An inventory that flags every use of AES as a quantum risk will bury the real problems. The urgent work is finding where RSA, Diffie-Hellman and elliptic curve algorithms are used for key exchange and signatures, then planning their replacement.
For symmetric cryptography, the job is housekeeping: retire 112-bit options and legacy algorithms that were already weak, and use 256-bit keys where data has a long shelf life. That is a configuration change in most systems. Replacing public-key algorithms, by contrast, touches protocols, certificates, hardware and partners, which is why it takes years.
The difference also shapes timing. Data protected by a quantum-vulnerable key exchange can be recorded now and decrypted later, which is the subject of Harvest Now, Decrypt Later.
Footnotes
-
P. W. Shor, “Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer”, arXiv quant-ph/9508027, submitted 30 August 1995. arxiv.org ↩
-
NIST, IR 8547 (initial public draft), “Transition to Post-Quantum Cryptography Standards”, November 2024. nvlpubs.nist.gov ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
L. K. Grover, “A fast quantum mechanical algorithm for database search”, arXiv quant-ph/9605043, 29 May 1996. arxiv.org ↩
-
NSA, “NSA Releases Future Quantum-Resistant (QR) Algorithm Requirements for National Security Systems”, 7 September 2022. nsa.gov ↩
-
A. Becker and M. Jenkins (NSA), “Commercial National Security Algorithm (CNSA) Suite 2.0 Profile for TLS 1.3”, IETF Internet-Draft draft-becker-cnsa2-tls-profile-05, 19 July 2026. ietf.org ↩
Knowledge Hub content is general information. It is not legal advice, a compliance certification, a guarantee of security or a substitute for an assessment of your own systems. Standards and rules change; check the sources for the latest position.