Home▸Articles▸Rendering & Computer Graphics

Quantum Key Distribution: BB84 Protocol & Eavesdropper Detection

A groundbreaking method for secure communication that leverages quantum mechanics to ensure information security.

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

What Quantum Key Distribution Is

Quantum Key Distribution (QKD) is a method for secure communication that allows two parties to create a shared secret key known only to them. The BB84 protocol, developed by Charles Bennett and Gilles Brassard in 1984, is one of the foundational methods of QKD. It uses quantum mechanics to ensure that any attempt at eavesdropping can be detected.

In the BB84 protocol, Alice encodes her message using qubits (quantum bits) prepared in one of four possible polarization states, corresponding to two bases: rectilinear and diagonal. Bob measures these qubits with random bases chosen from the same set of four possibilities.

Why It Happens

The key principle behind BB84 is that any attempt by an eavesdropper, Eve, to intercept and measure the qubits will disturb their state. This disturbance can be detected when Alice and Bob compare a subset of their measurement results in public without revealing the actual key. If too many discrepancies are found, they know that Eve has been present.

The protocol ensures security through the no-cloning theorem, which states that it is impossible to create an identical copy of an arbitrary unknown quantum state. This means that Eve cannot clone qubits and resend them without altering their state.

live demo · related simulation● LIVE

Eavesdropping Detection

In the BB84 protocol, Alice and Bob perform a process called 'basis sifting' to detect eavesdropping. They compare a portion of their measurement bases publicly without revealing the actual key bits. If there are too many discrepancies (a high Quantum Bit Error Rate or QBER), they abort the key exchange and start over.

The QBER is calculated by comparing the results from Alice's and Bob's measurements where both used the same basis. A high QBER indicates that Eve has likely intercepted some of the qubits, compromising the security of their communication.

Real-World Applications

Quantum Key Distribution is not just a theoretical concept; it has practical applications in secure communications. It can be used to protect sensitive information such as financial transactions, military communications, and personal data.

The BB84 protocol forms the basis for many commercial QKD systems, ensuring that any attempt at eavesdropping will be detected, thus maintaining the confidentiality of the communication.

Frequently asked questions

How does Eve detect the presence of an eavesdropper?

Eve's attempts to intercept and measure qubits disturb their state. When Alice and Bob compare a subset of their measurement results, they can detect these disturbances if too many discrepancies are found.

What is the no-cloning theorem and how does it relate to QKD?

The no-cloning theorem states that it's impossible to create an identical copy of an arbitrary unknown quantum state. This means Eve cannot clone qubits without altering their state, making any eavesdropping attempt detectable.

Can Alice and Bob communicate securely even if they suspect an eavesdropper?

Yes, if a high QBER is detected during the basis sifting process, Alice and Bob can abort the key exchange and start over. They will only use the bits that were not affected by Eve's presence.

How does BB84 differ from classical encryption methods?

BB84 uses quantum mechanics to ensure security, whereas classical encryption relies on computational complexity. Quantum key distribution is theoretically unbreakable if implemented correctly and can detect any eavesdropping attempt in real-time.

Try it live

Everything above runs in your browser — open Quantum Key Distribution: BB84 Protocol & Eavesdropper Detection (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Quantum Key Distribution: BB84 Protocol & Eavesdropper Detection (2D) simulation

What did you find?

Add reproduction steps (optional)