Four signal states
Each signal is a qubit. Measuring in the same basis gives a definite result; measuring in the other basis gives either outcome with equal probability.
Q044 · Prepare / sift / reveal
In BB84, which bits are kept for the key after the two sides compare notes in public? Only the bits where sender and receiver happened to use the same basis, minus a random sample they reveal to estimate the error rate. A high error rate can mean an eavesdropper. Error correction and privacy amplification then shorten the key further.
Send signals in four states through a channel, with or without an eavesdropper who intercepts and resends them. Keep the bits where the bases match, reveal a random subset as a test, then look at a simple parity filter and a binary hash. Every kept or discarded bit can be traced back to what was sent.
Simulated trials
Test errors come only from the random subset that is revealed publicly. The pointwise 95% Wilson intervals describe this model’s test error probability. They are not a security bound on the remaining bits. Loss does not depend on the bit or the basis.
Public test errors / 95% range
Untested sifted bits
Sent / detected signals
Pairs publicly compare both parities. Mismatched pairs are dropped; matched pairs keep the first bit. Even numbers of errors can survive. A public Toeplitz matrix then compresses each string to half length. That arbitrary length has no entropy or security justification.
Physics tutorial
BackgroundAlice picks a random bit and one of two bases. Bob picks his own basis independently. After the transmission they compare bases in public and keep only the detected events where the bases match.
Why it mattersThe public test uses up part of the sifted bits. Postprocessing has to account for everything that was made public and for the errors that remain; not every surviving bit is secret.
Start with the essentials
Each signal is a qubit. Measuring in the same basis gives a definite result; measuring in the other basis gives either outcome with equal probability.
For the intercepted fraction, Eve measures in a uniformly random basis and resends. Detection happens independently, and the readout flip is applied at Bob. The formula is a separate reference; it is never estimated from the recorded data.
Each sifted trial is randomly marked in advance as a test or not, independently of the others. Revealing the mark does not redraw it. The Wilson ranges are pointwise intervals for this independent, identically distributed probability, not finite-key security bounds.
For each pair of bits, both parties publish one parity. If the parities disagree, both bits are dropped; if they agree, only the first bit is kept. Two errors in the same pair can go undetected. A final bit with no partner is discarded.
A public, reproducible binary seed defines the matrix. Both strings are hashed down to half of their remaining length. That compression is arbitrary: it does not come from an entropy bound, so this is not certified privacy amplification.
Typical misconceptionLosing signals automatically raises the error rate.
Better mental modelIn this model loss is independent of the signal, so it only shrinks the sample. The expected error rate among detected bits stays the same.
Typical misconceptionAny disagreement proves Eve was present.
Better mental modelReadout noise also causes errors. And in a finite sample, seeing zero errors does not rule out interception.
Typical misconceptionThe final hashed string can encrypt a real message.
Better mental modelThe Lab has no cryptographic random source, no implementation of an authenticated channel, no finite-key entropy analysis and no final check that the two keys are equal. The full teaching record also exposes the private values.
Send a clear-channel batch and view the received signals.
What to observe: Without noise, results in the same basis agree. When the bases differ, the results are random even with no eavesdropper.Advance through matching bases and public tests.
What to observe: Test bits are removed from the candidate string. Revealing a larger fraction costs more bits but gives more test data.Intercept every signal, send a fresh batch and reveal tests.
What to observe: With no other noise, the expected error rate after sifting is one quarter; a finite sample fluctuates around it.Advance to the last stage and export the parity/hash audit.
What to observe: Look at the published parities, the public matrix seed and both output strings. Even equal outputs are not proof of secrecy.