Post-Quantum Cryptography Migration: A Developer's Complete Guide (2026)
CodeShield.sh Team · 2026-03-25 · 15 min read
Why Post-Quantum Cryptography Migration Matters Right Now
In 1994, mathematician Peter Shor published an algorithm that would eventually threaten the entire foundation of modern cryptography. Shor's algorithm, when executed on a sufficiently powerful quantum computer, can factor large integers and solve discrete logarithm problems in polynomial time. That means every RSA key, every elliptic curve signature, and every Diffie-Hellman key exchange deployed today becomes breakable.
The question is no longer if quantum computers will reach that capability, but when. IBM, Google, and several nation-state programs are racing toward fault-tolerant quantum systems with enough logical qubits to run Shor's algorithm against production key sizes. Current estimates place that threshold between 2029 and 2035, depending on the source. Yet only 5% of enterprises have begun any form of post-quantum cryptography migration, according to a 2025 industry survey by the Cloud Security Alliance.
This post quantum cryptography migration guide will walk you through every step: which algorithms are at risk, what replaces them, the regulatory deadlines bearing down on your organization, and the concrete technical steps to protect your systems before it is too late.
Which Cryptographic Algorithms Are Vulnerable?
Shor's algorithm specifically targets the mathematical problems underpinning asymmetric (public-key) cryptography. Here is a breakdown of the algorithms you need to worry about:
- RSA (RSA-2048, RSA-4096) -- Used for encryption and digital signatures. Relies on integer factorization. Fully broken by Shor's algorithm regardless of key size.
- ECDSA (Elliptic Curve Digital Signature Algorithm) -- The standard for TLS certificates, code signing, and blockchain. Relies on the elliptic curve discrete logarithm problem. Broken by a quantum variant of Shor's algorithm.
- ECDH (Elliptic Curve Diffie-Hellman) -- Used for key agreement in TLS 1.3, Signal Protocol, and SSH. Same vulnerability as ECDSA.
- Ed25519 / X25519 -- Popular modern curves used in WireGuard, SSH, and Signal. Despite being newer, they are still elliptic-curve-based and equally vulnerable to quantum attack.
- DH (Classic Diffie-Hellman) -- The original key exchange protocol. Relies on discrete logarithm in finite fields. Directly targeted by Shor's algorithm.
- DSA (Digital Signature Algorithm) -- The older NIST signature standard. Same discrete logarithm weakness as DH.
Important: Symmetric algorithms like AES-256 and hash functions like SHA-256 are not broken by Shor's algorithm. Grover's algorithm provides a quadratic speedup against symmetric crypto, but doubling the key size (e.g., AES-128 to AES-256) is sufficient mitigation. The urgent crisis is in asymmetric cryptography.
The NIST Post-Quantum Cryptography Standards
After an eight-year evaluation process involving submissions from cryptographers worldwide, NIST finalized three post-quantum cryptography standards in August 2024. These are the algorithms you will migrate to:
ML-KEM (FIPS 203) -- formerly CRYSTALS-Kyber
ML-KEM (Module-Lattice-Based Key Encapsulation Mechanism) replaces RSA encryption and ECDH key exchange. It is based on the hardness of the Module Learning With Errors (MLWE) problem on structured lattices. ML-KEM comes in three parameter sets:
- ML-KEM-512 -- Roughly equivalent to AES-128 security. Fastest performance, smallest keys.
- ML-KEM-768 -- Roughly equivalent to AES-192 security. The recommended default for most applications.
- ML-KEM-1024 -- Roughly equivalent to AES-256 security. For high-security environments.
Key sizes are larger than RSA or ECDH: ML-KEM-768 public keys are 1,184 bytes versus 32 bytes for X25519. This has real implications for TLS handshakes, certificate chains, and bandwidth-constrained protocols.
ML-DSA (FIPS 204) -- formerly CRYSTALS-Dilithium
ML-DSA (Module-Lattice-Based Digital Signature Algorithm) replaces RSA signatures, ECDSA, and Ed25519 for digital signatures. Also based on lattice problems. Parameter sets:
- ML-DSA-44 -- Category 2 security (~AES-128). Signatures are 2,420 bytes.
- ML-DSA-65 -- Category 3 security (~AES-192). Recommended default.
- ML-DSA-87 -- Category 5 security (~AES-256).
SLH-DSA (FIPS 205) -- formerly SPHINCS+
SLH-DSA (Stateless Hash-Based Digital Signature Algorithm) is a conservative, hash-based alternative to ML-DSA. Its security rests purely on hash function properties rather than lattice assumptions. The trade-off is significantly larger signatures (up to 49,856 bytes) and slower signing. Use SLH-DSA when you need a fallback that does not depend on lattice assumptions, or when signature size and speed are not critical constraints.
The Regulatory Timeline: Deadlines You Cannot Ignore
Regulators worldwide have set firm deadlines. If you are building for any regulated industry -- finance, healthcare, government, defense -- these dates define your migration window:
- NSA CNSA 2.0 (2027) -- All new National Security Systems must use post-quantum algorithms by 2027. Legacy systems must transition by 2033. This applies to defense contractors, intelligence community vendors, and anyone touching classified data.
- Google (2029) -- Google has announced it will distrust non-PQC TLS certificates by 2029 in Chrome. Given Chrome's market share, this effectively sets a deadline for the entire web.
- NIST Deprecation (2030) -- NIST will formally deprecate RSA and ECDSA by 2030, removing them from approved algorithm lists. Federal agencies and their contractors must comply. The U.S. federal government has allocated $7.1 billion in combined budgets across agencies for quantum-readiness initiatives.
- EU PQC Roadmap (2030) -- The European Commission's PQC migration roadmap targets 2030 for critical infrastructure. The EU Cybersecurity Act mandates PQC readiness for essential services.
- UK NCSC (2035) -- The UK National Cyber Security Centre sets 2035 as the final deadline, with a phased approach starting in 2028 for high-priority systems.
Even if your organization is not directly regulated, your customers, partners, and supply chain likely are. Compliance pressure flows downstream.
Harvest Now, Decrypt Later: Why Migration Is Urgent Today
The most compelling reason to begin your post quantum cryptography migration guide implementation today is the Harvest Now, Decrypt Later (HNDL) attack. Nation-state adversaries are already intercepting and storing encrypted traffic with the explicit intention of decrypting it once quantum computers become available.
Consider data with a long secrecy requirement: medical records (decades), trade secrets (years to decades), classified intelligence (permanent), financial records (7+ years). If that data is encrypted with RSA or ECDH today and intercepted tomorrow, a quantum computer in 2032 can decrypt it retroactively.
"The threat is not theoretical. Intelligence agencies have confirmed the existence of large-scale data harvesting programs targeting encrypted communications." -- NIST Post-Quantum Cryptography FAQ, 2025
This means the effective deadline is not when quantum computers arrive. It is today, minus the secrecy lifetime of your data. If your data needs to stay secret for ten years, and quantum computers arrive in ten years, you are already late.
Step-by-Step Migration Process
A successful post quantum cryptography migration guide follows six phases. Rushing to swap algorithms without proper planning leads to outages, incompatibilities, and security gaps.
Step 1: Inventory Your Cryptographic Assets
You cannot migrate what you cannot find. Conduct a comprehensive audit of every cryptographic algorithm, key, certificate, and protocol in your codebase and infrastructure. This includes:
- TLS/SSL certificates and their signing algorithms
- SSH keys and host key algorithms
- Code signing certificates
- API authentication tokens and JWT signing algorithms
- Database encryption (at-rest and in-transit)
- VPN configurations (IPSec, WireGuard)
- Hardware security modules (HSM) and their supported algorithms
- Third-party libraries and SDKs that embed cryptographic operations
Manual inventory is impractical for any non-trivial system. Automated tools like CodeShield.sh can scan your entire codebase and infrastructure to produce a complete cryptographic inventory in minutes rather than months.
Step 2: Assess Risk and Exposure
Not all cryptographic usage carries the same risk. Classify each instance by:
- Data sensitivity: What does this algorithm protect? Public marketing pages or patient health records?
- Secrecy lifetime: How long must this data remain confidential?
- Exposure surface: Is this algorithm used in internet-facing protocols (high exposure) or internal-only systems (lower exposure)?
- HNDL risk: Is the encrypted traffic traversing networks where it could be intercepted and stored?
Step 3: Prioritize Migration Targets
Start with the highest-risk, highest-exposure systems: key exchanges in TLS for internet-facing services, VPN tunnels carrying sensitive data, and long-lived signing keys. Leave low-risk internal systems for later phases.
Step 4: Replace Algorithms
For each target, replace the vulnerable algorithm with its NIST PQC equivalent. Use hybrid mode during the transition period -- combining a classical algorithm with a PQC algorithm so that security is maintained even if one is broken. For example, TLS 1.3 now supports hybrid key exchange combining X25519 with ML-KEM-768.
Step 5: Test Thoroughly
PQC algorithms have different performance characteristics. ML-KEM key generation is fast, but key sizes are larger. ML-DSA signatures are larger than ECDSA, which affects certificate chain validation time. Test for:
- Latency impact on TLS handshakes
- Bandwidth overhead on constrained networks (IoT, mobile)
- Compatibility with existing clients and intermediaries (load balancers, WAFs, CDNs)
- HSM firmware support for new algorithms
Step 6: Monitor and Iterate
Post-quantum cryptography is still evolving. NIST is evaluating additional algorithms (notably HQC as a code-based backup to ML-KEM). Monitor for algorithm updates, vulnerability disclosures, and library patches. Treat your cryptographic migration as a continuous process, not a one-time project.
Code Examples: Classical vs. Post-Quantum
Below are practical examples showing the before and after of cryptographic operations. These illustrate the shape of the API changes you should expect.
Key Encapsulation: RSA vs. ML-KEM (Node.js)
// BEFORE: RSA key exchange (VULNERABLE to quantum attack)
import crypto from 'node:crypto';
const { publicKey, privateKey } = crypto.generateKeyPairSync('rsa', {
modulusLength: 2048,
});
const encrypted = crypto.publicEncrypt(publicKey, Buffer.from('shared-secret'));
const decrypted = crypto.privateDecrypt(privateKey, encrypted);
// AFTER: ML-KEM-768 key encapsulation (quantum-resistant)
// Using oqs-provider or liboqs Node.js bindings
import { KEM } from 'liboqs-node';
const kem = new KEM('ML-KEM-768');
const { publicKey, secretKey } = kem.generateKeypair();
// Sender encapsulates: produces ciphertext + shared secret
const { ciphertext, sharedSecret: senderSecret } = kem.encapsulate(publicKey);
// Receiver decapsulates: recovers the same shared secret
const receiverSecret = kem.decapsulate(ciphertext, secretKey);
// senderSecret === receiverSecret (used as symmetric key material)
Digital Signatures: ECDSA vs. ML-DSA (Python)
# BEFORE: ECDSA signature (VULNERABLE to quantum attack)
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import hashes
private_key = ec.generate_private_key(ec.SECP256R1())
signature = private_key.sign(b"message", ec.ECDSA(hashes.SHA256()))
# AFTER: ML-DSA-65 signature (quantum-resistant)
# Using oqs-python (liboqs wrapper)
import oqs
signer = oqs.Signature("ML-DSA-65")
public_key = signer.generate_keypair()
signature = signer.sign(b"message")
# Verification
verifier = oqs.Signature("ML-DSA-65")
is_valid = verifier.verify(b"message", signature, public_key)
Note that the API surface for PQC operations is often simpler than classical crypto. Key encapsulation replaces the more complex RSA encrypt/decrypt pattern, and PQC signature APIs closely mirror existing interfaces. The main differences are in key and signature sizes, not in developer ergonomics.
What Is a CBOM (Cryptographic Bill of Materials)?
A Cryptographic Bill of Materials (CBOM) is a structured, machine-readable inventory of every cryptographic asset in your software supply chain. Think of it as an SBOM (Software Bill of Materials) focused specifically on cryptography. A CBOM documents:
- Every algorithm in use (RSA-2048, AES-256-GCM, SHA-384, etc.)
- Where each algorithm is used (file path, service, dependency)
- Key sizes and parameters
- Certificate authorities and trust chains
- Cryptographic library versions
- Compliance status against target standards (NIST, CNSA 2.0, etc.)
CBOMs are becoming a regulatory requirement. The U.S. Office of Management and Budget (OMB) Memorandum M-23-02 mandates federal agencies to maintain cryptographic inventories. Private-sector frameworks like SOC 2 and ISO 27001 are following suit.
Without a CBOM, you are flying blind. You cannot assess your quantum risk, plan your migration, or prove compliance. With a CBOM, you have a single source of truth that drives every phase of your post quantum cryptography migration guide implementation.
Tooling for Automated Discovery and CBOM Generation
Building a CBOM manually is error-prone and does not scale. Modern codebases pull in hundreds of dependencies, each potentially importing its own cryptographic libraries. A developer might use crypto.createSign('RSA-SHA256') in application code while a transitive dependency calls OpenSSL directly through native bindings.
CodeShield.sh automates this entire process. It performs deep static analysis of your codebase to discover every cryptographic operation -- including those buried in third-party dependencies -- and generates a complete CBOM. It flags quantum-vulnerable algorithms, maps them to their NIST PQC replacements, and prioritizes remediation based on risk exposure. This turns a months-long manual audit into an automated, repeatable scan that integrates into your CI/CD pipeline.
Other tools in the ecosystem include IBM's Quantum Safe Explorer, Cryptosense Analyzer, and the open-source crypolib-finder. However, for developer-centric workflows with tight CI/CD integration and actionable remediation guidance, CodeShield.sh provides the most streamlined path from discovery to migration.
Putting It All Together: Your Migration Checklist
Here is a condensed post quantum cryptography migration guide checklist you can act on immediately:
- Week 1: Run an automated scan to generate your CBOM. Know what you are dealing with.
- Week 2-3: Classify assets by risk. Focus on internet-facing key exchanges and long-lived signing keys first.
- Month 1-2: Deploy hybrid TLS (X25519 + ML-KEM-768) on your highest-traffic endpoints. Major cloud providers and CDNs already support this.
- Month 3-6: Migrate code signing, API authentication, and internal service mesh encryption to ML-DSA or hybrid schemes.
- Ongoing: Integrate CBOM generation into CI/CD. Block PRs that introduce new quantum-vulnerable cryptography. Monitor NIST updates for algorithm changes.
The post quantum cryptography migration guide is not a single project with a finish line. It is a permanent shift in how you manage cryptographic risk. The organizations that start now will have years of runway to migrate gracefully. Those that wait will face emergency transitions under regulatory pressure, with far higher cost and far greater risk of security incidents.
Start Your Migration Today
Every week of delay is another week of encrypted data potentially harvested for future decryption. The standards are finalized. The tools exist. The regulatory deadlines are set. The only remaining variable is when you begin.
Scan your codebase for quantum-vulnerable cryptography with CodeShield.sh -- get a complete CBOM and a prioritized migration plan in minutes, not months.
Scan your repos for free
Connect your GitHub repositories and get AI code vulnerability scanning plus post-quantum cryptographic analysis in under 60 seconds.
Get Started Free