Post-Quantum Cryptography
debt(d9/e7/b7/t9)
Closest to 'silent in production until users hit it' (d9). detection_hints.automated is 'no' — no tool flags RSA/ECC usage as quantum-vulnerable; the risk is invisible until quantum computers exist or harvest-now-decrypt-later attacks succeed years later.
Closest to 'cross-cutting refactor across the codebase' (e7). quick_fix describes migrating to hybrid encryption across all cryptographic touchpoints — key exchange, signatures, certificate chains — touching every place crypto is used, not a single component.
Closest to 'strong gravitational pull' (b7). Crypto algorithm choices applied across web/cli contexts shape protocols, key storage, certificate handling; common_mistakes notes hard-coded algorithm choices make future migration difficult — crypto-agility burden affects every change.
Closest to 'catastrophic trap' (t9). The misconception is precisely that PQC is irrelevant until quantum computers exist — the 'obvious' wait-and-see approach is always wrong because harvest-now-decrypt-later means today's RSA-encrypted long-lived secrets are already compromised.
Also Known As
TL;DR
Explanation
Quantum computers running Shor's algorithm can break RSA and ECC (the basis of current TLS) in polynomial time. NIST 2024 standards: ML-KEM (Kyber — key encapsulation, replaces ECDH), ML-DSA (Dilithium — digital signatures, replaces ECDSA/RSA), FALCON (compact signatures), SPHINCS+ (hash-based, conservative choice). Harvest now, decrypt later: adversaries collect encrypted traffic today to decrypt once quantum computers exist — a real threat for data that must remain confidential for 10+ years. OpenSSL 3.x with the OQS provider supports PQC algorithms.
Common Misconception
Why It Matters
Common Mistakes
- Waiting for quantum computers to appear before starting migration
- Not considering hybrid classical+PQC algorithms — use both during transition
- Using AES-128 instead of AES-256 — Grover's algorithm halves effective key size
- Hard-coded algorithm choices that make future migration difficult
Code Examples
// RSA key exchange — vulnerable to future quantum attack:
$key = openssl_pkey_new(['private_key_bits' => 2048, 'private_key_type' => OPENSSL_KEYTYPE_RSA]);
// Current security: excellent
// Security in 2035 when quantum computer exists: zero
// Data encrypted today: potentially decryptable then
// Cryptographic agility interface — enables algorithm swap:
interface KeyExchange {
public function generateKeyPair(): KeyPair;
public function encapsulate(PublicKey $pk): array;
}
// Today: implement with X25519 (classical)
// Migration path: swap to X25519+Kyber (hybrid)
// No application code changes needed