Level 7 · Capstone Topics
Quantum Cryptography: A Complete Lesson
This site discusses quantum cryptography in several places — our BB84 and E91 entries, and the Cybersecurity industry page. This lesson ties those pieces together into one structured walkthrough of how quantum mechanics enables a fundamentally new kind of secure communication.
The classical cryptography problem
Secure communication generally relies on both parties sharing a secret key, used to encrypt and decrypt messages. The hard problem is: how do you establish that shared secret key in the first place, especially if you've never met in person and an eavesdropper might be listening to every message you exchange?
Classical solutions (like the encryption discussed in our Post-Quantum Cryptography entry) rely on mathematical problems believed to be hard to solve. Quantum key distribution takes a completely different approach: using physics itself to guarantee security, rather than assumed mathematical difficulty.
The core insight: measurement disturbs quantum states
The entire foundation of quantum cryptography rests on one fact covered in our Measurement Collapse entry: measuring a qubit in the "wrong" basis disturbs its state in a detectable way. If you encode information in quantum states and someone tries to secretly intercept and measure them, that interception leaves a detectable trace.
Walking through BB84, step by step
Step 1 — Alice prepares qubits: Alice wants to send Bob a string of random bits that will become their shared secret key. For each bit, she randomly chooses one of two measurement "bases" (think of these as two different ways of encoding 0 and 1 using qubit states) and encodes her bit value using a qubit prepared in that basis.
Step 2 — Bob measures, also choosing randomly: For each incoming qubit, Bob independently and randomly chooses which basis to measure in — he doesn't yet know which basis Alice used for each qubit.
Step 3 — Basis reconciliation: After all qubits are sent and measured, Alice and Bob publicly compare (over an ordinary, even insecure, classical channel) which basis they each used for every qubit — but not the actual bit values themselves. They keep only the results where they happened to use the same basis, discarding the rest. On average, this keeps about half of the original bits.
Step 4 — Eavesdropping detection: Alice and Bob publicly compare a small random sample of their remaining, matching-basis bits. If no eavesdropper was present, these should match perfectly. If someone (often called "Eve" in cryptography examples) intercepted and measured qubits along the way, her measurements would have disturbed some states, introducing detectable errors in this comparison.
Step 5 — Final key: If the error rate in the sampled bits is below an acceptable threshold, Alice and Bob discard the sampled bits (since they've now been revealed publicly) and use the remaining matching-basis bits as their shared secret key.
How E91 takes a different mathematical route to the same goal
As covered in our E91 Protocol entry, this alternative approach uses entangled particle pairs and Bell inequality violations as its security foundation instead of BB84's single-photon, basis-comparison approach. Rather than detecting eavesdropping through basis mismatches, E91 detects it through statistical violations of Bell inequalities — connecting quantum cryptography directly to the foundational tests of quantum mechanics discussed in our Timeline.
What makes this security "provable" rather than "assumed"
The crucial distinction from classical cryptography: BB84 and E91's security doesn't rely on an eavesdropper lacking sufficient computing power (the assumption behind RSA-style classical cryptography, threatened by Shor's Algorithm). It relies on the laws of quantum mechanics itself — an eavesdropper with literally unlimited computing power, even a hypothetical future quantum computer, still cannot measure quantum states without leaving a detectable trace.
Practical limitations
As discussed in our Cybersecurity industry coverage, quantum key distribution requires specialized hardware and (typically) dedicated fiber optic infrastructure, limiting it to high-security applications rather than everyday internet use. This is why post-quantum cryptography — a classical, software-based approach — is the more practical near-term defense for most organizations, even though it relies on mathematical rather than physical security guarantees.
Frequently Asked Questions
Can an eavesdropper ever successfully intercept a quantum-cryptography-protected message without detection?
In the idealized protocol, no — any interception attempt introduces a statistically detectable disturbance. In practice, real-world implementations must carefully guard against more subtle attacks exploiting imperfections in physical hardware, which is why ongoing protocol refinements like the six-state protocol exist.
Does quantum cryptography encrypt the actual message content?
Not directly — quantum key distribution protocols like BB84 and E91 establish a shared secret key. That key is then used with a classical encryption algorithm to actually encrypt and decrypt the message content itself.
Continue learning