Shor's vs Grover's algorithm: what each one means for crypto
Two quantum algorithms come up in almost every discussion of crypto and quantum computers: Shor's and Grover's. They are often mentioned together, but they do very different things. Shor's algorithm would break the keys that prove who owns a coin. Grover's algorithm would only make brute-force guessing faster, which weakens hashing and mining a little rather than breaking them. This page explains the difference without maths and what it means for a holder. Sources were read on 4 December 2026. It is general information, not financial advice.
The short version
- Shor's algorithm breaks the maths behind RSA and elliptic-curve keys. That covers the signatures almost every blockchain uses today, such as ECDSA, Schnorr and Ed25519.
- Grover's algorithm gives a square-root speed-up on blind search. It weakens hash functions such as SHA-256 and ciphers such as AES, but standard sizes stay usable.
- That is why the quantum risk for crypto sits in wallet and validator signatures, not in mining or in hashing.
- Hash-based signatures rely only on hash functions, so they avoid the part Shor's algorithm breaks. Their cost is larger signatures, and for some schemes careful key management.
- No quantum computer today can run either attack against real crypto keys or hashes. See what is a quantum computer.
Two algorithms, two kinds of problem
Peter Shor published his algorithm in 1995. His paper gives efficient methods, on a large enough quantum computer, for two problems: factoring large numbers and computing discrete logarithms. Ordinary computers are believed to need an impractically long time for both, and that difficulty is what public-key cryptography relies on.
Lov Grover published his algorithm in 1996. His example is finding one name in an unsorted list of N entries. An ordinary computer needs about N/2 lookups on average; Grover's method needs about the square root of N steps. It works on any problem where the only way forward is to try answers until one fits, but it does not find a shortcut through the maths.
The difference in scale is the whole story:
- Shor's algorithm turns a problem that is believed to be out of reach for ordinary computers into one a large quantum computer could solve efficiently. The security is gone, not reduced.
- Grover's algorithm turns a search of 2 to the power 256 tries into about 2 to the power 128 quantum steps, the figure the Bitcoin wiki gives for reversing a SHA-256 hash. That is still far beyond any computer.
NIST's 2016 report on post-quantum cryptography sums it up in one table. RSA, ECDSA, ECDH and DSA are marked "no longer secure" against a large quantum computer. AES needs larger keys, and the SHA-2 and SHA-3 hash functions need larger outputs.
Where Shor's algorithm hits crypto
Most blockchains prove ownership with elliptic-curve signatures. Bitcoin uses ECDSA and Schnorr on the secp256k1 curve. Ethereum accounts use ECDSA on the same curve, and its validators use BLS signatures. Many newer chains use Ed25519. All of these rest on the discrete logarithm problem, which is exactly what Shor's algorithm solves.
In practice that means:
- Wallet keys. Anyone who can see your public key could, with a large enough quantum computer, work out your private key and sign a transaction as you. The UK's National Cyber Security Centre (NCSC) lists ECDSA, EdDSA and ECDH among the algorithms that such a machine would threaten.
- Validator keys. Proof-of-stake chains rely on validators signing votes and blocks. Those signatures use the same kind of maths, so they need replacing too. Our methodology rates this as a separate factor, Validator / consensus.
- Timing. Shor's algorithm needs the public key. On Bitcoin, the wiki notes that a key is normally revealed only when coins are spent, which is why address reuse and old output types matter. See how much bitcoin is exposed.
How big a machine would it take? Google Quantum AI and co-authors estimated in March 2026 that breaking a 256-bit elliptic-curve key could take under 1,450 logical qubits, or fewer than half a million physical qubits on superconducting hardware, running in minutes. No machine of that size exists. Our Q-Day estimates compared puts this beside other estimates.
Where Grover's algorithm hits crypto
Hashing is everywhere in a blockchain: in mining, in addresses, in linking blocks together and in Merkle trees. Grover's algorithm affects all of it, but only modestly.
- Mining. Proof of work is a guessing race, so Grover's speed-up applies in principle. A 2017 paper by Divesh Aggarwal and co-authors judged Bitcoin's proof of work relatively resistant to quantum speed-up for about ten years, while calling its signatures much more at risk. The full argument, including how quantum miners compare with ASICs, is in can quantum computers mine Bitcoin?
- Reversing a hash. Finding an input that matches a given 256-bit hash falls from about 2 to the power 256 tries to about 2 to the power 128 quantum steps. That still leaves a very large margin.
- Finding collisions. A related method by Brassard, Høyer and Tapp (1997) finds two inputs with the same hash in roughly the cube root of the number of possible outputs, rather than the square root an ordinary computer needs. Hedera cites this in its own planning and says its SHA-384 hashing keeps about 128 bits of security.
- Encryption. Grover's method also applies to symmetric ciphers such as AES, used for example to encrypt wallet files. NIST's FAQ says Grover's algorithm will give little or no advantage against AES, and that AES with 128, 192 or 256-bit keys can still be used.
The NCSC reaches the same view: symmetric cryptography and hash functions such as SHA-256 are not significantly affected by quantum computers.
Why is Grover's speed-up smaller in practice than on paper? NIST's FAQ gives two reasons. Quantum hardware is likely to cost more to build and run than ordinary hardware. And the full speed-up needs every step to run one after another, so splitting the search across many machines gains less than it would for an ordinary search.
Why hash-based designs are the safer part
Because Grover's algorithm only weakens hashes, anything that depends on hashes alone keeps a large safety margin. Two consequences matter for crypto.
- Hash-based signatures. NIST's guidance on stateful hash-based signatures (SP 800-208, covering XMSS and LMS) says their security depends only on the security of the underlying hash functions, and that hash functions are not expected to be broken by large quantum computers. NIST's stateless standard, SLH-DSA (FIPS 205), likewise rests on the difficulty of reversing hash functions and is designed to resist a large quantum computer.
- Hash-based proof of work. Mining that relies on hashing is far less exposed than signing. Our methodology treats hash-based proof of work as quantum-safe on the Validator / consensus factor, while wallet signatures on the same chains are still classical.
There are trade-offs. Hash-based signatures are large: the smallest SLH-DSA parameter set in FIPS 205 produces 7,856-byte signatures, against 64 bytes for a Bitcoin Schnorr signature under BIP-340. Stateful schemes such as XMSS add a rule: NIST says each one-time key must never sign more than one message, so the wallet has to keep count. QRL is built on XMSS, which its homepage describes as the scheme securing the network. The hash-based schemes page lists the chains we track that use XMSS, WOTS+ and similar schemes.
Lattice-based schemes such as ML-DSA and Falcon are the other main family of replacements. They are not hash-based, but they are not built on the problems Shor's algorithm solves either. Post-quantum signatures explained compares both families, and NIST's standards explained for crypto covers which ones are finished.
A quick map: which algorithm hits what
- Wallet signatures (ECDSA, Schnorr, Ed25519): Shor's algorithm. Broken by a large enough quantum computer.
- Validator signatures (for example BLS, Ed25519): Shor's algorithm. Broken in the same way.
- Key exchange for network connections (ECDH): Shor's algorithm. Broken, which is the basis of harvest now, decrypt later.
- Mining and proof of work (SHA-256 and other hashes): Grover's algorithm. Speed-up only, and limited in practice.
- Addresses that are hashes of public keys: Grover's algorithm on the hash. The key behind them is protected until it is revealed.
- Wallet file encryption (AES): Grover's algorithm. Standard key sizes stay usable.
- Hash-based signatures (XMSS, SLH-DSA): Grover's algorithm only. Designed to resist a large quantum computer.
What this means for a holder
- When you read that quantum computers could break Bitcoin, the claim is about signatures and Shor's algorithm. Faster quantum mining is a separate and much smaller issue.
- The question for any chain is whether its signatures, for wallets and for validators, can move to a quantum-safe scheme in time. Our rankings and the migration map show where each chain stands on exposure and upgrade plans.
- A chain that calls itself quantum-safe should say which scheme it uses and where. Quantum-safe vs quantum-resistant vs post-quantum explains how to read such claims.
- Practical steps, such as avoiding address reuse, are in how to protect your crypto. Short definitions of both algorithms are in the glossary.
Sources
- arxiv.org ↗
- arxiv.org ↗
- arxiv.org ↗
- nvlpubs.nist.gov ↗
- csrc.nist.gov ↗
- ncsc.gov.uk ↗
- nvlpubs.nist.gov ↗
- nvlpubs.nist.gov ↗
- arxiv.org ↗
- arxiv.org ↗
- en.bitcoin.it ↗
- hedera.com ↗
- theqrl.org ↗
- raw.githubusercontent.com ↗
General information, not financial or security advice. Spot an error? Email [email protected].