Cifrar Online

Grover's algorithm

Will a quantum computer break your encrypted texts, your hashes or your passwords?

A large enough quantum computer would break RSA, Diffie-Hellman and elliptic curves, but not AES-256. Against symmetric ciphers, hashes and passwords, the best known quantum attack is Grover's algorithm or one of its variants, and Grover breaks nothing: it only makes brute force faster. On paper, a 256-bit key is left with the equivalent of 128 bits, which are still out of reach.

Here we explain what it does, why it achieves far less than that figure suggests and what the “Post-quantum” badge in the algorithm picker means.

What Grover's algorithm is

Lov Grover, of Bell Labs, published it in 1996. It solves a very general problem: finding what you are looking for among N possibilities with no clue as to where it is. An ordinary computer has to try them one by one, and on average it hits the answer halfway through. A quantum computer running Grover finds it in about √N steps.

In numbers: among a million possible keys, an ordinary computer tries half a million on average, while Grover needs about 800 steps. Among the 2128 keys of AES-128, the count goes from about 2127 tries to about 264.

There is no better shortcut. In 1997, Charles Bennett, Ethan Bernstein, Gilles Brassard and Umesh Vazirani proved that no quantum computer can search blindly in substantially fewer than √N steps, and Christof Zalka later proved that Grover is exactly optimal. The question is not whether a faster Grover will come along, but what it costs to run the one that already exists.

Nor does Grover find any weakness in the cipher: it is still brute force, with a quadratic advantage. Hence the usual rule of thumb: a k-bit key offers about k/2 bits against Grover. AES-128 would be left with about 64 and AES-256 with about 128.

Why that figure exaggerates

The rule counts steps, not what each step costs, and Grover takes them under very poor conditions:

  • Each step is several complete runs of AES inside the quantum computer. Grover does not try keys one at a time: in each step it computes AES on all the keys at once, as a quantum circuit. Markus Grassl and his co-authors calculated in 2016 that attacking AES-128 this way takes about 3,000 logical qubits (qubits already protected against errors) and on the order of 286 T gates, the most expensive quantum operations, with a depth of about 281 steps that have to be taken one after another. Later studies, such as that of Jaques, Naehrig, Roetteler and Virdia (2020), have made the circuit cheaper (thousands of times fewer gates than NIST had estimated, at the cost of more qubits), but they do not change the conclusion.
  • It does not parallelize well. A thousand quantum computers working at once do not finish a thousand times sooner, only about 32 times sooner (the square root of a thousand). Zalka proved that the work cannot be split better than by dividing the keys among independent machines, and that gives exactly this gain.
  • Error correction is expensive. Physical qubits make errors all the time, and each logical qubit is built from hundreds of them that watch over one another. That multiplies the size of the machine and lengthens each step.

This is the calculation the calculator above does, and the sum is our own, not a published study's: even if a machine took a million logical steps per second, a very optimistic assumption, the sequential part of the attack on AES-128 would last almost 90 billion years, more than six times the age of the universe. To finish it in ten years, it would have to be split among tens of quintillions of quantum computers, each with thousands of logical qubits.

Under those same assumptions, up to about 76 bits the ordinary computer finishes before the quantum one: try it with the 56 bits of DES. Grover's advantage only shows with long keys, just when both searches already take more than a thousand years.

What NIST says

NIST, the US standards agency that chose AES, uses precisely these attacks as its yardstick. Its five security categories for post-quantum cryptography are: a key search on AES-128 (category 1), finding a collision in SHA-256 (2), a key search on AES-192 (3), a collision in SHA-384 (4) and a key search on AES-256 (5). In other words, AES-128 is the floor the new algorithms have to reach.

For comparison, NIST proposes assuming that the attacker's sequential computation has a limit: somewhere between 240 operations, which it reckons the projected quantum machines would perform in series in a year, and 296, which a computer with atomic-scale qubits working at the speed of light would perform in a millennium. With its formula, and even allowing the attacker 264 operations in series (what an ordinary computer does in a decade), Grover against AES-128 would need about 2106 operations in total.

Its conclusion is clear. Its FAQ says that current applications can keep using AES with 128-, 192- or 256-bit keys, and that Grover is quite likely to provide little or no advantage against AES. Its transition plan, published in final form in October 2026, adds that the symmetric standards (ciphers, hashes, key derivation) are much less vulnerable to the known quantum attacks and that it does not expect to have to replace them.

So why is AES-256 recommended? For the margin. The NSA, for example, requires AES-256 and SHA-384 or SHA-512 for national security systems in its CNSA 2.0 suite. With 256 bits, even if Grover worked without any of its costs, 2128 steps would remain: as many as AES-128 has keys, and nobody considers it possible to try those one by one.

The one to worry about: Shor

In 1994, Peter Shor published a quantum algorithm that factors numbers and computes discrete logarithms in reasonable time. These are exactly the problems that RSA, Diffie-Hellman and elliptic curves rely on. Here it is not a matter of trying keys faster: a sufficiently capable quantum computer would break a 2048-bit RSA key or a 256-bit curve from start to finish.

Estimates of what it would take keep falling. In May 2025, Craig Gidney (Google) calculated that a 2048-bit RSA key could be factored in less than a week with fewer than one million noisy physical qubits. In March 2026, Google estimated that breaking the 256-bit elliptic curve used by Bitcoin and Ethereum (secp256k1) would take fewer than 1,200 logical qubits and fewer than 90 million Toffoli gates, another of the expensive operations: a few minutes on a superconducting machine with fewer than 500,000 physical qubits. A key search on AES-128 with Grover needs a 26-digit number of T gates.

That is why post-quantum cryptography replaces only public-key cryptography. On 13 August 2024, NIST published its first three standards: ML-KEM (FIPS 203), for agreeing on keys, and ML-DSA (FIPS 204) and SLH-DSA (FIPS 205), for signing. Its plan is to retire RSA and elliptic curves: deprecated after 2030 and disallowed in its standards after 2035. There is no “post-quantum family” of symmetric ciphers because none is needed: according to NIST, today's symmetric algorithms with 128 bits or more are already enough, and 256 bits leave plenty of margin. In fact, ML-KEM only agrees on a key; what is sent is still encrypted with a symmetric algorithm such as AES.

Hashes: SHA-256, SHA-384 and SHA-512

There are two things you can ask of a hash, and Grover affects each of them differently.

  • Inverting it (finding a text that produces a given hash value) is a blind search, so Grover speeds it up just as it does with keys: SHA-256 goes from 2256 tries to about 2128, and SHA-512 to about 2256. Out of reach in every case.
  • Finding a collision (any two texts with the same hash value) already takes only about 2128 tries on an ordinary computer for SHA-256, because of the birthday paradox. The quantum algorithm of Brassard, Høyer and Tapp (1998) lowers that in theory to about 285, but it needs a quantum memory of that same size. Daniel J. Bernstein calculated in 2009 that, once that memory is counted, it costs more than searching for collisions with many ordinary computers in parallel.

In fact, NIST places a SHA-256 collision above an AES-128 key search in its categories, and SHA-256 remains secure. SHA-384 and SHA-512 give more margin, and they are the ones the NSA requires. What makes MD5 and SHA-1 insecure are classical attacks that already exist: breaking them takes no quantum computer at all.

And your password

A password is a key you choose yourself, so in theory Grover affects it too: guessing a password with the strength of k bits would take about 2k/2 steps instead of 2k. But here each step is far more expensive than one run of AES.

On Cifrar Online, the key is derived from your password with Argon2id, which by default uses 64 MiB of memory for each try. To apply Grover to it, the quantum computer would have to compute the whole of Argon2id inside the circuit, on all the passwords at once. That memory depends on the password, so it cannot sit in ordinary memory: it would have to be held in qubits (64 MiB is about 537 million bits, against the 3,000 logical qubits of the attack on AES-128) or recomputed over and over, making each step longer still. This is our own reasoning: we have not found any published estimate of what Grover would cost against full Argon2id.

What does not change is the usual advice: an ordinary computer guesses a short or common password long before a quantum one is needed. Use a long, random passphrase, for example six words picked at random from a list of 7,776, like those of Diceware, and do not reuse it. Even if Grover could be used against it, it would take hundreds of billions of Argon2id derivations, one after another, inside the quantum computer. You can create one with the password generator.

“Harvest now, decrypt later”

This is why the migration cannot wait: someone records encrypted communications today and keeps them until they have a quantum computer. NIST itself lists it among the reasons for urgency.

What is at risk is anything that depends on a classical key agreement, such as an HTTPS connection whose key was agreed with X25519 alone, or an email encrypted to an RSA key: with Shor, the key could be extracted from the recording and, with it, the content. What is not at risk is a text encrypted with a 256-bit symmetric algorithm and a strong password: there is no public key to break (as long as the password has not been sent over a channel protected only by classical public-key cryptography), and the best known quantum attack against it is Grover.

Where quantum computers stand today

In late 2024, Google's 105-qubit Willow chip showed that error correction improves as the code grows, a step that had been pursued for almost 30 years. In July 2026, IBM and the University of Chicago ran a computation on 70 logical qubits, with 2,415 logical operations between pairs of qubits and 468 T gates, in about 15 minutes. The progress is real and fast.

But no machine comes anywhere near what Shor requires yet, and Grover against AES-128 needs on the order of 286 T gates, a 26-digit number, against the 468 of that experiment. Nobody knows when the first machine able to break RSA or elliptic curves will arrive: Google has set itself 2029 to complete its own migration, and NIST will stop allowing RSA and elliptic curves in its standards after 2035. The sensible course is to take Shor seriously and not to worry about AES-256.

What does it mean on Cifrar Online?

In the algorithm picker, AES, XChaCha20, XSalsa20, Serpent, Twofish, Rijndael-256, SHA-384 and SHA-512 carry the “Post-quantum” badge. For a symmetric cipher it means that it uses (or, in the case of AES, allows) a 256-bit key, which keeps about 128 bits of security against Grover, and that no quantum attack better than Grover is known against it. For AES, NIST says so; for the others, no better attack has been published, as far as we know. It does not mean that they belong to NIST's post-quantum family, which is public-key: they are the ciphers that family still needs. For SHA-384 and SHA-512 it indicates that their hash value is long and leaves margin against the Brassard, Høyer and Tapp algorithm as well.

The default settings, AES-256-GCM with the key derived from your password with Argon2id, withstand all known quantum attacks, as do XChaCha20-Poly1305 and XSalsa20-Poly1305. Their weak point, if they have one, is the password. The text and the key never leave your browser, so there is nothing to capture on the way either.

The classic settings do not pass the password through Argon2id, so a weak password matters even more there, with or without a quantum computer, and the text and the key also travel to the server over HTTPS. Use them only to decrypt old texts.

Your connection to this site is protected too: recent browsers agree on the HTTPS key with X25519 combined with the post-quantum algorithm ML-KEM, as we explain in Diffie-Hellman.

And if you want to know how we protect your data, see Security.