# Is AES-256 quantum-safe? And AES-128, RSA-4096, ECC and SHA-256?

> AES-256 and AES-128 are quantum-safe; RSA and ECC are not at any key size. Grover vs Shor, NIST and NSA positions, and what data is actually at risk.

Source: https://pqshift.dev/learn/is-aes-256-quantum-safe · Published 2026-12-04 · Updated 2026-12-04 · pqshift

AES-256 is quantum-safe, and so is AES-128 by NIST's assessment. RSA and elliptic-curve cryptography are not safe at any key size: RSA-4096, P-384 and Ed25519 all fall to Shor's algorithm, and a bigger key only makes the attack somewhat larger. SHA-256 and SHA-3 are fine. What's at risk is public-key cryptography, plus any data encrypted with AES under a key that was exchanged using RSA or ECDH.

## The short table

| Algorithm | Quantum attack | Verdict | What NIST and NSA say |
|---|---|---|---|
| AES-256 | Grover (search) | Safe | NIST Category 5; required by CNSA 2.0 |
| AES-128 | Grover (search) | Safe per NIST | NIST Category 1, stays approved; CNSA 2.0 wants 256-bit keys |
| SHA-256, SHA3-256 | Grover-type search | Safe | Stay approved |
| SHA-384, SHA-512 | Grover-type search | Safe | Required by CNSA 2.0 |
| RSA-2048, 3072, 4096 | Shor (factoring) | Broken by a large quantum computer | Deprecated after 2030, disallowed after 2035 |
| ECDH, ECDSA (P-256, P-384), X25519, Ed25519 | Shor (discrete log) | Broken by a large quantum computer | Deprecated after 2030, disallowed after 2035 |
| ML-KEM, ML-DSA, SLH-DSA | No known efficient attack | Designed to be safe | The replacements (FIPS 203, 204, 205) |

## Why AES survives: Grover doesn't parallelize

Grover's algorithm speeds up brute-force search quadratically, which is where the common "AES-256 becomes AES-128" line comes from. In practice it's worse for the attacker than that sounds. NIST's FAQ notes that "all the steps of Grover's algorithm must be performed in series", so you can't split the work across many machines without giving up most of the speedup. NIST concludes Grover "will provide little or no advantage in attacking AES" and that "AES 128 will remain secure for decades to come."

The best published circuit estimates agree. Jaques, Naehrig, Roetteler and Virdia (Eurocrypt 2020) costed a Grover key search on AES under a limit on how long a quantum computation can run:

| Target | Gates, no depth limit | Gates, depth limited to 2^40 | Logical qubits per instance |
|---|---|---|---|
| AES-128 | about 2^83 | about 2^117 | 3,329 |
| AES-256 | about 2^148 | about 2^245 | 6,913 |

With the depth limit, the AES-128 attack needs about 2^69 machines running in parallel. That's why NIST IR 8547 keeps AES-128, AES-192 and AES-256 approved and says NIST does "not expect to need to transition away from these standards as part of the PQC migration." Only 112-bit symmetric security is dropped, in 2030, as already planned.

Not every agency words it this way. Europol's 2026 harvest-now-decrypt-later report repeats the "Grover halves the bit strength" rule of thumb and recommends AES-256 where possible. The NSA requires 256-bit keys for national security systems regardless. If you're choosing today, AES-256 costs almost nothing extra, so pick it. You don't have an emergency if you're on AES-128.

## Why RSA-4096 doesn't help

Shor's algorithm factors integers and computes discrete logarithms in polynomial time, so doubling the key size doesn't double the attacker's work exponentially. It adds a modest constant factor. Gidney and Ekerå's 2019 estimates, the last ones published for every RSA size, scale like this:

| RSA modulus | Physical qubits | Time per run (Table 3) |
|---|---|---|
| 2048 | 20 million | 5 hours |
| 3072 | 38 million | 12 hours |
| 4096 | 55 million | 22 hours |

So RSA-4096 costs a quantum attacker roughly 2.75 times the qubits and four times the time of RSA-2048. And the numbers keep falling: Gidney's May 2025 paper puts RSA-2048 at "less than a million noisy qubits" in under a week.

The NSA's CNSA 2.0 FAQ answers the question directly. Asked "Can I continue to use larger sizes of RSA or ECC to address the threat?", it says: "No. RSA and Elliptic Curve Cryptography are the main algorithms that need to be replaced to achieve quantum resistance."

## ECC is the easier target

Elliptic-curve keys are much smaller than RSA keys for the same classical strength, and that also makes them cheaper to attack with Shor. A March 2026 paper from Google researchers (Babbush, Gidney, Boneh and others) estimates that a 256-bit elliptic-curve discrete log needs fewer than 1,200 logical qubits and under 90 million Toffoli gates, running "in minutes using fewer than half a million physical qubits." That covers X25519, Ed25519, P-256 and secp256k1. P-384 is somewhat larger, but it's the same polynomial story.

This is why the first thing to migrate is **key exchange**: the ECDH or RSA step that sets up the AES key in TLS, SSH and VPNs.

## So is my AES-encrypted data safe?

That depends on how the AES key got where it is.

- **Data at rest under a key that never crossed a network with RSA or ECDH** (a disk key in a KMS or HSM, a key derived from a password, a pre-shared key): safe from quantum attack, as far as anyone knows.
- **Data sent over TLS, SSH or a VPN whose key exchange was RSA or ECDH**: the AES key can be recovered from a recording of the handshake once a large quantum computer exists. That's [harvest now, decrypt later](https://pqshift.dev/learn/harvest-now-decrypt-later). Europol calls TLS 1.2 with RSA key transport "the most exposed configuration".
- **Keys wrapped with RSA-OAEP or ECIES** (envelope encryption, some KMS flows): the wrapped key is exposed the same way. See [replacing RSA key wrapping with ML-KEM](https://pqshift.dev/learn/replace-rsa-key-wrapping-ml-kem).

The fix for the second case is hybrid key exchange, which most stacks support now: [X25519MLKEM768](https://pqshift.dev/learn/x25519mlkem768-explained) in TLS 1.3 and `mlkem768x25519-sha256` in [SSH](https://pqshift.dev/learn/post-quantum-ssh-openssh).

## Did the December 2026 news change any of this?

No primary source we have read reports a new attack on AES or on classical ECC. Anthropic's November 30 lattice papers say their results "are asymptotic, and the algorithms are not practical for the parameter sets of ML-KEM and ML-DSA", and don't concern AES, RSA or ECC. The independent review group (CIRG) says the attack "falls far short of compromising the current NIST standards." The NSA's December 2 statement urges an immediate move to post-quantum cryptography without naming a broken algorithm. More on that in [the December 2026 NSA advisory](https://pqshift.dev/learn/nsa-pqc-advisory-december-2026).

## What to check in your own code

Search for the public-key operations rather than for AES. The patterns that matter are TLS configs that pin classical groups (`CurvePreferences`, `ssl_ecdh_curve`, `-groups`), SSH `KexAlgorithms` lists without ML-KEM, RSA-OAEP or ECDH key wrapping, and runtimes too old to offer the hybrid groups. pqshift scans a repository for exactly those and opens pull requests that add the hybrid post-quantum option, keeping the classical fallback, with a CI handshake proving the change works.

## FAQ

### Is AES-256 quantum-safe?

Yes. NIST rates AES-256 at its highest post-quantum security category and the NSA requires it in CNSA 2.0. Grover's algorithm gives little practical advantage because its steps must run in series.

### Is AES-128 quantum-safe?

According to NIST, yes: NIST IR 8547 keeps AES-128 approved and NIST's FAQ says AES-128 will remain secure for decades. The NSA still requires 256-bit keys for national security systems.

### Is RSA-4096 quantum-safe?

No. Shor's algorithm breaks RSA at any key size; RSA-4096 needs only a few times more quantum resources than RSA-2048. The NSA says larger RSA or ECC keys do not address the threat.

### Is elliptic-curve cryptography (ECC) quantum-resistant?

No. X25519, Ed25519, P-256 and P-384 all fall to Shor's algorithm, and 256-bit curves are cheaper to attack than RSA-2048. Replace ECDH with hybrid ML-KEM key exchange first.

### Is SHA-256 quantum-safe?

Yes. NIST keeps SHA-256, SHA-512 and SHA-3 approved; CNSA 2.0 requires SHA-384 or SHA-512 for national security systems.

## Sources

- [NIST IR 8547 (final), PDF: Transition to Post-Quantum Cryptography Standards](https://nvlpubs.nist.gov/nistpubs/ir/2026/NIST.IR.8547.pdf)
- [NIST post-quantum cryptography FAQ (Grover and AES)](https://csrc.nist.gov/projects/post-quantum-cryptography/faqs)
- [NSA CNSA 2.0 FAQ](https://media.defense.gov/2022/Sep/07/2003071836/-1/-1/0/CSI_CNSA_2.0_FAQ_.PDF)
- [Jaques, Naehrig, Roetteler, Virdia: Implementing Grover oracles for quantum key search on AES and LowMC (Eurocrypt 2020)](https://arxiv.org/abs/1910.01700)
- [Gidney and Ekerå: How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits (2019)](https://arxiv.org/abs/1905.09749)
- [Gidney: How to factor 2048 bit RSA integers with less than a million noisy qubits (2025)](https://arxiv.org/abs/2505.15917)
- [Babbush, Gidney, Boneh et al.: resource estimates for 256-bit elliptic-curve discrete logarithms (2026)](https://arxiv.org/abs/2603.28846)
- [Europol: Harvest now, decrypt later (2026)](https://www.europol.europa.eu/cms/sites/default/files/documents/Harvest-now-decrypt-later.pdf)
- [CIRG statement on the November 2026 lattice results](https://cirg.org/statements/1/)
