Part III · Protocols — 7c

Key Distribution · BB84

Every earlier chapter treated measurement’s fragility as a problem. BB84 turns it into the whole point: a shared secret key that an eavesdropper cannot read without leaving fingerprints all over it.

↩ before you start · keep these handy
·From Ch. 3: measuring in the wrong basis randomizes the result — and you get to choose the basis.
·From Ch. 5: the two bases here are |0⟩/|1⟩ and |+⟩/|−⟩ — one Hadamard apart.
·From No-Cloning: Eve can't copy a qubit to measure at leisure — she must commit to one basis live.
🔑 symbol decoder · every new mark, in plain words
+ / ×the two bases (measurement "languages"): + is up/down, × is the diagonal |+⟩/|−⟩. siftingkeeping only the rounds where Alice and Bob happened to use the same basis. QBERthe quantum bit-error rate — the fraction of sifted bits that disagree. 25%the unavoidable error an intercept-and-resend eavesdropper injects. keythe shared random bit string they build — not the message itself.
feel

A lock that shows it’s been touched

Alice sends Bob a stream of qubits, each prepared in one of two random “languages” — think of them as two pairs of polarized glasses. Bob, not knowing which she used, guesses a pair of glasses for each. Afterward they compare only which glasses they used (never the bits) and throw away the rounds where they disagreed. The survivors are their secret key.

Now the magic: an eavesdropper has to measure to learn anything — but measuring through the wrong glasses scrambles the qubit. So if anyone listened in, the key Alice and Bob share will no longer match on a chunk of their bits. Compare a handful, see errors, and you know you were watched.

✉️ everyday picture

Imagine mailing letters under a wax seal that cracks the instant anyone opens them. You don't hide the contents — you just agree to bin any letter that arrives cracked. An eavesdropper can still steam one open, but the broken seal gives them away. BB84's "seal" is the rule that measuring a qubit the wrong way scrambles it: tampering can't help but show.

recapMeasuring through the wrong basis scrambles a qubit, so any eavesdropper leaves errors behind.
play

Run the exchange — with and without Eve

Each round shows Alice’s basis (+ or ×) and bit, and Bob’s. Green = bases matched, bits agree (a good key bit). Red = bases matched but bits disagree — impossible unless someone tampered. Toggle Eve and watch the error rate jump toward 25%.

▸ BB84 channelprepare · measure · sift
{{ total }} sent
{{ r.aSym }}{{ r.aBit }}
{{ r.bSym }}{{ r.bBit }}
sifted key
{{ sifted }}
bases matched
error rate
{{ qber }}%
{{ errs }} mismatched
{{ verdict }}
recapMatching bases get sifted into the key; with Eve listening, the error rate climbs toward 25%.
math

Why Eve must leave 25% errors

Look only at the sifted bits — the ones where Alice and Bob used the same basis. With no eavesdropper those always agree. Eve, intercepting and resending, must guess a basis blind:

½ of the time Eve picks Alice’s basis → she reads it right, Bob still agrees
½ of the time Eve picks the wrong basis → she resends a scrambled qubit
→ Bob then disagrees with Alice ½ of those times
error rate = ½ × ½ = ¼ = 25%

Alice and Bob sacrifice a random handful of key bits and compare them out loud. A clean sample → keep the rest as a secret key. A sample peppered with mismatches → throw it all away; someone was listening. Eve cannot do better — no-cloning forbids her from copying the qubit to measure later.

✎ worked example · 200 qubits, Eve listening
1.bases match about half the time: sifted ≈ ½ × 200 = 100 bits
2.Eve guessed the wrong basis on ½ of those → she disturbs ≈ 50 bits
3.a disturbed bit flips Bob ½ the time → ½ × 50 = 25 errors
4.QBER ≈ 25 / 100 = 25% — vs 0% on a clean line, so tampering is caught.
recapIntercept-resend forces a 25% error on the sifted key — no-cloning leaves Eve no better option.
⚠ common misconception

“BB84 sends my message over the quantum channel.” It doesn’t send a message at all. It distributes a shared stream of random bits — a key. The actual message travels later over an ordinary channel, scrambled with that key. Quantum mechanics secures the key exchange, nothing more.

And it doesn’t prevent eavesdropping — Eve is free to listen. What it guarantees is that she can’t do so undetected. Spotting her costs only a few sacrificed bits; the moment errors appear, Alice and Bob simply discard the key and try again.

✓ you can now
walk the prepare / measure / sift steps and pick out the surviving key bits
explain why an intercept-resend eavesdropper must inject ≈ 25% errors
state what BB84 secures (the key exchange) and what it doesn't (the message)
← 07 Teleportation next · 7d Repeaters & Swapping