How Does Quantum Key Distribution Work?
A 10-minute read
Quantum key distribution sends single photons in random bases, then tests a sample for errors, because any eavesdropping disturbs the photons and shows up.
Quantum key distribution works by encoding a random bit into the quantum state of a single photon, sending it down a fibre, and then checking a sample of the results for the statistical scars that interception leaves behind. If the error rate is low enough, the rest of the stream becomes a secret key that no eavesdropper can hold, and that guarantee rests on physics rather than on the difficulty of factoring a large number. What makes it remarkable is also what makes it impractical: the protocol needs dedicated fibre, single-photon sources, detectors that count one photon at a time, and the arithmetic to reconcile two keys that mostly match.
The short answer
Quantum key distribution is a protocol for creating a shared secret between two parties over an optical link. One side, Alice, sends photons in one of two deliberately incompatible bases; the other, Bob, measures each one in a randomly chosen basis. They discard the mismatches, leaving roughly half the bits as a candidate key, then reveal a small sample of it publicly. If that sample shows more errors than the fibre’s own noise explains, they abort, because the excess errors are the fingerprint of an eavesdropper. Below the threshold, error correction and privacy amplification turn the candidate into a key whose secrecy is guaranteed by quantum mechanics.
The full picture
BB84: two bases that cannot both be right
The idea began with Stephen Wiesner, who in the early 1970s at Columbia University proposed “conjugate coding”, a way to store or transmit two messages so that any receiver can read only one of them. IEEE Information Theory rejected the paper, and it was finally published in 1983 in SIGACT News, where Wiesner used the idea to sketch unforgeable bank notes. A decade later Charles Bennett of IBM’s Thomas J. Watson Research Center and Gilles Brassard of the University of Montreal built a protocol on the same foundation. It was called BB84, for the year it was published.
The mechanism is a single idea about measurement. Alice picks a random bit, then a random basis, and prepares one of four photon polarization states: vertical or horizontal in one basis, or 45 or 135 degrees in the other. The two bases are conjugate, which means you cannot build one measurement that reads all four states at once. Measure a photon in the wrong basis and you get a random answer, and the original polarization is destroyed in the process. That single fact is the entire security argument. The no-cloning theorem rules out copying an unknown photon, so an eavesdropper cannot keep a perfect copy and let the real one through.
Artur Ekert’s 1991 scheme took a different route, sharing entangled photons and letting a Bell test reveal interference. BBM92, named for Bennett, Brassard and David Mermin in 1992, simplified the same idea to two states per basis. Entanglement-based systems remain the basis of device-independent protocols, which we will come back to.
Sifting, and the eavesdropper’s dilemma
Bob measures each arriving photon in a basis he chooses at random, and records the time, basis and result. He has no way to know which basis Alice used, so on average he picks the wrong one half the time, and those measurements are useless to him.
Now the two sides announce their basis choices over an ordinary, authenticated channel, discard every measurement where the bases did not match, and keep the rest. Typically that leaves about half of all the photons as candidate key material.
To see why this exposes an eavesdropper, consider the crudest possible attack. Eve intercepts every photon, measures it in a basis she guesses, and sends Bob a fresh photon she prepared herself. She has a 50 percent chance of guessing wrong, and when she guesses wrong the state she forwards is random. If Bob happens to measure in Alice’s basis, he then gets the wrong bit with 50 percent probability too. The overall error rate on intercepted photons is therefore 50 percent times 50 percent, which is 25 percent, far above the roughly 1 percent a good fibre link produces on its own. To detect that with a probability of 0.999999999, Alice and Bob have to compare 72 bits publicly.
From noisy data to a secret key
The awkward part is that errors do not come only from eavesdroppers. Imperfect sources, imperfect detectors and a fibre that is too warm all produce disagreements, and the two causes look identical to the participants. The standard resolution is to assume the worst: every error is treated as if Eve caused it. If the observed error rate sits below a threshold, roughly 11 percent for the simplest BB84 analysis, a secure key can still be extracted.
Two further steps turn the noisy candidate into an actual key. Information reconciliation makes both sides agree, using a protocol called CASCADE, proposed in 1994, which compares the parity of blocks, binary searches for the mismatch and repeats in rounds. LDPC codes, polar codes and turbo codes now do the same job more efficiently. Privacy amplification then hashes the agreed key down to a shorter string, so that whatever Eve managed to learn about the original becomes negligible. The shortening is sized from the error rate, so a noisier line yields a shorter key.
The distance problem
Light in fibre loses intensity with distance, and QKD key rate falls off roughly exponentially as a result. This rate-distance limit is why a 100 km link might yield kilobits per second while an ordinary key exchange protocol yields kilobits in milliseconds.
Quantum repeaters, which would regenerate and re-entangle signals without breaking the quantum state, have not been built at a useful scale. The workaround has been trusted relay nodes that physically split the link into short segments, which pushes the security problem into the physical security of the relays. Twin-field QKD, introduced in 2018, aims to break the limit without repeaters: Alice and Bob each hold a light source, a third party in the middle overlaps their pulses on a beam splitter, and phase-locked signals let key bits be measured without a direct quantum channel between the two principals.
Satellites are the other answer. In 2017 the Micius satellite relayed entangled photons between ground stations 1,203 km apart, observing a Bell inequality violation of 2.37 plus or minus 0.09 over a summed path length of 1,600 to 2,400 km. The same satellite later supported a secure quantum video call between Beijing and Vienna across 7,500 km of ground distance. On fibre, links of several hundred kilometres have been demonstrated, at bit rates too slow to be useful.
But a satellite link is only one hop of the problem. To stitch a chain of links into one end-to-end connection you need a quantum repeater, which regenerates a quantum state without destroying it, and those have yet to be built at a useful scale.
Quantum hacking: the hardware is the weak link
The security proofs cover the protocol, not the box. A time-shift attack was demonstrated against a commercial QKD system, the first time anyone had hacked a product rather than a laboratory rig, and the phase-remapping attack was later demonstrated on an open research system made by ID Quantique. In 2010, researchers showed that the single-photon detectors inside two commercial devices could be fully remote-controlled by shining tailored bright light at them, faking the detector response.
The Trojan-horse attack works from the other direction: Eve sends bright light backwards down the quantum channel and analyses the reflections, which can reveal Bob’s secret basis choice with better than 90 percent probability.
There is also a subtler attack that the physics does not catch. Practical systems use weak laser pulses containing on average about 0.2 photons, distributed according to a Poisson distribution, so some pulses carry two or more photons. Eve can split the extras into a quantum memory, wait for Bob to announce the bases, then measure her copies correctly and introduce no detectable errors at all. The GLLP security proof shows the key is still secure in that case, but the rate collapses, scaling with the square of the channel transmittance instead of linearly. Decoy states, first implemented at the University of Toronto, fix this by randomly sending some pulses at a lower intensity, so Eve cannot tell which pulses carry which. They restored the linear scaling. The SARG04 variant reaches an intermediate rate of the transmittance to the power of 1.5.
Device-independent QKD is the deeper fix, because it derives security from a Bell test rather than from a model of the hardware. In early 2026 a Science paper demonstrated it for the first time across 100 km, between two single-atom nodes of neutral rubidium separated by coiled fibre in a single laboratory, using an entangling scheme proposed by Ignacio Cirac in 2001.
Why it matters
The honest case for QKD is narrow and worth stating precisely. The security is information-theoretic, which means it does not depend on an assumption that some mathematical problem stays hard forever. It provides forward secrecy, because the keys are discarded and replaced rather than reused. And an intercept is detectable in principle rather than merely improbable.
The awkward case is just as precise. QKD requires an authenticated classical channel, and in practice that means you already hold either a symmetric key of sufficient length or public keys of sufficient strength. With that already in hand, you can already achieve authenticated and sufficiently secure communication with ordinary symmetric encryption. As the Wikipedia summary of the field puts it plainly, QKD therefore does the work of a stream cipher at many times the cost.
Because of that arithmetic, the NSA, ENISA, the UK NCSC, France’s ANSSI, Germany’s BSI, Australia’s ASD and the Dutch and Swedish authorities all recommend post-quantum cryptography instead. The US National Institute of Standards and Technology standardised its first post-quantum algorithms in 2024, and those run as software on the hardware already deployed, which is the decisive practical advantage over anything that needs new fibre and new lasers.
None of which means nobody is building it. The DARPA Quantum Network ran ten nodes continuously, 24 hours a day, for four years from 2004 in Massachusetts. SECOQC connected six sites across 200 km of ordinary fibre in Vienna in October 2008. Los Alamos has run a hub-and-spoke network since 2011 where the spoke nodes are no bigger than a box of matches and only the hub carries detectors. Singapore launched the National Quantum-Safe Network Plus in 2023 with Singtel and SPTel, and the European Space Agency plans to launch Eagle-1 in late 2026 or early 2027. In 2007 the canton of Geneva used ID Quantique hardware to transmit its own election results to the capital.
The pattern in all of it is that QKD is going where the assets are concentrated and the threat model is extreme: data centres, government links, banking interconnects, critical infrastructure. Meanwhile post-quantum cryptography is what actually gets deployed on the open internet. If you are deciding what to run, those are two different questions with two different answers.
Common misconceptions
“QKD encrypts your data.” It does not. QKD distributes a key and then gets out of the way. The message is encrypted with an ordinary algorithm such as AES and travels over an ordinary channel, exactly as encryption has always worked. This is why QKD systems are built as add-ons to existing links, and why the security benefit is confined to the key exchange rather than the data in transit.
“QKD is unbreakable, so it is better than ordinary encryption.” The proof holds under conditions that are easy to state and hard to guarantee: the classical channel must be authenticated with an unconditionally secure scheme, the random number generators must be trusted, Eve must not have physical access to the encoding and decoding devices, and the message must be encrypted with a one-time-pad-like scheme. Hardware that does not match the theoretical model is the weak point, and that is exactly where the successful attacks have landed.
“Quantum key distribution is what saves us from quantum computers.” It is one candidate, and a contested one. Quantum computers threaten public-key cryptography today because factoring and discrete logarithms run efficiently on them. Post-quantum algorithms fix that with software, which is why most agencies prefer them. QKD also solves a problem that post-quantum cryptography does not, namely distributing keys rather than agreeing on them, but it solves it with lasers and dedicated fibre.
Key terms
BB84: The 1984 protocol by Bennett and Brassard that launched quantum key distribution, using two conjugate polarization bases so that any measurement in the wrong basis randomizes the result.
Conjugate bases: Two sets of quantum states, such as vertical/horizontal and 45/135 degrees, where no single measurement can read both sets correctly. Measuring in the wrong basis destroys the original state.
Quantum bit error rate: The proportion of mismatched bits in the sifted key. Excess above the channel’s own noise indicates interception, and it also determines how much the final key must be shortened.
Sifting: The step where Alice and Bob publish their basis choices over the authenticated classical channel and discard every measurement where the two sides chose differently, keeping about half the bits.
Information reconciliation: The error-correction stage that makes both sides’ keys identical, classically implemented by the CASCADE protocol and increasingly by LDPC and polar codes. Every bit exchanged here is also read by the eavesdropper.
Privacy amplification: The final step that hashes the reconciled key down to a shorter string, chosen so that whatever the eavesdropper learned about the original key becomes negligible.
Device-independent QKD: A family of protocols whose security comes from a Bell test rather than from a model of the hardware, so that uncalibrated or tampered devices cause the run to abort rather than to produce a bad key.
Common questions
Does quantum key distribution encrypt my data?
No. QKD only distributes a secret key, and nothing else. The key then drives an ordinary encryption algorithm such as AES to protect the actual message, which travels over a conventional channel exactly as it would without QKD. That separation is why QKD systems are built as add-ons to existing links rather than replacements for them.
If QKD is unbreakable, why do security agencies advise against it?
Because the guarantee comes with preconditions that are hard to meet in practice. QKD needs a dedicated fibre link, a trusted classical channel for authentication, single-photon sources, and devices that have not been tampered with, and it still cannot protect the data in transit between the endpoints. Several agencies including the NSA, ENISA and the UK NCSC recommend post-quantum cryptography instead, because it runs as software on existing hardware.
Is quantum key distribution faster than regular encryption?
Not usually, and not over long distances. Key generation rates fall off exponentially with distance because of losses in the fibre, so a 100 km link might produce kilobits per second while a normal key exchange protocol produces kilobits in milliseconds. QKD is also expensive to run, since it needs single-photon sources, photon-counting detectors and a dedicated fibre pair.
Has anyone ever broken a quantum key distribution system?
Yes, repeatedly, but almost always through the hardware rather than the protocol. A time-shift attack was demonstrated against a commercial QKD system, and in 2010 researchers showed that the single-photon detectors in two commercial devices could be fully remote-controlled with bright illumination. These exploits target a gap between the theoretical model and the real device, and that gap is why device-independent protocols exist.
That's the distilled version.