BB84 Secure Key Rate vs. Channel Distance
Interactive BB84 quantum key distribution simulator: watch photon pulses attenuate over a fiber-optic channel and see the secure key rate collapse with distance, dark counts, and an intercept-resend eavesdropper.
BB84 quantum key distribution promises unconditional security against eavesdropping, but its practical range is set by ordinary fiber-optic physics: every kilometre of glass absorbs photons exponentially, and every lost photon is a bit of key that never arrives. This simulator renders the Alice-to-Bob fiber channel in 3D — single-photon pulses launched toward Bob's detector, each one probabilistically absorbed according to the fiber's attenuation law — and turns the resulting click statistics into a live secure-key-rate calculation using the standard gain/QBER/binary-entropy formulas from quantum cryptography. Drag the distance and attenuation sliders to watch the key rate collapse toward zero as loss dominates, tune the mean photon number to see the dark-count floor bite at low brightness, and switch on an intercept-resend eavesdropper to watch the quantum bit error rate spike past the ≈11% threshold where BB84 itself refuses to produce a key — the same signature that makes the protocol detectably secure in the real world.
Watch single-photon pulses attenuate over a fiber-optic quantum channel and see the BB84 secure key rate collapse with distance, dark counts, and an intercept-resend eavesdropper.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install