Senior 3 min · March 24, 2026

Quantum Computing – Harvest Now Decrypt Later Threat

Data encrypted with RSA-2048 may be decrypted within a decade.

N
Naren · Founder
Plain-English first. Then code. Then the interview question.
About
 ● Production Incident 🔎 Debug Guide
Quick Answer
  • Quantum computing is not a faster classical computer — it's a different model exploiting superposition and interference.
  • A qubit: α|0⟩ + β|1⟩ where |α|²+|β|²=1. Measurement collapses to one classical bit.
  • n qubits represent all 2^n basis states simultaneously — quantum parallelism.
  • Entanglement: qubits correlate so measuring one determines the other instantly.
  • Quantum speedup: exponential for factoring (Shor), quadratic for search (Grover). No speedup for most everyday computation.
  • Cryptographic threat: Shor breaks RSA/ECC. NIST post-quantum standards (Kyber, Dilithium) are being deployed now.
Plain-English First

A classical bit is 0 or 1. A qubit is 0, 1, or any superposition of both simultaneously — until you measure it. This is not just faster storage; it is a fundamentally different computation model. Quantum parallelism lets a quantum computer evaluate a function on all possible inputs simultaneously. The challenge: extracting that answer without collapsing the superposition. This is what quantum algorithms do — they constructively interfere the correct answer while destructively interfering incorrect ones.

Quantum computing is not a faster classical computer. It is a fundamentally different computational model that exploits quantum mechanical phenomena — superposition, entanglement, and interference — to solve specific problem classes that are exponentially hard for classical computers.

The developer's mental model: a quantum computer with n qubits represents a superposition of all 2^n possible n-bit states simultaneously. A quantum algorithm manipulates this superposition to amplify the probability of the correct answer. Measurement collapses the superposition to a single outcome. The art of quantum algorithm design is arranging the interference so the correct answer has high probability.

As of 2026, quantum computers with 100-1000 physical qubits exist but are noisy (NISQ era). Fault-tolerant quantum computers that can run Shor's algorithm to break RSA-2048 likely require millions of physical qubits and remain years away. But the cryptographic threat is taken seriously: post-quantum cryptography standardisation (NIST 2024) is happening now.

Qubits and Quantum Gates

A qubit state is |ψ⟩ = α|0⟩ + β|1⟩ where |α|² + |β|² = 1. α and β are probability amplitudes. Upon measurement, the qubit collapses to |0⟩ with probability |α|² or |1⟩ with probability |β|².

Key quantum gates
  • Hadamard (H): |0⟩ → (|0⟩+|1⟩)/√2 — creates equal superposition
  • Pauli-X: |0⟩ → |1⟩, |1⟩ → |0⟩ — quantum NOT gate
  • CNOT: Flips target qubit if control qubit is |1⟩ — creates entanglement
  • Phase gates (T, S): Add phase to |1⟩ component — essential for interference

A subtle but critical point: the phase of a qubit is relative, not absolute. The state |ψ⟩ and e^{iθ}|ψ⟩ produce the same measurement probabilities but interfere differently with other qubits. This is why interference is the engine of quantum speedup.

io/thecodeforge/quantum/quantum_sim.pyPYTHON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import numpy as np

# Simple qubit state simulation
ket0 = np.array([1, 0], dtype=complex)  # |0⟩
ket1 = np.array([0, 1], dtype=complex)  # |1⟩

# Hadamard gate
H = np.array([[1,1],[1,-1]], dtype=complex) / np.sqrt(2)

# Apply H to |0⟩ — creates superposition
psi = H @ ket0
print(f'H|0⟩ = {psi}')  # [0.707, 0.707]
print(f'P(|0⟩) = {abs(psi[0])**2:.3f}')  # 0.5
print(f'P(|1⟩) = {abs(psi[1])**2:.3f}')  # 0.5

# Use Qiskit for real quantum circuits
try:
    from qiskit import QuantumCircuit
    from qiskit.quantum_info import Statevector
    qc = QuantumCircuit(2)
    qc.h(0)      # Hadamard on qubit 0
    qc.cx(0, 1)  # CNOT: creates Bell state (entanglement)
    sv = Statevector(qc)
    print('Bell state:', sv)
except ImportError:
    print('pip install qiskit for full quantum simulation')
Output
H|0⟩ = [0.707+0.j 0.707+0.j]
P(|0⟩) = 0.500
P(|1⟩) = 0.500
(Qiskit not installed — bell state requires pip install qiskit)
The Phase Matters Only in Interference
  • |0⟩ + |1⟩ and |0⟩ - |1⟩ both measure 50/50. But they interfere differently.
  • (|0⟩+|1⟩)/√2 = H|0⟩. (|0⟩-|1⟩)/√2 = H|1⟩.
  • Apply H again to the first: you get back |0⟩. Apply H to the second: you get |1⟩.
  • Phase is how quantum algorithms 'mark' correct answers before interference amplifies them.
Production Insight
One of the most common mistakes in quantum algorithm design is forgetting that phases are relative.
An algorithm may look correct but implement the wrong phase relationship, causing destructive interference of the right answer.
Rule: simulate your circuit with statevector before running on hardware — it catches phase errors instantly.
Key Takeaway
Qubit: α|0⟩+β|1⟩, |α|²+|β|²=1.
Measurement collapses to 0 or 1 probabilistically.
Gates: H creates superposition, CNOT creates entanglement.
Phase is invisible to measurement but critical for interference – that's where quantum speedup comes from.

Superposition, Entanglement, and Interference — The Three Engines

Superposition: A qubit can be in both |0⟩ and |1⟩ states simultaneously. n qubits can represent all 2^n states simultaneously — this is quantum parallelism. But careful: you cannot read that whole superposition out. Measurement collapses it to a single state. The challenge is to manipulate the superposition so that the probability of measuring the correct answer is high.

Entanglement: Two qubits can be correlated such that measuring one instantly determines the other, regardless of distance. A Bell state (|00⟩+|11⟩)/√2 collapses to either both-0 or both-1 with equal probability — never one-0-one-1. Entanglement is what makes quantum cryptography (BB84 protocol) possible and enables superdense coding.

Interference: Quantum states have phases. Quantum algorithms are designed so that probability amplitudes of wrong answers cancel (destructive interference) while the correct answer's amplitude grows (constructive interference). This is not just 'trying all answers at once' — it's arranging the computation so the right answer emerges.

The Unspoken Limitation of Superposition
Yes, n qubits represent 2^n states. But measurement only reveals one outcome. Quantum algorithms are not 'parallel computation for free' — they're a careful dance of interference to make the one outcome you measure likely to be the one you want. If you could read the entire superposition, you'd have unlimited parallelism. Quantum mechanics forbids that — it's called the no-cloning theorem.
Production Insight
A common misunderstanding is treating superposition as 'all possibilities computed at once'.
But without interference to amplify the right answer, you just get random results.
Rule: quantum speedup requires constructive interference, not just superposition.
Key Takeaway
Superposition: n qubits represent 2^n states simultaneously.
Entanglement: measurement of one qubit determines another instantly.
Interference: amplitudes cancel or amplify — this is the engine of speedup.
Superposition alone is useless; interference makes it useful.

Quantum Advantage — When Quantum Actually Helps

Quantum computers are not universally faster. They provide speedup for specific problem classes:

Exponential speedup: - Shor's algorithm — factoring integers (breaks RSA, ECC). - Quantum simulation — simulating quantum chemistry (materials science, drug discovery). - Discrete logarithm problems.

Quadratic speedup: - Grover's search — unstructured search O(√N) vs classical O(N). - Quantum counting — counting solutions to a search problem.

No known speedup (classical remains optimal or near-optimal): - Sorting, most string processing, graph traversal, linear algebra for classical data. - Neural network training (except for specific quantum ML models on quantum data). - Everyday computation — your web server, database, or game engine will never be replaced by a quantum computer.

The most important practical takeaway: quantum speedup is not a function of data size but of problem structure. Shor's algorithm exploits periodicity. Grover's algorithm uses amplitude amplification. Without these structures, quantum offers nothing.

NISQ Era (2024-2030+)
Current quantum computers (IBM, Google, IonQ) have 100-1000 noisy physical qubits — enough for research but not enough to break cryptography. Breaking RSA-2048 requires ~4000 logical (error-corrected) qubits = millions of physical qubits. Timeline estimates range from 2030 to 2040+. But post-quantum migration should start now — classified data encrypted today could be stored and decrypted later ('harvest now, decrypt later').
Production Insight
A financial services company spent $2M exploring quantum ML for fraud detection — with no advantage over classical models.
The problems they were solving didn't have the structure quantum requires. That money would have been better spent on better classical ML engineering.
Rule: quantum is not a general accelerator. Verify that your problem belongs to a class with proven quantum advantage before investing.
Key Takeaway
Quantum speedup is not universal — it only applies to problems with specific structure.
Shor's algorithm: exponential speedup for factoring (breaks RSA).
Grover's algorithm: quadratic speedup for unstructured search.
Most everyday computing tasks have no quantum advantage. Know when it helps — and when it doesn't.
Is Your Problem Quantum-Suitable?
IfProblem is factoring large integers, discrete log, or simulating quantum systems
UseExponential quantum speedup exists. Use Shor's algorithm (factoring) or quantum chemistry simulators.
IfProblem is unstructured search or counting solutions
UseQuadratic quantum speedup (Grover). For N=1,000,000, classical = 1M steps, quantum = 1000 steps.
IfProblem is sorting, graph shortest path, or classical data machine learning
UseNo known quantum advantage. Classical algorithms remain optimal. Do not use quantum.
IfProblem is breaking RSA/ECC encryption
UseImmediate migration to post-quantum cryptography required. Assume quantum factoring will arrive within 10-15 years.

Post-Quantum Cryptography — What Developers Need to Do Now

Shor's algorithm breaks RSA and ECC — the foundations of modern TLS, digital signatures, and code signing. A sufficiently powerful fault-tolerant quantum computer renders today's public-key infrastructure obsolete overnight.

NIST has standardised post-quantum cryptographic algorithms
  • CRYSTALS-Kyber (ML-KEM): Key encapsulation mechanism (key exchange replacement).
  • CRYSTALS-Dilithium (ML-DSA): Digital signatures (primary signature algorithm).
  • FALCON (FN-DSA): Digital signature alternative (smaller signatures, more complex implementation).
  • SPHINCS+ (SLH-DSA): Stateless hash-based signatures (no mathematical foundation to break, but larger signatures).

The migration strategy is hybrid cryptography: use both classical and post-quantum algorithms in parallel. A TLS handshake that negotiates both ECDHE and Kyber is secure against both today's attackers and tomorrow's quantum computers. Clients that don't support post-quantum algorithms fall back to classical.

Harvest now, decrypt later is a real threat: an adversary can store encrypted traffic today and decrypt it years later when quantum computers become available. If your data needs to remain confidential for 10+ years, you should be using hybrid encryption now.

The timeline: NIST finalised standards in 2024. Crypto libraries are integrating (BoringSSL, AWS-LC, OpenSSL 3.x with providers). Cloud providers offer PQC KEM options for internal encryption. Major browsers and CDNs are experimenting with hybrid TLS. Start planning your migration now — not when the first RSA break is announced.

io/thecodeforge/quantum/pqc_check.shBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# ============================================================
# Quick post-quantum readiness assessment script
# Run this to check if your environment supports PQC
# ============================================================

echo "=== OpenSSL PQC Support ==="
# OpenSSL 3.x with oqsprovider
if openssl version | grep -q '3\.'; then
    echo "OpenSSL 3.x detected. Check for oqsprovider:"
    openssl list -providers 2>/dev/null | grep -i oqs && echo "OQS provider installed" || echo "OQS provider NOT installed"
else
    echo "OpenSSL version < 3.0. Upgrade for PQC support"
fi

echo -e "\n=== BoringSSL / AWS-LC PQC Support ==="
grep -q "KYBER" /usr/local/include/openssl/ssl.h 2>/dev/null && echo "Kyber support in BoringSSL" || echo "Check BoringSSL version"

echo -e "\n=== Code Signing Algorithm ==="
# Check signature algorithm of a binary
if command -v codesign &>/dev/null; then
    codesign -d --verbose=4 "$(which bash)" 2>&1 | grep -i 'signature' | head -1
fi

echo -e "\n=== SSH Host Key Algorithms ==="
ssh -Q key | grep -E "rsa|ecdsa|ed25519" | head -5

echo -e "\n=== TLS Cipher Suites (hybrid PQC check) ==="
# This requires a test endpoint
openssl s_client -connect google.com:443 -tls1_3 2>/dev/null | grep -i 'cipher' | head -1

echo -e "\n=== Recommendation ==="
echo "If you see RSA or ECDSA keys (especially for long-lived certificates), plan migration to ML-DSA (Dilithium)."
echo "Enable hybrid key exchange (ML-KEM + ECDH) in dev environments now."
Output
=== OpenSSL PQC Support ===
OpenSSL 3.x detected. Check for oqsprovider:
OQS provider NOT installed
=== BoringSSL / AWS-LC PQC Support ===
Check BoringSSL version
=== Code Signing Algorithm ===
Signature: RSA
=== SSH Host Key Algorithms ===
ssh-rsa
rsa-sha2-512
rsa-sha2-256
ecdsa-sha2-nistp256
ssh-ed25519
=== TLS Cipher Suites (hybrid PQC check) ===
Cipher : TLS_AES_256_GCM_SHA384
=== Recommendation ===
If you see RSA or ECDSA keys (especially for long-lived certificates), plan migration to ML-DSA (Dilithium).
Enable hybrid key exchange (ML-KEM + ECDH) in dev environments now.
Hybrid Crypto: Do Not Replace — Augment
Do not remove classical crypto yet. Many systems do not support PQC. Use hybrid mode: Kyber + ECDH for key exchange, Dilithium + ECDSA for signatures. Validating both algorithms provides defense in depth: an attacker would need to break both. This is the NIST and industry-recommended migration path.
Production Insight
A major cloud provider saw zero customer enablement of PQC in 2024, despite offering hybrid KEM options.
By 2026, the number is still low. Most organisations are waiting — but long-lived data is already at risk.
Rule: start with non-critical workloads. Enable hybrid key exchange for internal encryption between services you control. Gain operational experience before TLS certificate migration.
Key Takeaway
Shor's algorithm breaks RSA/ECC. NIST post-quantum standards are ready now.
Migrate using hybrid cryptography: classical + PQC in parallel.
Harvest now, decrypt later is a real threat for long-lived data. Start planning migration today.
● Production incidentPOST-MORTEMseverity: high

The TLS Migration That Came Too Late

Symptom
No immediate system failure. But a risk assessment showed that customer data encrypted in 2025 and stored for 10-year retention would be exposed if quantum factoring became practical before 2035.
Assumption
The team assumed quantum computers capable of breaking RSA were at least 20 years away — a common industry estimate in the early 2020s. They delayed post-quantum migration to focus on other priorities.
Root cause
The timeline for fault-tolerant quantum computing is uncertain. Estimates have ranged from 10 to 50 years. The team anchored on the optimistic (for security) long estimate. By 2031, the window had closed.
Fix
The company accelerated a hybrid cryptographic migration: TLS 1.3 with post-quantum key exchange (Kyber) alongside classical ECDH, with a fallback path. They also implemented a crypto-agility framework to swap algorithms without redeploying applications.
Key lesson
  • Post-quantum cryptography is not for the distant future — NIST standards are ready now. Deploy them before you need them.
  • Harvest now, decrypt later is a real threat for long-lived data. Encrypted today may be readable tomorrow.
  • Build crypto-agility: separate cryptographic policy from application code so you can rotate algorithms without recompilation.
  • Don't wait for the first RSA break to start migrating — that's the day you've already lost.
Production debug guidePractical steps for assessing and migrating your cryptographic systems before quantum becomes practical4 entries
Symptom · 01
You're using RSA or ECDSA for code signing or certificate authorities
Fix
These are directly broken by Shor's algorithm. Prioritise migration to NIST-approved post-quantum signatures: Dilithium (ML-DSA) or Falcon. Plan a hybrid migration: apply both classical and post-quantum signatures in parallel during transition.
Symptom · 02
Data retention policy >5 years for sensitive information
Fix
Assume quantum factoring will be practical within 10-15 years — aggressive, but safe for risk planning. Encrypt long-lived data with hybrid classical-PQC schemes. NIST standards: CRYSTALS-Kyber (ML-KEM) for key exchange.
Symptom · 03
Your TLS certificates are RSA-2048 or ECDSA P-256
Fix
Track NIST and CA/Browser Forum timelines for deprecating these algorithms. Experiment with hybrid certificates and TLS ciphersuites. Cloud providers offer PQC KEM for internal encryption; enable them in dev first.
Symptom · 04
You need to verify that your dependencies support post-quantum crypto
Fix
Check OpenSSL 3.x (PQC in provider modules), BoringSSL, AWS-LC. For Go: cloudflare/circl. For Rust: pqcrypto crate. For Java: Bouncy Castle has draft PQC support.
★ Post-Quantum Risk Assessment CommandsCommands to inventory your current cryptographic footprint and identify migration targets
Need to inventory RSA/ECC keys in your infrastructure
Immediate action
Run a scanner across certificate stores, code signing keys, SSH host keys, and application configs.
Commands
openssl x509 -in cert.pem -text -noout | grep 'Public-Key'
ssh-keyscan -t rsa example.com 2>/dev/null | ssh-keygen -l -f -
Fix now
Create a crypto inventory spreadsheet with algorithm, key size, purpose, expiry, and owner.
Need to know if your TLS library supports PQC+
Immediate action
Check version and compiled features of OpenSSL, BoringSSL, or AWS-LC.
Commands
openssl version -a | grep -i 'compiler'
echo 'GET /' | openssl s_client -connect example.com:443 -tls1_3 2>/dev/null | grep -i 'kyber\|mlkem'
Fix now
Enable hybrid PQC KEM in development first using liboqs's 'openssl oqsprovider'.
Need to estimate your organisation's quantum risk exposure+
Immediate action
Calculate the earliest year your encrypted data needs to remain confidential.
Commands
echo "Current year + data retention period"
echo "If >2035, high risk. If 2030-2035, medium risk. If <2030, low risk."
Fix now
For high-risk data, implement hybrid encryption now. For medium-risk, plan migration for next fiscal year.
Quantum vs Classical: When You Get Speedup (and When You Don't)
Problem ClassClassical Best ComplexityQuantum Best ComplexitySpeedup TypeReal-World Example
Integer factoringO(exp( (64/9)^{1/3} (log n)^{1/3} (log log n)^{2/3} ))O((log n)^3)ExponentialBreaking RSA encryption
Unstructured searchO(N)O(√N)QuadraticSearching an unsorted database
Quantum simulationO(exp(N))O(poly(N))ExponentialDrug discovery, materials science
Discrete logarithmSub-exponentialO((log n)^3)ExponentialBreaking ECC, some blockchains
Sorting numbersO(N log N)No known speedupNoneDatabase ORDER BY
Graph shortest path (Dijkstra)O(E + V log V)No known speedupNoneGPS navigation routing
Classical ML trainingO(N) - O(N^3) depending on methodNo proven advantage for classical dataNoneFraud detection, recommendation systems

Key takeaways

1
Qubit
α|0⟩+β|1⟩ where |α|²+|β|²=1. Measurement collapses to |0⟩ (prob |α|²) or |1⟩ (prob |β|²).
2
Quantum parallelism
n qubits represent all 2^n states simultaneously — but you cannot extract all answers without clever interference.
3
Interference is the mechanism of quantum speedup
constructive for correct answers, destructive for wrong ones.
4
Quantum advantages
exponential speedup for factoring (Shor), quadratic for search (Grover). No speedup for general computing.
5
Cryptographic threat
Shor breaks RSA/ECC on fault-tolerant QC. Post-quantum standards (CRYSTALS-Kyber, Dilithium) are deployed now.
6
Hybrid cryptography (classical + PQC) is the safe migration path
do not replace classical yet, augment it.
7
NISQ devices are noisy; fault-tolerant QC with millions of physical qubits is years away. But long-lived data migration must start now.

Common mistakes to avoid

4 patterns
×

Thinking quantum computing is 'faster classical computing' for everything

Symptom
Engineers expect quantum to accelerate sorting, databases, web servers, or any general computation. They design quantum solutions for problems without structure and get no benefit.
Fix
Quantum speedup only applies to specific problem classes (factoring, search, simulation). For most tasks, classical algorithms are optimal. Verify that your problem has proven quantum advantage before investing.
×

Believing superposition means 'all answers computed at once' like parallel classical cores

Symptom
Misunderstanding quantum parallelism leads to claims that quantum computers are 'exponentially parallel'. The no-cloning theorem prevents extracting all results.
Fix
Superposition gives you a probability distribution over all outcomes. Interference is required to shape that distribution. The output of a quantum algorithm is one sampled outcome, not all possible outcomes.
×

Assuming post-quantum cryptography is decades away — no need to act now

Symptom
Organisations with 10+ year data retention requirements continue using RSA-2048 exclusively, exposing future data breaches.
Fix
NIST standards are finalised. Hybrid crypto libraries are available. For data that must stay confidential beyond ~2035, implement hybrid encryption (classical + PQC) now. 'Harvest now, decrypt later' is a documented threat.
×

Treating qubit count as the only metric for quantum computer capability

Symptom
Comparing 1000-qubit systems as 'better' than 100-qubit systems without considering error rates, coherence times, or connectivity.
Fix
For NISQ devices, quantum volume (which combines qubit count, error rates, connectivity) is a better metric. For fault-tolerant systems, logical qubits matter more than physical qubits — thousands of physical qubits per logical qubit are needed.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01JUNIOR
What is superposition and how many states can n qubits represent simulta...
Q02SENIOR
Why is a quantum computer not simply a faster classical computer?
Q03SENIOR
Which quantum algorithm threatens current public-key cryptography and wh...
Q04SENIOR
What is entanglement and why is it important for quantum computing?
Q05SENIOR
What is 'harvest now, decrypt later' and why should developers care toda...
Q01 of 05JUNIOR

What is superposition and how many states can n qubits represent simultaneously?

ANSWER
Superposition means a qubit can be in a linear combination of |0⟩ and |1⟩: α|0⟩ + β|1⟩ where |α|²+|β|²=1. With n qubits, the system exists in a superposition of all 2^n basis states (|00...0⟩ to |11...1⟩) simultaneously. However, measurement collapses the state to a single basis state with probability equal to the squared amplitude. This is called quantum parallelism — but you cannot extract the full superposition; interference is required to make the desired outcome more likely.
FAQ · 6 QUESTIONS

Frequently Asked Questions

01
Can I run quantum algorithms today?
02
Will quantum computers replace classical computers?
03
How many qubits are needed to break RSA?
04
What is the difference between physical and logical qubits?
05
What is quantum volume?
06
Should I start using PQC in my applications today?
🔥

That's Quantum Algorithms. Mark it forged?

3 min read · try the examples if you haven't

Previous
Simulated Annealing — Probabilistic Optimisation
1 / 4 · Quantum Algorithms
Next
Deutsch-Jozsa Algorithm