Symmetric Cryptography Quantum Safety
The most misunderstood topic in quantum migration: AES-256 does NOT need to be replaced. AES-128 does. Here is the complete picture.
AES-256
✅ Safe. 128-bit quantum security. No migration needed.
AES-128
⚠️ Weakened. 64-bit quantum security. Upgrade for 10+ year data.
SHA-256 / SHA-3
✅ Safe. 128-bit quantum security. No migration needed.
3DES / DES
🚨 Deprecated. Broken classically — migrate immediately.
ChaCha20-Poly1305
✅ Safe. 256-bit key = 128-bit quantum security.
SHA-1 / MD5
🚨 Deprecated. Broken classically — migrate immediately.
How Grover's Algorithm Affects Symmetric Cryptography
Grover's algorithm is a quantum search algorithm that searches an unsorted database of N items in O(√N) time rather than O(N) classically. Applied to symmetric cryptography, it provides a quadratic speedup for brute-force key search.
For a key of size n bits, Grover's algorithm searches all 2ⁿ possible keys in approximately 2^(n/2) quantum operations. This halves the effective bit security — a 256-bit key has 128-bit quantum security, a 128-bit key has 64-bit quantum security.
Why this is not as bad as it sounds
Complete Symmetric Algorithm Quantum Safety Table
| Algorithm | Key/Output Size | Classical Security | Quantum Security | Status | Action Required |
|---|---|---|---|---|---|
| AES-256 | 256-bit key | 256 bits | 128 bits | SAFE | None. Preferred for all new implementations. |
| AES-192 | 192-bit key | 192 bits | 96 bits | SAFE | Acceptable. Migrate to AES-256 for highest security requirements. |
| AES-128 | 128-bit key | 128 bits | 64 bits | WEAKENED | Upgrade to AES-256 for data with 10+ year secrecy requirement. Acceptable for short-lived session data. |
| ChaCha20-Poly1305 | 256-bit key | 256 bits | 128 bits | SAFE | None. Strong quantum resistance. Preferred for mobile/embedded contexts. |
| Salsa20 | 256-bit key | 256 bits | 128 bits | SAFE | None. |
| 3DES (Triple DES) | 112-bit effective key | 112 bits | 56 bits | DEPRECATED | Migrate immediately. Broken classically (Sweet32, BEAST). Not a quantum problem — a classical one. |
| DES | 56-bit key | 56 bits | 28 bits | DEPRECATED | Migrate immediately. Should not exist in any modern system. |
| RC4 | 40–2048-bit key | Effectively broken | N/A | DEPRECATED | Migrate immediately. Multiple practical attacks exist classically. |
| SHA-256 | 256-bit output | 128-bit collision resistance | ~128-bit preimage (acceptable) | SAFE | None. Standard for most applications. |
| SHA-384 | 384-bit output | 192-bit collision resistance | ~192-bit preimage | SAFE | Preferred for sensitive long-term applications. |
| SHA-512 | 512-bit output | 256-bit collision resistance | ~256-bit preimage | SAFE | Highest quantum security for hash functions. |
| SHA-512/256 | 256-bit output | 128-bit collision resistance | ~128-bit preimage | SAFE | Good balance — truncated SHA-512 is faster on 64-bit systems than SHA-256. |
| SHA-3-256 | 256-bit output | 128-bit collision resistance | ~128-bit preimage | SAFE | Different construction from SHA-2 — useful as diversity backup. |
| SHA-3-512 | 512-bit output | 256-bit collision resistance | ~256-bit preimage | SAFE | Highest security. Different algorithm family from SHA-2. |
| SHA-1 | 160-bit output | Effectively broken | N/A | DEPRECATED | Migrate immediately. SHAttered collision attack (2017). Classic vulnerability — not quantum. |
| MD5 | 128-bit output | Effectively broken | N/A | DEPRECATED | Migrate immediately. Collision attack demonstrated 1996. |
| MD4 | 128-bit output | Broken | N/A | DEPRECATED | Migrate immediately. Should not exist in any modern system. |
| BLAKE2b | 256/512-bit output | ~128–256 bits | ~128–256 bits (halved) | SAFE | Good performance with strong security. No migration needed. |
| BLAKE3 | 256-bit output | ~128 bits | ~128 bits | SAFE | Fastest modern hash. Quantum safe at 256-bit output. |
| HMAC-SHA256 | Depends on key | 256 bits | 128 bits | SAFE | None. Used for message authentication — quantum safe. |
| HMAC-SHA512 | Depends on key | 512 bits | 256 bits | SAFE | None. Highest security for MACs. |
| Poly1305 (MAC) | 128-bit tag | ~128 bits | ~64 bits | ACCEPTABLE | Short-lived MACs (TLS records) — acceptable. For long-term authentication codes, prefer HMAC-SHA256. |
| Argon2id (password) | Variable (cost-based) | Cost function dominates | Cost function dominates | SAFE | Memory-hard functions resist quantum parallelism. No migration needed. |
| bcrypt (password) | Cost-factor based | Cost function dominates | Cost function dominates | SAFE | None. Memory-hard — resistant to quantum parallelism. |
| scrypt (password) | Cost-factor based | Cost function dominates | Cost function dominates | SAFE | None. |
AES Encryption Modes — Quantum Considerations
The mode of operation matters beyond just key size. Some modes have additional quantum vulnerabilities due to nonce reuse or authentication tag weaknesses.
| Mode | Authentication | Nonce Safety | Quantum Status | Recommendation |
|---|---|---|---|---|
| AES-256-GCM | AEAD — authenticated | Nonce reuse breaks confidentiality AND authenticity | Safe with AES-256 key. Nonce reuse is a critical classical vulnerability — use random 96-bit nonces. | Preferred for most applications. Use AES-256, not AES-128-GCM. |
| AES-256-GCM-SIV | AEAD — nonce-misuse resistant | Nonce reuse safe (confidentiality preserved) | Safer than standard GCM in high-volume systems where nonce uniqueness is hard to guarantee. | Preferred when nonce uniqueness cannot be guaranteed (e.g., distributed systems). |
| AES-256-CCM | AEAD — authenticated | Nonce must be unique | Safe with AES-256. Used in constrained environments (IoT, 802.11i). | Acceptable for constrained environments. Prefer GCM in general. |
| AES-256-CBC | No authentication | IV reuse leaks plaintext | Safe with AES-256 but no authentication. Must pair with HMAC. | Use only with HMAC-SHA256. Prefer AEAD modes (GCM) for simplicity. |
| AES-256-CTR | No authentication | Nonce reuse breaks confidentiality | Safe for confidentiality. No authentication. | Pair with HMAC. Prefer GCM for AEAD. |
| AES-128-GCM | AEAD | Nonce reuse critical | Weakened. 64-bit quantum security on key. | Upgrade to AES-256-GCM for long-term data. |
| AES-256-ECB | None | N/A — deterministic | Safe key size but ECB leaks patterns in data. | Never use ECB. Deterministic encryption reveals patterns across blocks. |
| ChaCha20-Poly1305 | AEAD | Nonce reuse breaks both | Safe. 256-bit key, 128-bit quantum security. | Preferred for mobile, embedded, and non-AES-NI environments. |