Home▸Quantum Physics▸BB84 Quantum Key Distribution: Photon Polarization Protocol (2D)

BB84 Quantum Key Distribution: Photon Polarization Protocol (2D)

2D BB84 quantum key distribution lab: Alice and Bob exchange randomly polarized photons over a noisy channel, sift matching bases, and measure the quantum bit error rate live — watch an eavesdropper attack raise the QBER past the 11% security threshold.

Quantum Physics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-quantum-key-distribution ↗ Open standalone

This 2D companion runs the real BB84 protocol instead of the 3D version's decorative particle-swarm shell: Alice prepares each photon with a random bit in a random polarization basis (rectilinear or diagonal), an optional eavesdropper intercepts and resends a fraction of the stream by guessing a measurement basis of her own, channel noise flips bits independently of any attack, and Bob measures each photon in his own random basis before the two sides publicly compare only their basis choices to sift a shared key. A running sample of the sifted bits is checked for mismatches to estimate the quantum bit error rate live — with the classic 11% BB84 security threshold and an estimated secure key rate (after the standard privacy-amplification factor 1 − 2·h(QBER)) both visible on the panel, so cranking up Eve's intercept probability visibly pushes the channel from "Secure" into "INSECURE — abort," exactly as the no-cloning theorem predicts.

⚙ Under the hood

2D BB84 quantum key distribution lab: Alice and Bob exchange randomly polarized photons over a noisy channel, sift matching bases, and measure the quantum bit error rate live — watch an eavesdropper attack raise the QBER past the 11% security threshold.

quantum key distributionbb84 protocolqkdquantum cryptographyno-cloning theoremeavesdropper detection

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)