QuantumAtlas

Interactive Calculator · Security and Networks

Symmetric Key Quantum Security Calculator (Grover Attack)

See how long a quantum computer would need to brute-force an AES key, and why doubling the key length restores the margin.

Intermediate
Presets

The cost of running the cipher inside a reversible quantum circuit, including uncomputation.

An error-corrected clock rate. Physical gates are faster, logical gates are slower.

Splitting Grover over P machines only speeds it up by √P.

Grover iterations

1.45×10¹⁹

(π/4) · 2^(k/2)

Quantum attack time

4.59×10¹¹ years (33.27× the age of the universe)

Classical attack time

5.39×10¹⁸ years (390,684,693× the age of the universe)

Average case, 2^(k−1) trials

Effective quantum strength

~64 bits

Key length halves under Grover

Out of reach

Even with the quantum machine you describe, the search takes longer than the age of the universe. This is why AES-128 and AES-256 are treated as quantum-resistant.

Quick table at your settings

KeyQuantumClassical
566.68 years10.01 hours
8027,364 years19,154 years
1121.79×10⁹ years (0.130× the age of the universe)8.23×10¹³ years (5,961× the age of the universe)
1284.59×10¹¹ years (33.27× the age of the universe)5.39×10¹⁸ years (390,684,693× the age of the universe)
1921.97×10²¹ years (1.43×10¹¹× the age of the universe)9.95×10³⁷ years (7.21×10²⁷× the age of the universe)
2568.47×10³⁰ years (6.14×10²⁰× the age of the universe)1.83×10⁵⁷ years (1.33×10⁴⁷× the age of the universe)

Attack time versus key length

10⁻⁶10⁷10²⁰10³³10⁴⁶10⁵⁹10⁷²501001502002501 yearAge of the universe128 bitsKey length (bits)Seconds
Quantum (Grover)Classical brute force

The two curves have different slopes: classical time doubles with each added bit, quantum time grows by about 1.41 times.

Estimate the time for a Grover attack on a symmetric key from the key length, the oracle cost, the logical clock rate, and the number of quantum machines, and compare with classical brute force and the age of the universe.

What this calculator does

Quantum computers threaten some cryptography far more than other cryptography. Shor's algorithm breaks public-key systems such as RSA and elliptic curves completely. For symmetric ciphers like AES, there is no such shortcut. The best known generic attack is a key search, and Grover's algorithm speeds up a search over 2 to the k keys to about 2 to the k over 2 steps. That is a quadratic speedup, which effectively halves the key length: AES-128 behaves like a 64-bit cipher against an ideal quantum attacker, and AES-256 like a 128-bit cipher. This calculator shows what that means in time.

It would be easy to stop at the halving rule, but the rule alone overstates the threat, because each Grover step is not a single operation. It is a full evaluation of the cipher inside a reversible quantum circuit, which costs hundreds of thousands to millions of logical gates, run on an error-corrected machine whose logical gates are far slower than classical operations. And Grover's algorithm does not parallelize well: using P machines only reduces the running time by the square root of P. Enter those numbers and the calculator computes the number of Grover iterations, the wall-clock time of the quantum attack, the time of a classical brute-force attack at the key-testing rate you choose, and how the two compare with the age of the universe.

How to use it

Start with the preset AES-128 and Realistic oracle cost. With one machine performing a million logical operations per second and an oracle of a million logical operations, each Grover iteration takes one second. The attack needs about 1.4 times 10 to the 19 iterations, so it takes about 1.4 times 10 to the 19 seconds, roughly 460 billion years, thirty times the age of the universe. Now try the Generous quantum machine preset: a hundred million logical operations per second, an oracle ten times cheaper, and a million machines. The time falls to about 460,000 years. Even with these extremely optimistic assumptions, AES-128 remains out of reach. Switch to AES-256: the iterations jump to 2.7 times 10 to the 38, and the time to around 10 to the 30 years.

The most instructive control is the machines slider. Raise it to a billion and the time falls only by a factor of about 31,600, to roughly 14 million years, because the speedup grows as the square root. This is Zalka's 1999 result: Grover's algorithm cannot be parallelized efficiently. If you could rent a billion machines, you would still wait millions of years. For comparison, a classical attacker testing a trillion keys per second needs about 5 times 10 to the 18 years for AES-128, so the quantum attacker is faster in principle, but both are astronomically far from feasible.

Try the Old DES preset to see what a genuinely weak key looks like: with 56 bits, a classical attacker at a trillion keys per second needs about ten hours, and the quantum attacker needs about 2 times 10 to the 8 iterations at one second each, around seven years on one machine. The table and chart show how fast the picture changes with length: each additional 2 bits multiplies the quantum time by two, and the chart's classical curve climbs twice as steeply as the quantum one.

Reading the result

Effective quantum strength is half the key length because Grover needs 2 to the k over 2 iterations. NIST uses this idea in its post-quantum security categories, defining category 1 as at least as hard to break as an exhaustive search on AES-128, category 3 on AES-192, and category 5 on AES-256, with quantum costs estimated by circuit depth and gate counts. Detailed work by Jaques, Naehrig, Roetteler, and Virdia in 2020 computed explicit Grover oracles for AES and found that the cost of key search is far beyond practical limits for AES-128, while noting that margins are thinner than the idealized formula suggests. For hash functions, preimage search has the same square-root structure, and collision search by the Brassard-Høyer-Tapp algorithm needs enormous memory and offers no advantage once the cost of memory is counted, as Bernstein argued.

The practical advice is simple: use AES-256 where long-term secrecy matters, treat AES-128 as adequate for most uses, and concentrate migration effort on public-key cryptography, where the quantum threat is real and qualitative.

Assumptions and limits

The model uses a single number for the cost of the oracle, which in reality depends on the cipher, the key size, and how well the circuit is optimized, and it treats logical operations as a uniform clock. It ignores memory and routing overhead, the cost of error correction beyond what is folded into the logical rate, and related-key or structural attacks, which are separate from key search. Its comparison with the age of the universe is a way to express a scale, not a security proof. The goal is to build intuition about why symmetric cryptography survives the quantum transition.

The formulas behind it

Grover iterations

I = (π/4) · 2^(k/2)

Iterations to search a space of 2^k keys with one solution.

Quantum time

t_Q = I · C / (R · √P)

C logical operations per iteration, R logical operations per second, P machines.

Classical time

t_C = 2^(k−1) / r

Average-case brute force at r keys per second.

Effective strength

k_eff ≈ k/2

Under an ideal Grover attack, ignoring overheads.

Worked examples

AES-128 with realistic overheads

  1. C = 10⁶, R = 10⁶ per second, P = 1.
  2. I = 0.785 × 2⁶⁴ = 1.45 × 10¹⁹ iterations, each taking 1 second.

ResultAbout 1.45 × 10¹⁹ seconds, or 4.6 × 10¹¹ years, thirty times the age of the universe.

A billion machines

  1. Same as above with P = 10⁹.
  2. The speedup is √P = 31,623.

ResultAbout 1.45 × 10⁷ years, still far beyond any practical horizon.

AES-256

  1. k = 256 gives I = 0.785 × 2¹²⁸ = 2.67 × 10³⁸ iterations.

ResultAround 8 × 10³⁰ years with the realistic machine, so AES-256 is considered quantum resistant by a vast margin.

Frequently asked questions

Is AES-128 broken by quantum computers?

No. Grover's algorithm reduces its effective strength to about 64 bits in an idealized model, but the circuit cost and the limits of parallelization keep the attack out of reach.

Why not just use bigger keys everywhere?

For symmetric cryptography that is a good strategy: AES-256 costs little more than AES-128. The problem is public-key cryptography, which needs new algorithms.

What about hash functions?

Preimage search has the same square-root speedup, so SHA-256 retains about 128 bits of preimage security, and collisions are not meaningfully weakened.

References

  1. Grover, L. K. (1996). A fast quantum mechanical algorithm for database search. STOC '96, 212-219.
  2. Zalka, C. (1999). Grover's quantum searching algorithm is optimal. Physical Review A, 60, 2746-2751.
  3. Jaques, S., Naehrig, M., Roetteler, M., & Virdia, F. (2020). Implementing Grover oracles for quantum key search on AES and LowMC. EUROCRYPT 2020, LNCS 12106, 280-310.
  4. Brassard, G., Høyer, P., & Tapp, A. (1998). Quantum cryptanalysis of hash and claw-free functions. LATIN '98, LNCS 1380, 163-169.
  5. Bernstein, D. J. (2009). Cost analysis of hash collisions: Will quantum computers make SHARCS obsolete? SHARCS 2009 workshop.
  6. National Institute of Standards and Technology (2016). Submission requirements and evaluation criteria for the post-quantum cryptography standardization process.

Keep exploring

These calculators use simplified, published models for education and planning. Real devices and systems differ, so treat results as estimates. They are not engineering, investment, legal, or security advice.