Quantum Cryptography
Secure communication with quantum key distribution
1. The Ultimate Encryption
Classical encryption can be broken with enough computing power. Quantum cryptography is different - it's protected by the laws of physics themselves. Any attempt to intercept the message is instantly detectable.
π Core Concept
Quantum cryptography uses quantum mechanics to create unbreakable encryption keys. The no-cloning theorem ensures that eavesdroppers can't copy quantum states, and measurement disturbance means any interception is immediately detected.
β οΈ The Quantum Threat to Classical Cryptography
How Modern Encryption Works (And Why It's Vulnerable)
Security based on computational hardness: factoring large numbers (RSA) or solving discrete logarithm (ECC) is practically impossible for classical computers.
Classical attack: ~300 trillion years with best algorithms
Assumed safe? Yes... until quantum computers β
The problem: Security depends on belief that no fast algorithm exists. Shor's algorithm (1994) proved a quantum computer can factor in polynomial time β RSA broken!
Security based on key secrecy: AES-256 has 2256 possible keys. Brute force search is infeasible.
Classical brute force: Billions of years
Status: Still secure β
Quantum threat: Grover's algorithm reduces search to 2128 operations for AES-256. Still hard but weakened β need AES-512 for quantum era!
Symmetric crypto (AES) is secure, but how do Alice and Bob agree on the key? Without quantum-vulnerable public-key crypto (RSA), they need a secure channel to share the key. Catch-22!
Quantum Solution: Information-Theoretic Security
Quantum Key Distribution (QKD) achieves information-theoretic securityβsecurity proven by laws of physics, not computational assumptions.
Consequence: Eavesdropper (Eve) can't intercept photon, copy it, and forward original to Bob. She must measure (destroying state) and resendβthis introduces errors Alice and Bob can detect!
Consequence: Eve doesn't know which basis Alice used. If she guesses wrong (50% chance), her measurement introduces errors β detection guaranteed!
Consequence: Even if Eve uses perfect equipment, quantum mechanics prohibits her from extracting full information without disturbing the state!
The key insight: QKD doesn't encrypt data directly. It securely distributes a random key that Alice and Bob then use with AES or one-time pad. The quantum magic is in key distribution, not encryption!
The Post-Quantum Race
"Harvest now, decrypt later" attacks are already happening. Adversaries record encrypted traffic today, knowing that future quantum computers will decrypt it. Organizations handling sensitive long-term secrets (medical records, state secrets, financial data) need quantum-safe solutions now. QKD provides immediate protection: keys generated today are secure against any future technology because security comes from physics, not math. While post-quantum classical algorithms (lattice-based, hash-based) are being standardized, they still rely on assumptions about computational hardness. QKD eliminates assumptions entirelyβit's the only provably secure solution for the quantum era. The race isn't just about when quantum computers arriveβit's about protecting data that must stay secret for decades.
π‘ Interactive: Photon Polarization States
2. BB84 Quantum Key Distribution
π― Interactive: Choose Protocol
π‘ BB84 Protocol: How Quantum Key Distribution Works
The Complete BB84 Procedure (Step-by-Step)
BB84 (Bennett & Brassard, 1984) is the first and most famous quantum key distribution protocol. Here's how Alice and Bob create a shared secret key:
Alice generates two random bit strings: one for data, one for bases.
Result: Alice sends polarized photons over quantum channel (fiber optic or free space). Each photon encodes 1 bit in a random basis.
Bob doesn't know which basis Alice used! He randomly chooses his own measurement basis for each photon.
Key insight: When bases match (β), Bob gets Alice's bit correctly. When bases differ (β), Bob gets random 50/50 resultβuseless!
Alice and Bob publicly announce which bases they used (but NOT the bit values!). They keep only photons where bases matched.
Efficiency: ~50% of photons survive (when bases match randomly). This is the "sifted key" but not yet secureβEve might have interfered!
Alice and Bob sacrifice some bits to test for eavesdropping. They publicly compare a random subset of their sifted key.
Decision rules:
Even without Eve, photon loss and detector noise cause small error rates. Alice and Bob use classical error correction to fix these, then apply privacy amplification to remove any information Eve might have gained.
Final key rate: Starting with N photons β ~N/2 sifted β ~N/4 after error correction and privacy amplification. This is the secure key!
Why BB84 Is Unconditionally Secure
BB84's security doesn't depend on computational hardness or assumptions. It's guaranteed by quantum mechanics:
Mathematical proof: Security proven against ANY attack allowed by quantum mechanics (Shor-Preskill 2000, Mayers 2001). Even an adversary with unlimited computing power and access to all future quantum technologies cannot break BB84 without being detected!
BB84 In Practice
Modern BB84 implementations use single-photon sources (laser attenuated to ~0.1 photons/pulse) and single-photon detectors (avalanche photodiodes or superconducting nanowires). Key rates: ~1 Mbps at 10 km, ~1 Kbps at 100 km in fiber. The protocol has been proven secure in thousands of deployments worldwide, from Swiss banking networks (2007) to Chinese quantum satellites (2016). BB84 isn't just theoreticalβit's the foundation of the emerging quantum internet, providing the only form of communication that's secure against both current and future threats. The protocol's simplicity (just 4 polarization states, random bases, public comparison) belies its profound implications: information-theoretic security is achievable in the real world!
π©βπ¬ Interactive: Alice Prepares Photons
π Interactive: Key Generation Progress
3. Detecting Eve (The Eavesdropper)
π΅οΈ The Mathematics of Eavesdropping Detection
Eve's Dilemma: The Intercept-Resend Attack
The most straightforward attack: Eve intercepts each photon, measures it, then sends a new photon to Bob based on her measurement. Why does this fail?
β Photon travels through quantum channel
Eve: Randomly chooses Γ basis to measure
Eve: Measures in Γ basis β Gets random result (50% D+, 50% D-)
Eve: Assumes she got it right, sends what she measured
β Eve's resent photon (in Γ basis)
Bob: Measures photon sent by Eve in + basis
Bob: Gets random result (50% H, 50% V) β Wrong 50% of time!
The error cascade: Eve measures in wrong basis (50% chance) β photon state randomized β Bob gets wrong result (50% of that 50%) β 25% error rate in matching bases β detected!
Could Eve use more sophisticated attacks? Quantum mechanics says no:
A: No. Heisenberg uncertainty: Measuring H/V vs D+/D- are incompatible. Perfect measurement in one basis β complete randomness in other.
A: No. No-cloning theorem forbids copying unknown quantum states. Can't make backup to measure in all bases.
A: Possible, but... Entanglement creates correlations that still show up as errors during error checking. Still detected!
A: Yes, but... She gets partial info (e.g., 10% of bits) and introduces proportional errors (2.5% QBER for 10% intercept). Alice/Bob detect via statistical tests.
Advanced Attacks and Countermeasures
Real single-photon sources sometimes emit multi-photon pulses (e.g., 2 photons instead of 1). Eve can:
Eve sends bright laser pulses into Alice's or Bob's equipment, hoping to probe internal states or create side channels.
Eve sends bright continuous light to saturate Bob's detectors, then controls when they click β defeats quantum randomness!
The Security Proof Guarantee
BB84's security has been mathematically proven against any attack allowed by quantum mechanics (Mayers 2001, Shor-Preskill 2000, Lo-Chau 1999). The proofs are composableβsecurity holds even if Eve has unlimited memory, computational power, and advanced quantum technology. The QBER threshold (11% for BB84) is a hard limit imposed by physics, not engineering. If QBER < 11%, Alice and Bob can extract a secure key via privacy amplification (hashing to remove partial info Eve might have). The 11% comes from information theory: above this, Eve's information about the key exceeds Alice-Bob's shared information β no secret key possible. This isn't breakable by "better math"βit's a fundamental bound from quantum information theory. Real systems aim for QBER < 3% to provide comfortable security margin. The beauty of QKD: security is quantifiable and verifiable via error rates!
π΅οΈ Interactive: Add an Eavesdropper
π Interactive: Entanglement-Based QKD
The E91 protocol uses entangled photon pairs. Bell inequality violations prove the entanglement is genuine and not being simulated by an eavesdropper.
π The Distance Problem: Why QKD Range Is Limited
Photon Loss: The Fundamental Challenge
Unlike classical signals that can be amplified, single photons cannot be amplified without measuring (destroying quantum state). This limits QKD range.
Classical networks use repeaters: detect signal, amplify, retransmit. Why can't we do this for quantum?
Key rate impact: Exponential loss β exponential drop in key rate. Practical limit: ~300 km in fiber without repeaters.
In free space (air/vacuum), photons travel farther but face atmospheric turbulence and beam divergence.
Limited by fog, rain, turbulence. Needs clear line of sight.
Photons pass through atmosphere briefly (last 10 km). China's Micius satellite (2016) demonstrated 1200 km QKD.
No atmospheric loss. Future backbone for global quantum internet.
Solutions: Quantum Repeaters and Trusted Nodes
Use quantum memory and entanglement swapping to extend range without measuring photons directly.
Status: Research phase. Challenges: long-coherence quantum memory, high-fidelity operations. Timeline: 2030s for practical deployment.
Break long distance into short QKD links with intermediate trusted nodes that measure, decrypt, and re-encrypt.
Security caveat: Nodes must be physically secured (e.g., in locked facilities). Compromise of any node breaks security. Not truly end-to-end secure, but practical for current deployments.
Building the Quantum Internet
Current QKD networks use trusted nodes for metropolitan and regional coverage (e.g., China's 2000+ km Beijing-Shanghai network, Europe's OpenQKD testbeds). Satellite QKD bridges continentsβChina's Micius satellite connects Beijing, Vienna, and has demonstrated intercontinental key distribution. The long-term vision: quantum repeaters enable true end-to-end entanglement distribution without trusted intermediaries, allowing quantum internet for ultra-secure communication, distributed quantum computing, and quantum sensing networks. Distance limitations are being overcome through hybrid architectures: fiber for metro, satellite for long-haul, quantum repeaters for future continental backbone. Key rates improve with better detectors (superconducting nanowires achieve 90%+ efficiency), wavelength multiplexing (multiple channels in same fiber), and higher rep rates. The goal: Mbps key rates at 100+ km by 2030.
π Interactive: Distance Challenge
4. Real-World Implementation
π Interactive: Application Scenarios
βοΈ Interactive: QKD vs Classical Cryptography
| Feature | Quantum (QKD) | Classical (RSA, AES) |
|---|---|---|
| Security Basis | β Laws of physics | β οΈ Computational hardness |
| Quantum Computer Threat | β Immune | β Vulnerable (Shor's algorithm) |
| Eavesdropping Detection | β Guaranteed | β Undetectable |
| Key Distribution | β οΈ Requires special hardware | β Software-based |
| Distance | β οΈ Limited (~300 km) | β Unlimited |
| Cost | β οΈ High (specialized equipment) | β Low (standard hardware) |
π Interactive: Quantum Internet Timeline
5. Key Takeaways
Physics-Based Security
Quantum cryptography's security comes from fundamental physics, not computational assumptions. Even infinitely powerful computers cannot break it without being detected.
Guaranteed Detection
The no-cloning theorem ensures eavesdroppers cannot copy quantum states. Any measurement attempt disturbs the system and reveals their presence through increased error rates.
BB84 Protocol
The BB84 protocol uses random bases to encode bits in photon polarization. Only matching bases contribute to the final key, providing built-in authentication.
Entanglement Power
E91 uses entangled pairs and Bell inequality tests to verify security. Violations of Bell inequalities prove the quantum correlations are genuine and untapped.
Distance Limitations
Photon loss in fiber limits QKD to ~300 km. Quantum repeaters and satellite links are being developed to extend range for a global quantum internet.
Commercial Reality
QKD networks are already operational for banking, government, and enterprise use. Metropolitan-scale deployments are growing, with continental networks on the horizon.