Home▸Articles▸Physics & Mechanics

BB84 Quantum Key Distribution: Photons, Eavesdropping & Latency (2D)

A groundbreaking protocol for secure communication that leverages quantum mechanics to ensure privacy against eavesdroppers.

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

What is Quantum Key Distribution (QKD)

Quantum Key Distribution (QKD) is a method for secure communication that allows two parties to create a shared secret key known only to them, which can then be used to encrypt and decrypt messages. The BB84 protocol, named after its inventors Charles Bennett and Gilles Brassard in 1984, is one of the most well-known QKD schemes.

The core idea behind BB84 involves encoding information into quantum states—specifically, polarized photons—and transmitting them over a channel to create a shared key. The security of BB84 relies on the principles of quantum mechanics, particularly the no-cloning theorem and the Heisenberg uncertainty principle.

How BB84 Works

In the BB84 protocol, Alice (the sender) randomly chooses between two bases to encode her qubits: a rectilinear basis or a diagonal basis. Each choice corresponds to one of four possible polarization states for the photon she sends towards Bob (the receiver). Bob also randomly selects his measurement basis without knowing which base Alice used.

After transmission, both parties publicly compare their bases and keep only those bits where they chose the same basis. This process is called 'sifting' and results in a shared key that can be used for secure communication.

live demo · related simulation● LIVE

Eavesdropping and QBER

The security of BB84 is maintained by the fact that any attempt to intercept or measure the photons will disturb their quantum state, which Alice and Bob can detect through a process called 'error correction'. This disturbance manifests as an increase in the Quantum Bit Error Rate (QBER), indicating potential eavesdropping.

In the simulation, Eve's intercept-resend attack is visible as a rising QBER. By adjusting the intercept-probability slider, you can simulate different levels of eavesdropping and observe how it affects the security of the key.

Latency and Practical Considerations

BB84 is not just a theoretical concept; it has practical implications for secure communication. However, real-world implementations face challenges such as latency due to the need for classical communication to compare bases and correct errors.

In the 2D simulation, you can observe how varying fiber distance and channel noise impact the sifted key rate and secure key rate. The round-trip latency is also displayed, highlighting the importance of minimizing delays in practical QKD systems.

Frequently asked questions

How does BB84 ensure security against eavesdroppers?

BB84 ensures security by leveraging quantum mechanics. Any attempt to intercept or measure the photons will disturb their state, which can be detected through error correction and key reconciliation steps.

What is QBER in BB84?

QBER stands for Quantum Bit Error Rate, which measures the rate at which errors occur during the transmission of qubits. An increase in QBER indicates potential eavesdropping activity.

Why is latency a concern in BB84 implementations?

Latency is a concern because it can introduce delays that may be exploited by attackers to gain information about the key being generated. Minimizing latency is crucial for maintaining the security of QKD systems.

Can BB84 be used for long-distance communication?

Yes, BB84 can be used for long-distance communication, but practical challenges such as signal degradation and noise in the channel need to be addressed. Advanced technologies like quantum repeaters are being developed to extend the range of QKD.

Try it live

Everything above runs in your browser — open BB84 Quantum Key Distribution: Photons, Eavesdropping & Latency (2D) 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: Photons, Eavesdropping & Latency (2D) simulation

What did you find?

Add reproduction steps (optional)