Rows of white radio telescope dishes in a dry valley at dawn, no logos or readable text
AI-generated image · Source

Algorithms

What is Grover’s algorithm, and what does NIST say it means for AES-128?

Published · Last updated

Grover’s algorithm is a quantum procedure for finding a marked item in an unstructured list. In a 1996 paper, Lov K. Grover described the task this way: there is an unsorted database containing N items, out of which just one item satisfies a given condition, and that one item has to be retrieved. Once an item is examined, it is possible to tell whether or not it satisfies the condition in one step, but there is no sorting on the database that would aid its selection. The paper is A fast quantum mechanical algorithm for database search, posted as arXiv:quant-ph/9605043, and it identifies itself as an updated version of a paper that appeared in the Proceedings of STOC 1996, pages 212–219.

What the classical baseline is

Grover’s paper states the classical baseline before it introduces the quantum method. The most efficient classical algorithm, it says, is to examine the items one by one. If an item satisfies the required condition, stop; if it does not, keep track of that item so that it is not examined again. “It is easily seen that this algorithm will need to look at an average of N/2 items before finding the desired item.”

The same paper uses a phone-directory analogy. Imagine a phone directory containing N names arranged in completely random order. In order to find someone’s phone number with probability 1/2, Grover writes, any classical algorithm, whether deterministic or probabilistic, will need to look at a minimum of N/2 names. The point of the analogy is that the list has no helpful order. If the directory were sorted, a conventional computer could use that structure; Grover’s setting is the case in which it is not.

What the quantum algorithm claims

Quantum mechanical systems, Grover writes, can be in a superposition of states and simultaneously examine multiple names. By properly adjusting the phases of various operations, successful computations reinforce each other while others interfere randomly. As a result, the paper says, the desired phone number can be obtained in only O(√N) steps, and the algorithm is within a small constant factor of the fastest possible quantum mechanical algorithm.

That O(√N) bound is a quadratic improvement over the classical average of N/2 examinations, not an exponential one. Grover is explicit that this paper does not reduce the number of steps to a finite power of O(log N). If it did, he notes, it would yield a polynomial-time algorithm for problems such as SAT, which asks whether any combination of n binary variables satisfies a given set of clauses. In that setting there are N = 2^n possible combinations. Grover’s algorithm, as presented in the 1996 paper, is not a polynomial-time SAT solver, and this explainer does not treat it as one.

The 1996 paper also places the result in a short historical frame. Quantum mechanical computers, Grover writes, were proposed in the early 1980s and were later shown to be more powerful than classical computers on various specialized problems. He notes that in early 1994, Peter Shor demonstrated that a quantum mechanical computer could efficiently solve integer factorization in a time polynomial in log N, a problem for which there was no known efficient classical algorithm. Grover presents his search algorithm as a different contribution: a quadratic speedup on an unstructured database, not a polynomial-time factoring method. This desk’s explainer on Shor’s algorithm is the place for that 1994 result; the sources and claims on this page stay with Grover’s paper and with NIST’s later remarks on Grover search against AES-128.

How NIST uses Grover’s algorithm in cryptography

NIST discusses Grover’s algorithm when it assesses the security of post-quantum schemes against brute-force search. In a December 2023 FAQ on Kyber512, NIST writes that the quantum speedup of brute-force attacks against AES-128 via Grover’s algorithm “is widely acknowledged.” The FAQ uses that fact to explain a comparison: because that speedup is treated as more powerful than the quantum speedups then known for the best-known classical lattice attacks, NIST says classical attack costs are the most relevant for assessing the security of Kyber512, which is also referred to as ML-KEM-512.

The same FAQ describes, in outline, what “category 1 security” meant in NIST’s post-quantum call for proposals: broadly, Kyber512 is claimed to be at least as hard to break as AES-128. This explainer repeats that official comparison. It does not calculate a Grover running time for AES, it does not say that Grover’s algorithm has broken AES, and it does not treat the FAQ as a claim that any particular quantum computer can now run the algorithm at cryptographic scale.

NIST’s public explainer What Is Post-Quantum Cryptography?, updated 27 February 2026, is the place to read how the agency describes a machine that could threaten present-day encryption more generally, including algorithms that rely on factoring large numbers. That broader threat, and the phrase “cryptographically relevant” quantum computer, are covered in a separate explainer. Grover’s algorithm is a search speedup; NIST’s factoring discussion on that page is a different algorithm and a different kind of speedup.

What this explainer does not claim

Grover’s paper is a theoretical computer-science result about query counts on an unstructured list. It does not specify a hardware platform, a qubit technology, or a date by which the algorithm will be run on a useful scale. Translating O(√N) queries into wall-clock time on a named machine would require assumptions that are not in the 1996 paper and are not in the NIST FAQ cited above, so those estimates stay out of this page.

The desk also does not treat Grover’s algorithm as a general-purpose replacement for every classical search. Grover’s own introduction distinguishes the unstructured case from problems that have additional structure. Most interesting problems, he writes, are concerned with the effect of that structure on the speed of the algorithm. This explainer stays with the unstructured-search setting he analyses, and with the official cryptographic comparison NIST has published for AES-128.

Readers who want the exact wording should open the sources. The algorithm’s problem statement, the classical N/2 baseline, the phone-directory analogy and the O(√N) bound are in Grover’s 1996 paper (PDF). The statement that the quantum speedup of brute-force attacks against AES-128 via Grover’s algorithm is widely acknowledged, and the comparison to Kyber512 / ML-KEM-512, are in NIST’s December 2023 Kyber512 FAQ. Definitions of a qubit, and of why qubits are fragile, are in the NIST pages cited from What is a qubit?.

If NIST revises the FAQ, or if a later standard discusses Grover’s algorithm in more detail than these documents do, the desk will update this page and change the last-updated date. Until then, the claims above are limited to what those documents say.

← All news