QKD Detection: How Quantum Key Distribution Detects Eavesdropping
Quantum Key Distribution (QKD) lets two parties share a secret encryption key with a guarantee that any attempt to intercept it will be detected. This guide explains the detection mechanism in plain terms, covering the BB84 protocol and the role of quantum properties like polarization and photon spin. You’ll learn what happens on the sender and receiver side, how errors reveal an eavesdropper, and what to do when the error rate climbs.
What You’ll Need
- A basic understanding of binary (bits and 0/1).
- Familiarity with the concept of photons (light particles) and polarization (the direction of light’s electric field).
- No special equipment is required — this is a conceptual guide.
Step-by-Step
- Understand the core idea. QKD detects eavesdropping by exploiting a fundamental rule of quantum mechanics: measuring a quantum system disturbs it. If an eavesdropper (Eve) intercepts and measures photons sent from Alice to Bob, the photons are altered in a way that introduces errors in the key. By comparing a sample of the key, Alice and Bob can detect those errors and know that Eve is listening.
- Learn the BB84 protocol (the most common). In BB84, Alice sends a stream of photons, each polarized in one of four states: horizontal (0°), vertical (90°), diagonal (45°), or anti-diagonal (135°). These states represent bits: horizontal and diagonal represent 0, vertical and anti-diagonal represent 1. The states are grouped into two bases: the rectilinear basis (horizontal/vertical) and the diagonal basis (diagonal/anti-diagonal).
- Alice chooses random bases and bits. For each photon, Alice randomly picks a basis (rectilinear or diagonal) and a bit (0 or 1). She sends the photon with the corresponding polarization. She records her choices.
- Bob measures with random bases. Bob, on the receiving end, randomly chooses a basis to measure each photon. If he chooses the same basis that Alice used, he gets the correct bit. If he chooses the wrong basis, his measurement is random — he gets a 0 or 1 with 50% probability, regardless of what Alice sent.
- Alice and Bob compare bases (not bits). Over a public channel (like the internet), Alice and Bob announce which bases they used for each photon. They keep only the photons where they used the same basis. This is called the sifted key. For example, if Alice sent 1000 photons and Bob used the same basis for 500 of them, the sifted key is 500 bits long.
- Check for eavesdropping by comparing a subset. Alice and Bob randomly select a subset of the sifted key (say, 100 bits) and publicly compare them. If no one is eavesdropping, these bits should match perfectly (or nearly so, due to minor equipment noise). If an eavesdropper is present, the comparison will show a higher-than-expected error rate.
- Calculate the quantum bit error rate (QBER). The QBER is the fraction of compared bits that differ. For example, if 5 out of 100 bits differ, the QBER is 5%. In a typical setup, a QBER below about 11% is considered safe (the exact threshold depends on the implementation). If the QBER exceeds the threshold, Alice and Bob abort the key and start over.
- Understand why eavesdropping causes errors. When Eve intercepts a photon, she must measure it in some basis. If she guesses the wrong basis, she disturbs the photon’s state. When she resends it to Bob, Bob may measure a different bit than Alice originally sent. This introduces errors that Alice and Bob can detect. Eve cannot copy the photon because quantum mechanics forbids cloning an unknown quantum state (the no-cloning theorem).
- Apply error correction and privacy amplification (if QBER is acceptable). If the QBER is low enough, Alice and Bob run error correction to fix any remaining mismatches, then privacy amplification to shrink the key and eliminate any partial information Eve might have. The result is a secure key that can be used for encryption.
Common Mistakes
- Confusing bases with bits. A common error is to think that the basis itself carries information. In BB84, the basis is not the bit; it’s the measurement context. The bit value is determined by the specific polarization within that basis.
- Assuming any error means eavesdropping. Real equipment has noise (e.g., detector dark counts, misalignment). A small QBER is normal. The key is to compare against a threshold, not to require zero errors.
- Forgetting that Eve can intercept without being detected if she uses the correct basis. If Eve happens to guess the right basis for a photon, she gets the correct bit and doesn’t disturb it. That’s why Alice and Bob only keep the photons where they used the same basis — those are the ones where Eve’s guess would have to be right, which is unlikely for all photons.
- Thinking QKD is immune to all attacks. QKD detects eavesdropping, but it doesn’t prevent denial-of-service (Eve can just block the channel) or attacks on the devices themselves (e.g., side-channel attacks).
Tips
- Always use a random source for basis and bit selection. Predictable patterns could allow Eve to guess.
- Use a public channel that is authenticated (e.g., with a pre-shared short key) to prevent Eve from impersonating Alice or Bob during the basis comparison.
- When comparing the subset, choose it randomly and securely. If Eve knows which bits will be compared, she can adapt her attack.
- Keep the sifted key length long enough that the subset comparison is statistically meaningful. A 100-bit subset is common, but more bits give more confidence.
- In practice, QKD systems often use a continuous stream and monitor QBER in real time, aborting if it spikes.
Troubleshooting
- QBER is unexpectedly high (above threshold). First, check for equipment issues: misaligned optics, detector noise, or interference. If those are ruled out, assume an eavesdropper is present and abort the key. Restart with a new session.
- Bob gets no photons at all. This could mean the channel is blocked (e.g., fiber cut) or the photon source is off. Check the physical link and the source. If an attacker is intentionally blocking the channel, that’s a denial-of-service, which QKD detects as a failure to communicate.
- Bob’s measurements are all random (50% error). This suggests Bob is always using the wrong basis. Check that Bob’s basis selection is truly random and that his measurement devices are calibrated to the correct polarization angles.
- The sifted key is too short. This happens when Bob and Alice rarely choose the same basis. That’s normal — about half the photons are discarded. To get a longer key, send more photons. If the key is still too short, consider using a different protocol like E91, which uses entangled photons and can be more efficient in some setups.
- Error correction fails. If the QBER is just above the threshold, error correction may not converge. Increase the threshold (if acceptable) or reduce noise. If the QBER is too high, the key must be discarded.
Frequently Asked Questions
Q: Can QKD detect an eavesdropper who only listens without measuring?
A: No. If Eve just intercepts the photons and copies them without measuring, she would not disturb them. But the no-cloning theorem makes it impossible to copy an unknown quantum state. So any attempt to copy will necessarily introduce errors.
Q: What is the typical QBER threshold for a secure key?
A: It depends on the implementation, but a common threshold is around 11%. Below that, the key is considered secure after privacy amplification. Above that, the key is aborted.
Q: Does QKD work over long distances?
A: Yes, but with limitations. Over fiber, the signal decays, and the QBER increases with distance. Current systems can reach a few hundred kilometers with repeaters (trusted nodes). Satellite-based QKD (like Micius) has demonstrated intercontinental distances.
Q: Is QKD used in real-world applications?
A: Yes. Banks and government agencies use QKD for secure communication, especially in metropolitan networks. It’s also used to secure critical infrastructure. However, it’s not yet widespread due to cost and the need for dedicated fiber or line-of-sight.
Q: Can QKD be used with existing encryption?
A: Yes. QKD is typically used to generate a symmetric key (like AES) that is then used for encryption. It can also be used for key distribution in a hybrid system with public-key cryptography.
Q: What happens if an eavesdropper is detected?
A: Alice and Bob discard the key and start over. They might also try to locate the eavesdropper by analyzing where the errors occur, but that’s not always possible. The main point is that the key is never used if it’s compromised.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.