← Back to section · Digital Security

Grover's Algorithm and Symmetric Cryptography: Is AES-128 Still Safe?

Quantum search gives only a quadratic speedup: why doubling key length is enough for symmetric ciphers, how to choose hashes, and how NIST's security categories are calibrated.

Published 21 November 2026 · 6 min read · PQ Frontier

Grover's Algorithm and Symmetric Cryptography: Is AES-128 Still Safe?
AI-generated artwork created for PQ Frontier
Video explainer · Data Encryption: At Rest and In Transit

A common misconception in post-quantum discussions is that quantum computers “break all cryptography.” The reality is split: Shor’s algorithm is an exponential blow against RSA and ECC, but against symmetric cryptography quantum computing has only one card to play — Grover’s algorithm, a quadratic speedup. Quadratic sounds alarming; in practice it is answered by doubling key lengths.

What Grover actually does

Grover’s algorithm (1996) finds a marked item among NN unstructured candidates in O(N)O(\sqrt{N}) quantum queries instead of O(N)O(N) classical trials. Against AES-128, classical brute force costs 21282^{128}; the quantum attack needs about 2642^{64} iterations.

The devil is in what an “iteration” is. A Grover iteration is not a cheap trial: it runs the entire AES circuit as a reversible quantum circuit, under error correction. Estimates put a single iteration at thousands of logical qubits and circuits tens of thousands of gates deep; 2642^{64} such iterations in sequence run to timescales of years and far beyond. NIST’s PQC process therefore evaluates attacks under MAXDEPTH limits (plausible maximum circuit depths of 2402^{40}–2962^{96}), and parallelizing Grover under a depth cap yields rapidly diminishing returns.

That is exactly how NIST’s security categories are defined: category 1 equals the cost of breaking AES-128, category 3 AES-192, category 5 AES-256 — a yardstick built on realistic costs including Grover and depth constraints, not on the bare square root.

Hash functions

  • Preimage (invert a given hash): Grover halves the exponent — SHA-256 goes from 22562^{256} to 21282^{128}, still ample;
  • Collisions (find any two inputs with the same hash): classically 21282^{128} by the birthday bound; the quantum BHT algorithm nominally reaches about 2852^{85} but demands enormous quantum memory, and once memory is priced in the advantage largely evaporates — SHA-256 collision resistance is generally considered to survive;
  • What actually must go are the already-dead short-output algorithms: SHA-1 and MD5 died in the classical era, unrelated to quantum.

Parallelism cannot rescue Grover

A natural objection: if 2642^{64} sequential iterations are too slow, why not run many quantum machines in parallel? The answer lies in Grover’s serial structure — each iteration amplifies amplitudes produced by the previous one, so the key space cannot be sliced up the way classical brute force can. Zalka proved in 1999 that Grover’s query count is optimal, and the same line of analysis caps parallel speedup: MM machines working in parallel buy only about a M\sqrt{M} acceleration — cutting the time by a factor of ten costs a hundred times the hardware. Classical brute force, by contrast, parallelizes almost linearly. A Grover attack is thus intrinsically hard to scale out, which is a second reason — beyond MAXDEPTH — why NIST treats AES-128 relatively calmly: the attacker can neither make the circuit deeper nor throw machines at the problem; mathematics blocks both exits.

Where Grover actually bites: low-entropy secrets

The quadratic speedup is genuinely dangerous not against randomly generated 128-bit keys, but against low-entropy, human-memorable secrets: passwords, PINs, keys derived from short phrases. A 40-bit-entropy password costs 2402^{40} classically — already uncomfortable — and about 2202^{20} Grover iterations, which is no barrier at all. For such secrets the defence was never the cipher; it is the key derivation function’s stretching. bcrypt, scrypt and Argon2 raise the price of every single guess through thousands of iterations and large memory footprints, and a quantum attacker pays the full KDF cost inside every Grover iteration, with memory-hard designs additionally straining quantum memory. The engineering implication: when inventorying quantum risk, look first for places where short passwords feed directly into encryption keys. That is the real debt on Grover’s ledger — ahead of swapping AES-128 for AES-256.

Using the yardstick: from NIST categories to parameter choices

Once the yardstick is understood, parameter selection has an anchor. Post-quantum parameter sets are graded directly against it: ML-KEM-512 targets category 1 (AES-128 equivalence), ML-KEM-768 category 3, ML-KEM-1024 category 5; ML-DSA and SLH-DSA parameter sets spread across categories 2, 3 and 5 in the same way. Two consequences follow. First, choosing category-5 parameters for a scenario that only ever required 128-bit classical equivalence pays size and compute for a threat that does not exist — this is where the certificate-chain and handshake size bills (see our PKI article) come from. Second, the symmetric and public-key sides must align: negotiating with ML-KEM-1024 and then encrypting the data with AES-128 caps the whole system at category 1, because the short side of the pairing sets the ceiling. A practical inventory method is to label each system with a target category and then check four lines against it — KEM, signatures, symmetric keys and hash outputs. In real migration programmes, both the commonest waste and the commonest shortfall come from those four lines not lining up.

A clarification: randomness is not on Grover’s ledger

Inventories often bundle in a question about random numbers: can a quantum computer “guess” them? No — provided the randomness genuinely comes from entropy. Grover accelerates search over structured spaces; it has no grip on truly random output. A deterministic random bit generator (DRBG, e.g. the NIST SP 800-90A constructions) seeded with sufficient entropy produces output computationally indistinguishable from true randomness, and a quantum attacker is reduced to trying seeds one by one — with seed spaces typically at 256 bits or more. The “quantum random number generators” (QRNG) on the market address a different problem, the physical trustworthiness of the entropy source; classical sources (thermal noise, oscillator jitter) pass equally well once health-tested. What actually needs auditing is implementation failure — low-entropy boot, entropy duplication from cloned VM images, insufficient entropy at embedded-device startup. Those are classical-era problems; no algorithm swap fixes them, only entropy engineering and startup testing do.

Engineering conclusions

  1. Default to AES-256 in new systems — four extra rounds buy complete Grover headroom at negligible cost;
  2. Long-term secrets and root keys — SHA-384/512, generous KDF output lengths;
  3. Existing AES-128 needs no panic migration — prioritize by data shelf life; it sits far behind public-key migration in the queue;
  4. Symmetric ciphertext has no harvest-now-decrypt-later problem — stored AES ciphertext stays expensive to attack even for a mature quantum computer, the opposite of stored RSA key exchanges.

In one line: quantum computing is a revolution against public-key cryptography, but only inflation against symmetric cryptography — print the denomination (key length) twice as large, and the books balance.

Sources and further reading

  • Grover, A fast quantum mechanical algorithm for database search, STOC 1996. arXiv:quant-ph/9605043
  • NIST, Call for Proposals: PQC Standardization (security category and MAXDEPTH definitions), 2016. https://csrc.nist.gov/projects/post-quantum-cryptography
  • Grassl et al., Applying Grover’s algorithm to AES: quantum resource estimates, PQCrypto 2016.

Tags: GroverAESsymmetric cryptographyhashing