Is It Post-Quantum? Every Algorithm in Your Stack, Rated
One lookup table for RSA, ECDH, X25519, Ed25519, BLS, AES, SHA-256, HMAC and the NIST replacements, derived from what Shor and Grover actually accelerate.
Prerequisite: Post-Quantum Security
“Is X post-quantum?” has a short answer for every primitive in a modern stack, and the answers divide cleanly into three groups: broken with no fix, weakened but usable at a larger size, and already safe. This page is the lookup table, then the reasoning that produces it.
For the deadlines that turn this into a schedule, see the PQC migration checklist. For why lattices are the replacement of choice, see 2.7 Post-quantum security.
Two rules decide every entry
Almost nothing in the table below needs a separate analysis. Two facts about quantum algorithms, applied to what each primitive is built on, produce the whole picture.
- Rule 1 — Shor breaks anything built on factoring or discrete logs
Shor's algorithm (1994) reduces factoring and discrete logarithms to period finding, which a quantum computer solves with the quantum Fourier transform in time polynomial in the bit length of the modulus or group order. RSA is factoring. Classical Diffie–Hellman is a discrete log in . ECDH, ECDSA, EdDSA and secp256k1 are discrete logs on an elliptic curve group. Pairing-based constructions — BLS signatures, BLS12-381, KZG commitments — are discrete logs in both the source and target groups, so they fall too.
The important consequence is that parameters do not save you. RSA-4096 is broken for the same reason RSA-2048 is: the exponent in Shor's running time is a constant, not a function of the key size.
- Rule 2 — Grover halves the bits of anything built on search
Grover's algorithm (1996) searches unstructured possibilities in about quantum steps, and that quadratic speedup is optimal. Symmetric ciphers and hash functions reduce to exactly this shape: guess the key, or guess the preimage. So AES-256 goes from 256 bits to about 128, and SHA-256 preimages from to .
Halved is still usable. This is why symmetric cryptography is often described as post-quantum-ready: the fix is to use the larger key size, not a new algorithm.
- The exception — collisions lose a third, not a half
Collision finding is not unstructured search: the Brassard–Høyer–Tapp algorithm (1998) uses a quantum walk over distinguished points to find a collision in about evaluations. For SHA-256 that is roughly , materially below the preimage bound. Anything whose security rests on collision resistance — certificate signatures, commitment schemes, Merkle trees where an attacker chooses both leaves — should move to SHA-384 or SHA-512 rather than rely on the halved figure.
The table
Strengths below are the ideal-model figures from the two rules. Real Grover cost is higher than , because the oracle has to be a reversible circuit for the target primitive and a practical attacker trades depth against width; the AES-128 row is the one where that gap matters most.
| Primitive | Used for | Quantum attack | Strength after a large quantum computer | Replacement |
|---|---|---|---|---|
| RSA-2048 / RSA-4096 | Encryption, signatures, certificates | Shor factors N = p·q in polynomial time | None. Key size is irrelevant. | ML-DSA-65 / FN-DSA-511 (signatures), ML-KEM-768 (key exchange) |
| Diffie–Hellman (mod p, 2048-bit) | Key exchange | Shor computes discrete logs in the multiplicative group mod p | None | ML-KEM-768, usually hybrid as X25519MLKEM768 |
| ECDH P-256 / P-384 | Key exchange | Shor computes elliptic-curve discrete logs | None | ML-KEM-768 / ML-KEM-1024 |
| X25519 | Key exchange (TLS, WireGuard, Noise) | Shor, via the curve discrete log | None | X25519MLKEM768 — chapter 3.8 covers every stack |
| ECDSA P-256 / secp256k1 | Signatures, TLS certificates, blockchains | Shor recovers the private key from the public key | None | ML-DSA-65, FN-DSA-511, SLH-DSA |
| Ed25519 / EdDSA | Signatures (SSH, TLS, Noise) | Shor, same discrete log | None | ML-DSA-44 or ML-DSA-65 |
| BLS12-381 signatures, KZG commitments | Aggregate signatures, zk-SNARK proofs | Shor breaks the pairing groups on both sides | None | ML-DSA for aggregation; hash-based or lattice commitments for ZK |
| AES-128 | Bulk encryption | Grover: quadratic search speedup | About 64 bits in the ideal model; practical Grover cost on the AES circuit is far higher | AES-256 — required by CNSA 2.0 for US national security systems |
| AES-256 | Bulk encryption | Grover | About 128 bits. Accepted. | Keep. No change needed. |
| ChaCha20-Poly1305 | Bulk encryption + MAC | Grover on the cipher key and on the Poly1305 authenticator key | About 128 bits. Accepted. | Keep. |
| SHA-256 | Hashing, HMAC, commitments, Merkle trees | Grover for preimages, Brassard–Høyer–Tapp for collisions | Preimage about 2¹²⁸; collision about 2⁸⁵ | Keep for most uses; SHA-384/512 where collision resistance is load-bearing |
| SHA-512 / SHA-384 | Hashing, signatures | Same bounds | Preimage about 2¹⁹²–2²⁵⁶; collision about 2¹²⁸–2¹⁷¹ | Keep. This is the CNSA 2.0 baseline. |
| SHA-1, MD5 | Legacy hashing | Already broken classically, before any quantum computer | None | Replace now, for classical reasons |
| HMAC-SHA-256 | Message authentication, KDFs, HKDF | Grover on the key | About 128 bits with a 256-bit key | Keep. |
| Argon2, scrypt, bcrypt | Password hashing | Grover over the password space, and the password space was already the weak part | Halved effective bits against the attacker’s dictionary | Keep, but the fix is password strength, not the KDF |
| One-time pad | Information-theoretic secrecy | No algorithmic attack exists to accelerate | Unconditional | Nothing to migrate |
| ML-KEM (FIPS 203) | Key encapsulation | No polynomial-time quantum algorithm known for Module-LWE | 128/192/256-bit levels | This is the replacement |
| ML-DSA (FIPS 204) | Signatures | None known for Module-LWE / Module-SIS | 128/192/256-bit levels | This is the replacement |
| FN-DSA / Falcon | Signatures, compact | None known for NTRU lattices | ~128 bits at Falcon-511 | This is the replacement |
| HQC | Key encapsulation, backup family | None known for quasi-cyclic syndrome decoding | 128/192/256-bit levels | NIST’s 2025 code-based backup to ML-KEM |
| SLH-DSA / SPHINCS+ (FIPS 205) | Signatures, hash-based | Only the hash bounds above apply | Depends on the underlying SHA-2 or SHAKE parameters | Conservative choice; signatures are 8–50 kB |
| LMS / XMSS | Signatures, stateful hash-based | Only the hash bounds above | As above | Firmware and root-of-trust signing, where state can be controlled |
Why key exchange migrates before certificates
The table marks a lot of things “none”, but they are not equally urgent, and treating them as one project is the most common planning error.
A key exchange produces a secret that protects data for as long as that data must stay secret. If an attacker records the handshake today and breaks X25519 in fifteen years, every byte of that session becomes readable then. This is harvest now, decrypt later, and it means the exposure exists today, not when the quantum computer arrives. Formalised as Mosca's inequality: you must migrate if X + Y > Z, where is migration time, is how long the data must stay secret, and is time until the threat arrives.
A signature is different. A certificate signature only has to resist forgery at the moment of the handshake; a recorded certificate is worthless to an attacker who cannot forge a fresh one now. So RSA and ECDSA certificates can be replaced on their normal rotation schedule, while key exchange cannot wait. This is why hybrid TLS key exchange ships years before post-quantum certificates, and why the signature-size budget problem — 3.3 kB ML-DSA signatures against 64-byte Ed25519 ones — is a separate and later migration.
Symmetric cryptography: how much doubling is enough
AES-256 and SHA-512 survive with roughly 128 and 256 bits respectively, and nothing needs replacing. The contested row is AES-128, where the ideal Grover bound is 64 bits.
In practice 64 bits understates AES-128's quantum security. Running Grover against AES requires a reversible circuit for AES-128 with roughly 6,800 T-gates and depth in the thousands, and an attacker who wants to finish in reasonable wall-clock time must run many independent Grover instances, each needing its own full-width circuit. Cost models that account for this put AES-128 substantially above the naive halving. NIST continues to treat AES-128 as acceptable, while CNSA 2.0 requires AES-256 for US national security systems.
The engineering conclusion is cheap: there is no performance reason left to prefer AES-128 for long-lived secrets, so use AES-256 and stop thinking about it. The same argument, applied to collision resistance rather than key size, is what pushes SHA-256 to SHA-384 or SHA-512 in high-assurance settings.
There is no post-quantum RSA
This comes up constantly, because RSA is a drop-in interface: a key pair, sign, verify, encrypt. There is no parameter change that makes it quantum-safe, because factoring is in BQP. Multivariate variants, RSA with a different padding, and “quantum-resistant RSA” marketing all fail for the same reason — the hard problem is still factoring.
What replaces it is a different hard problem. The three families NIST standardised are lattices (ML-KEM, ML-DSA, FN-DSA), error-correcting codes (HQC), and hash functions (SLH-DSA). The isogeny family was the fourth serious candidate and is a useful cautionary tale: SIKE was broken in 2022 by Castryck and Decru with a classical attack that runs in about an hour on a single core. It was never defeated by a quantum computer. Post-quantum is a necessary property, not a sufficient one, and the amount of classical cryptanalysis a family has absorbed is the better predictor of whether it will still be standing in a decade.
Check your own stack
The table is only useful once you know which rows you are on. A fast first pass:
# Which key exchange and which signature does a live endpoint actually use?
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
| grep -E 'Protocol|Cipher|Peer Temp Key|Negotiated TLS1.3 group|Server public key'
# What is in the certificate chain? RSA and ECDSA both break under Shor.
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null 2>/dev/null \
| openssl crl2pkcs7 -nocrl -certfile /dev/stdin \
| openssl pkcs7 -print_certs -noout
# SSH host and user keys on this machine.
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
for f in ~/.ssh/*.pub; do ssh-keygen -lf "$f"; done
# Pinned groups that silently opt a server out of the hybrid.
grep -rn "ssl_ecdh_curve\|CurvePreferences\|ecdh_curves\|curves" /etc/nginx /etc/haproxy ./src 2>/dev/nullThen grep the dependency tree, not just the edge. The usual surprises are a database connector doing its own TLS with a pinned curve, a signing service on ECDSA that everything else trusts, and a commitment scheme inside a proof system that uses a pairing.
Short answers
- Is Ed25519 post-quantum?
- No. Ed25519 is EdDSA over Curve25519, and its security is an elliptic-curve discrete logarithm. Shor recovers the private key from the public key. Replace with ML-DSA-44 or ML-DSA-65. Note that X25519, the key exchange on the same curve, breaks for the same reason — the two are usually migrated together as X25519MLKEM768 plus an ML-DSA certificate.
- Is AES-256 post-quantum?
- Yes, at about 128 bits after Grover. No change needed. AES-128 is the debatable one, at an idealised 64 bits, and AES-256 is what CNSA 2.0 requires.
- Is SHA-256 post-quantum?
- For preimages, yes at about . For collisions, it drops to about , which is where SHA-384 or SHA-512 becomes the better choice. HMAC-SHA-256 with a 256-bit key stays at roughly 128 bits.
- Is RSA post-quantum at 8192 bits?
- No. Shor's cost is polynomial in , so larger moduli only change the constant. RSA has no post-quantum parameter setting at any size.
- Are BLS signatures and KZG commitments post-quantum?
- No. Both rest on pairings over BLS12-381, and both sides of the pairing are discrete-log groups. Aggregate signature schemes and pairing-based proof systems need replacing, and there is no drop-in: see threshold lattice signatures and post-quantum commitments.
- Does forward secrecy protect recorded traffic?
- Not against a broken key exchange. Forward secrecy means a stolen long-term key cannot decrypt past sessions; it says nothing about the session key itself being recoverable from the recorded handshake. Hybrid key exchange is the fix.
Check Your Understanding
Q1. An adversary records ten years of your TLS traffic today. Which part of it can they read once a large quantum computer exists?
Q2. Why does SHA-256 lose more collision resistance than preimage resistance against a quantum adversary?
Q3. A vendor offers a post-quantum replacement for RSA signatures based on isogenies between supersingular elliptic curves. What is the most useful question to ask?
Sources
- Peter Shor, Algorithms for Quantum Computation: Discrete Logarithms and Factoring (1994).
- Lov Grover, A Fast Quantum Mechanical Algorithm for Database Search (1996).
- Gilles Brassard, Peter Høyer, Alain Tapp, Quantum Cryptanalysis of Hash and Claw-Free Functions (1998) — the collision bound.
- Wouter Castryck, Thomas Decru, An efficient key recovery attack on SIDH (2022) — the classical break of SIKE.
- NIST, FIPS 203, FIPS 204, FIPS 205; NIST IR 8547 (initial public draft, November 2024) for the deprecation timeline.
- NSA, CNSA 2.0 — AES-256, SHA-384/512, ML-KEM-1024 and ML-DSA-87 for US national security systems.
- See also 5.1 Key papers for the primary sources behind the lattice replacements.