Home▸Articles▸Physics & Mechanics

BB84 Quantum Key Distribution with an Eavesdropper: 2D Channel View

An interactive simulation that illustrates the principles of quantum cryptography, specifically focusing on the BB84 protocol and its vulnerability to eavesdropping.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is Quantum Key Distribution (QKD)?

Quantum Key Distribution (QKD) allows two parties to generate a shared secret key known only to them, using the principles of quantum mechanics. The BB84 protocol, named after its inventors Bennett and Brassard in 1984, is one of the most well-known QKD schemes.

In this protocol, information is encoded in the polarization states of single photons, which are then transmitted over a quantum channel.

The BB84 Protocol

Alice and Bob use two bases to encode their bits: one for 0 and 1 using horizontal (H) and vertical (V) polarizations, and the other for 0 and 1 using diagonal (D) and anti-diagonal (A) polarizations.

By randomly choosing between these bases, Alice sends photons to Bob, who measures them in a random basis. Afterward, they publicly compare their bases without revealing the actual measurements.

live demo · related simulation● LIVE

Eavesdropping and Detection

An eavesdropper named Eve can intercept and resend the photon, but this introduces errors that Alice and Bob can detect by comparing a subset of their key.

If Eve measures the photons in her own basis, she will not know which basis Alice used to encode them, leading to errors when Bob compares his measurements.

Simulation Controls and Observations

The simulation allows users to adjust various parameters such as photon rate, fibre loss, Eve's interception probability, and detector efficiency.

By observing the QBER (Quantum Bit Error Rate) graph and the abort threshold gauge, one can determine if eavesdropping is occurring and how it affects the security of the key.

Frequently asked questions

How does BB84 ensure secure communication?

BB84 ensures security by leveraging quantum mechanics to detect any eavesdropping. If Eve tries to intercept, she will introduce errors that Alice and Bob can later identify.

What is QBER in the context of BB84?

QBER stands for Quantum Bit Error Rate, which measures the rate at which bits are incorrectly received due to eavesdropping or other factors. A high QBER indicates potential eavesdropping.

Can Eve be detected even if she intercepts and resends photons?

Yes, because any interception by Eve will introduce errors in the measurements made by Bob. Alice and Bob can detect these errors when they compare a subset of their key publicly.

Why is BB84 considered a fundamental protocol in quantum cryptography?

BB84 is foundational because it demonstrates that secure communication can be achieved using the principles of quantum mechanics, specifically through the use of single photons and random bases for encoding information.

Try it live

Everything above runs in your browser — open BB84 Quantum Key Distribution with an Eavesdropper: 2D Channel View and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open BB84 Quantum Key Distribution with an Eavesdropper: 2D Channel View simulation

What did you find?

Add reproduction steps (optional)