BB84 quantum key distribution: photon polarisation, sifting, eavesdropper detection via QBER.
BB84 protocol. Alice sends single photons, each prepared in a random basis (+ : horizontal/vertical, × : diagonal) encoding a random bit. Bob measures in an independently random basis. If the bases agree (probability 1/2) he reads the bit correctly; otherwise his outcome is a fair coin. After the photons arrive, both announce bases only and keep the matching ones: the sifted key.
Why Eve is detected. An intercept-and-resend eavesdropper must guess a basis. For a sifted bit she picks the wrong basis with probability 1/2 and then Bob errs with probability 1/2, so every tapped photon adds 1/4 error. With intercept fraction f and independent bit-flip noise e: Q = (f/4)(1-e) + (1-f/4)e. Full interception gives 25 %.
Key rate. For ideal single photons and one-way post-processing the asymptotic secret fraction is r = 1 - 2h(Q), h = binary entropy; it hits zero near Q = 11 % (Shor-Preskill). Below that, error correction and privacy amplification distil a shorter, secret key.
Simplifications. Ideal single-photon source (no multi-photon pulses, so no photon-number-splitting attack), no finite-key penalty, Eve limited to intercept-resend, loss only reduces the rate, no basis-dependent detector errors. Real systems use decoy states. Typical values only; this is an educational model.