◈ QUANTUM KEY LABBB84 / INTERACTIVE EXPLAINER

A secret shared. A measurement leaves a trace.

Can someone listen
without being noticed?

Alice sends quantum bits to Bob. Switch on Eve to see how listening can change what Bob receives.

The big picture

This diagram follows the Eve setting above. Run a new simulation to update the qubit results below.

1

Alice

Chooses a bit and a basis
Prepares a qubit

2

Bob

Chooses his own basis
Measures the arriving qubit

3

Alice ↔ Bob: compare bases publicly

Same basis → keep the bit. Different bases → discard it.
Bob confirms receipt and measurement first. Eve can hear the bases, but they are announced after the qubits have been measured.

Sifted keys

Preparing your first run…

01 / Follow one qubit

—
ALICE / SENDER

Prepare

—

EVE / LISTENER

Pass through

—

BOB / RECEIVER

Measure

—

What is a basis? A choice of measurement directions: + straight or × diagonal. Matching the prepared basis reads the bit reliably. A different basis gives a random bit and leaves the qubit in that measured state.

02 / Compare bases, keep matching choices

Alice and Bob announce their bases. Only bits measured in the same basis are kept. These form the sifted keys.

Bits kept—
Kept-bit mismatches—
Error rate—
Alice’s key
Bob’s key

See every qubit

Select a qubit number to explore its journey. “Discard” means the bases differ; it does not count as a key error.

QubitAlice bit / basisEve basis / bitBob basis / bitDecisionKey mismatch

03 / Your keys at the end of this run

—

Run a simulation to see the resulting keys.

Alice’s sifted key—
Bob’s sifted key—

These are the bits left after basis comparison, in transmission order. Highlighted bits in Bob’s key disagree with Alice’s. This demonstration ends at sifting: error correction and privacy amplification are needed before a real protocol produces a final secret key.