HomeCryptographyQuantum Key Distribution

Quantum Cryptography — BB84 Key Distribution

Interactive BB84 quantum key distribution simulator: watch Alice send polarized photons to Bob, toggle an eavesdropper, and see basis sifting and quantum bit error rate reveal whether the channel is secure.

Cryptography2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
quantum-cryptography ↗ Open standalone

This simulator runs the real BB84 protocol bit by bit: Alice picks a random bit and a random polarization basis for every photon, Bob measures each one in his own randomly chosen basis, and the two sides publicly compare only their basis choices to sift out a shared secret key. Turn on the eavesdropper to watch an intercept-resend attack push the quantum bit error rate up to roughly 25% — the same statistical fingerprint that lets real QKD hardware detect a listener on the line without ever transmitting the key itself.

⚙ Under the hood

Simulate the BB84 protocol where Alice and Bob choose photon polarization bases to establish a secure key. Basis mismatches are sifted out, and any eavesdropper is detected by an increased QBER.

quantum-cryptographyBB84 protocolsecure communication

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

What did you find?

Add reproduction steps (optional)