Home▸Articles▸Optics & Light

BB84 Quantum Key Distribution: A 2D Photon Channel Simulator

A fundamental protocol in quantum cryptography that leverages the principles of quantum mechanics for secure communication.

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

What is BB84 Quantum Key Distribution

BB84 is a protocol for secure communication that uses the principles of quantum mechanics to generate a shared secret key between two parties, typically named Alice (the sender) and Bob (the receiver). The protocol relies on the properties of single photons, which are particles of light, to transmit information. By encoding the bits of the key in the polarization states of these photons, BB84 ensures that any attempt at eavesdropping will be detected.

The name 'BB84' comes from its creators, Charles Bennett and Gilles Brassard, who first proposed it in 1984. The protocol is designed to be secure against all possible attacks, including those by a powerful adversary with unlimited computational power.

How BB84 Works

Alice and Bob start by agreeing on the polarization bases they will use for encoding their bits. Alice randomly chooses between two bases: rectilinear (horizontal/vertical) or diagonal (45-degree angles). She then sends a photon to Bob in one of four possible states, corresponding to the two bits 0 and 1 in each basis. Bob measures the photons using his own random choice of bases.

After they have exchanged enough photons, Alice and Bob publicly compare their bases without revealing their measurements. If both chose the same basis for a given photon, they keep the result; otherwise, they discard it. This process is known as 'sifting' and results in a shared secret key.

live demo · related simulation● LIVE

The Role of an Intercept-Resend Eavesdropper

An intercept-resend eavesdropper, often referred to as Eve, can attempt to gain information about the key by measuring the photons. However, this action will alter their state, which Alice and Bob can detect through statistical analysis of the sifted key. If too many errors are detected, they know that someone has been tampering with their communication.

Eve's strategy involves intercepting each photon sent from Alice to Bob, measuring it in one basis, and then resending a new photon in another basis. This action introduces errors into the sifted key, which can be used by Alice and Bob to detect Eve’s presence.

Why BB84 Matters

BB84 is significant because it provides an unbreakable method of secure communication. Unlike classical encryption methods that rely on computational complexity, quantum key distribution leverages the principles of quantum mechanics to ensure security. Any attempt by Eve to intercept and measure the photons will inevitably change their state, alerting Alice and Bob to her presence.

The protocol has practical applications in various fields, including finance, military communications, and personal data protection, where absolute confidentiality is essential.

Frequently asked questions

How does BB84 ensure security against eavesdropping?

BB84 ensures security by relying on the principles of quantum mechanics. Any attempt to measure a photon will change its state, which can be detected by Alice and Bob during their key verification process.

Can BB84 be used for long-distance communication?

Yes, BB84 can be used for long-distance communication using quantum repeaters or satellite-based systems. These technologies help extend the range of secure communication over large distances.

What are the main challenges in implementing BB84?

The main challenges include maintaining the coherence and stability of single photons, minimizing channel noise, and developing efficient detectors that can distinguish between different polarization states accurately.

Is BB84 practical for everyday use?

While still in development, BB84 is becoming more practical with advancements in technology. It is already used in some secure communication networks and could become more widespread as the technology matures.

Try it live

Everything above runs in your browser — open BB84 Quantum Key Distribution — 2D Photon Channel Simulator 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 — 2D Photon Channel Simulator simulation

What did you find?

Add reproduction steps (optional)