Post-Quantum Cryptography: Preparing Your Applications for the Quantum Threat

A software-engineer-friendly primer on quantum computing concepts, with a runnable example using Qiskit.

Why This Is a Practical Concern, Not Just Theory

A sufficiently powerful quantum computer running Shor’s algorithm could break the RSA and elliptic-curve cryptography that secures most of today’s internet traffic, TLS certificates, and stored credentials. Current hardware isn’t there yet — but “harvest now, decrypt later” attacks mean encrypted data captured today could be decrypted once that hardware exists, which makes this relevant now for long-lived sensitive data.

What’s Actually at Risk

  • Asymmetric encryption (RSA, ECC) — vulnerable to Shor’s algorithm; this is the urgent category
  • Symmetric encryption (AES) — weakened but not broken by Grover’s algorithm; doubling key size (AES-256) largely mitigates this
  • Hashing (SHA-2/3) — similarly weakened but not broken; not an urgent migration priority

NIST’s Post-Quantum Standards

NIST has standardized several post-quantum algorithms designed to resist quantum attacks while running on classical hardware:

  • ML-KEM (Kyber) — key encapsulation, replacing RSA/ECDH for establishing shared secrets
  • ML-DSA (Dilithium) — digital signatures, replacing RSA/ECDSA signatures
  • SLH-DSA (SPHINCS+) — a hash-based signature scheme, more conservative but larger signatures

Hybrid Key Exchange: The Practical Migration Path

Rather than switching outright, most production systems adopt hybrid schemes that combine classical and post-quantum algorithms — secure as long as either algorithm holds:

# OpenSSL 3.x with post-quantum support (example)
openssl genpkey -algorithm X25519MLKEM768 -out hybrid_key.pem

Testing TLS with Post-Quantum Key Exchange

# Chrome and recent server stacks already support hybrid key exchange
curl -v --curves X25519Kyber768 https://example.com

Generating a Post-Quantum Signature (Example with liboqs)

import oqs

with oqs.Signature("Dilithium3") as signer:
    public_key = signer.generate_keypair()
    message = b"transaction data to sign"
    signature = signer.sign(message)

with oqs.Signature("Dilithium3") as verifier:
    is_valid = verifier.verify(message, signature, public_key)

Building a Migration Plan

  1. Inventory — identify where RSA/ECC are used: TLS, code signing, stored credentials, VPNs
  2. Prioritize — long-lived sensitive data (health records, government, financial) is at highest “harvest now, decrypt later” risk
  3. Adopt crypto agility — abstract algorithm choice behind an interface so switching algorithms later doesn’t require rewriting call sites
  4. Pilot hybrid schemes — start with TLS key exchange, the lowest-risk place to introduce hybrid post-quantum support

What Not to Do Yet

Don’t rip out RSA/ECC entirely today — the post-quantum ecosystem (library support, hardware acceleration, protocol support) is still maturing, and hybrid approaches give you protection without betting everything on newer, less battle-tested algorithms.

Conclusion

Post-quantum migration is a multi-year process best started with inventory and crypto agility rather than a rushed algorithm swap. For most applications, the actionable step today is ensuring your TLS stack supports hybrid key exchange and that new systems aren’t hard-coded to a single, potentially obsolete algorithm.