BB84
BB84 is a prepare-and-measure quantum key distribution protocol introduced by Charles Bennett and Gilles Brassard in 1984. Alice encodes random candidate key bits in one of two conjugate qubit bases. Bob measures each received signal in a randomly chosen basis. After transmission, they use an authenticated public channel to keep compatible events, estimate disturbances, reconcile their strings, verify agreement, and compress away an adversary’s possible information.
Raw measurement outcomes are not yet a secret key. BB84 aims to produce matching, nearly uniform secret strings or to abort, under a specified device and attack model. The QKD overview defines the acceptance-weighted composable guarantee. Here the focus is how the four states, basis tests and phase-error bound make that guarantee possible.
Required background. Quantum key distribution supplies authentication and postprocessing; the Bloch sphere, density operators and projective measurement supply the qubit states and Born rule. No-cloning and no-signaling explains the limits on copying and the role of classical messages.
The Four Signal States
Section titled “The Four Signal States”Let be Alice’s bit and let be her basis choice. Write
where is the Hadamard gate. The four states are:
| Basis | Bit | Signal state | |
|---|---|---|---|
| computational, | |||
| computational, | |||
| Hadamard, | |||
| Hadamard, |
Within either basis, the two states are orthogonal. Across bases, every squared overlap is one half:
Bob chooses a basis and measures with projectors
The Born probabilities are
Thus a matched ideal measurement reproduces Alice’s bit, whereas a mismatched measurement is uniformly random.
What the signal reveals before basis announcement
Section titled “What the signal reveals before basis announcement”If Alice’s bit is uniform, the average state in either basis is maximally mixed:
No measurement on the ideal signal can reveal which basis was chosen before the later announcement, because the two basis ensembles define the same density operator. This does not mean Eve learns nothing from every possible interaction. It means that security must be analyzed as a tradeoff among her quantum side information, the public transcript, and the disturbance seen in the test data.
The four states occupy the , , , and directions on the Bloch sphere. A stronger statement holds for these single-copy signals: no outcome can unambiguously identify even one of the four labels. The other three states span the whole qubit space, so a positive measurement effect that never clicks on them must vanish. Allowing an inconclusive outcome does not give a nonzero success probability for this four-state alphabet (Chefles, 1998). This statement changes if Eve receives extra copies or leaked degrees of freedom.
The four signal rays form two complementary bases. A error leaves either -basis ray unchanged but exchanges and . Consequently, zero key-basis error does not by itself establish zero phase error. Exercise 6 calculates this example.
Sending, selecting and testing signals
Section titled “Sending, selecting and testing signals”For rounds , the ideal protocol proceeds as follows.
- Choose: Alice samples independent random bits .
- Prepare: She transmits through an insecure quantum channel.
- Measure: Bob independently samples and measures in that basis, recording outcome or a no-detection event.
- Acknowledge detections: Bob authenticates which rounds produced a valid record before Alice reveals her basis choices.
- Reveal bases: Alice and Bob disclose and over the authenticated public channel, but not the unrevealed key bits.
- Sift: They retain detected rounds satisfying .
- Estimate: They reveal a designated random sample or test-basis data, estimate relevant error parameters, and abort when the acceptance test fails.
- Reconcile and verify: They correct differences between their remaining strings and verify that the results agree, accounting for every disclosed syndrome and tag.
- Amplify privacy: They choose a fresh independent two-universal hash to produce shorter final keys and .
- Refresh authentication: They reserve key material for later transcript authentication when the system is intended to expand a continuing secret.
The ordering matters. For example, if an unmodeled detector can choose which rounds survive after learning Alice’s basis, loss can become a basis-dependent postselection channel. A security proof defines which announcements occur when, which systems may remain quantum, and what Eve knows at every step.
Sifting and Quantum Bit Error Rate
Section titled “Sifting and Quantum Bit Error Rate”Let be the set of detected rounds and let
be the sifted set. With independent uniform basis choices,
This is a probability for the independent basis choices. With basis-independent acceptance it is also the fraction of detections that survive sifting. In general, conditioning on detection can change a distribution, so that extra assumption must be checked.
If Alice and Bob choose with probabilities and , the probability of matching before detection is
Let denote the detection probability for settings , averaged over uniformly random signal bits. Then
Here “det” is the event that a signal is detected. The numerator counts matched detections; the denominator counts all detections. Only when the relevant efficiencies cancel does this reduce to the simpler formula. Exercise 7 uses a receiver with unequal basis efficiencies.
Biased-basis BB84 reduces sifting loss by using one basis predominantly for the key and the other for testing. It still needs enough complementary-basis data, analyzed separately, to bound phase errors (Lo, Chau and Ardehali, 2005).
For a revealed test set , the observed quantum bit error rate (QBER) is
No-detection events are not automatically bit errors. They are losses whose security treatment depends on the source and detector model. The test QBER is also not automatically the error rate of the unrevealed key block. A finite-key proof supplies a random-sampling bound and a failure probability for that inference.
Intercept–Resend Attack
Section titled “Intercept–Resend Attack”The simplest attack illustrates information–disturbance without proving full security. Eve intercepts every signal, measures it in a uniformly random or basis, prepares the state indicated by her outcome, and sends that replacement to Bob.
Condition on a sifted round, so Bob happened to use Alice’s basis.
- With probability , Eve also chose Alice’s basis. She learns the bit and resends the correct state, causing no ideal error.
- With probability , Eve chose the conjugate basis. Her outcome is random, and Bob’s measurement of the resent state is wrong with probability .
Therefore
If Eve attacks only a fraction of otherwise ideal rounds, this model gives
After basis disclosure, Eve knows the sifted bit perfectly on the half of her intercepted rounds where she chose correctly. For this particular hard-decision attack, her mutual information is bit per sifted bit before error correction and privacy amplification.
The number is not the BB84 security threshold. General individual, collective, and coherent attacks need not behave like intercept–resend. Device noise can create errors without Eve, and flawed devices can leak information without producing this disturbance. The security theorem bounds Eve over its entire allowed attack class from the complete observed statistics and device assumptions.
The intercept–resend calculation is one possible interaction. No-cloning does not exclude partial information from approximate measurements or coherent probes. The security argument must bound the adversary over all interactions allowed by its assumptions.
Source-Replacement Picture
Section titled “Source-Replacement Picture”The prepare-and-measure protocol has an equivalent virtual description. Alice may be imagined to prepare
keep system , and send through the channel. Measuring in basis with outcome prepares Bob’s system in because the BB84 basis vectors are real in the computational basis. The conditional emitted states and their probabilities agree with direct preparation, including their relation to the later classical basis and bit records. This is stronger than equality of the signal density operator after averaging over every label.
This source-replacement step makes two error classes visible:
- a bit error means Alice and Bob disagree when both measure in the key basis;
- a phase error is the hypothetical disagreement that would occur in the conjugate basis and controls Eve’s information about the key.
In a CSS-code entanglement-purification argument, one syndrome corrects bit errors and another corrects phase errors. If Alice and Bob could distill nearly perfect Bell pairs, measuring those pairs in the key basis would produce a nearly ideal secret key. Shor and Preskill (2000) showed that the required CSS operations can be rearranged and removed until the remaining observable procedure is prepare-and-measure BB84 with classical error correction and privacy amplification.
Entanglement Distillation develops the distributed syndrome viewpoint. Stabilizer Formalism explains the code and syndrome machinery.
Standard Asymptotic Key Fraction
Section titled “Standard Asymptotic Key Fraction”Let and be valid asymptotic upper bounds on bit- and phase-error rates for the sifted key block, with . Define the binary entropy
In the ideal single-photon BB84 model with one-way postprocessing, an achievable secret fraction per sifted key bit is
The first entropy term is the ideal error-correction cost; the second is the privacy cost associated with phase uncertainty. For symmetric BB84 statistics under the standard reduction,
so
This lower bound becomes positive when
The familiar value is therefore an ideal asymptotic threshold for this proof and one-way processing, not a universal abort setting. Two-way postprocessing, different proof techniques, finite statistics, source flaws, detector models, and protocol variants change the achievable boundary.
Real reconciliation reveals more than the Shannon limit. If its inefficiency is represented by , a common asymptotic engineering estimate is
before verification, authentication, finite-size, and implementation penalties. This estimates entropy cost; it is not a composable finite-key theorem.
The rate per transmitted optical mode must also include detection, basis selection, parameter-estimation sacrifice, dead time, and every other accepted mode criterion. Multiplying only by a clock frequency is not enough.
Authentication and physical assumptions
Section titled “Authentication and physical assumptions”The classical channel can be public but must be authenticated. Otherwise Eve can run separate low-error BB84 sessions while impersonating each endpoint. The QKD overview explains this attack and how preshared keys or computational credentials change the assumptions. Authentication covers detection records, basis choices, samples, reconciliation, verification and the final hash seed.
The qubit calculation describes particular source and measurement behavior. Real sources can reveal settings in timing, spectrum or intensity. Detectors can have basis-dependent efficiency, afterpulsing or responses outside the intended optical modes. Random choices and laboratory isolation must also match the model. A proof can include imperfections, but their effect must be bounded; a low measured QBER alone is not a substitute (Gottesman et al., 2004).
Weak coherent pulses
Section titled “Weak coherent pulses”A phase-randomized coherent pulse of mean photon number has Poisson photon-number probabilities
Multiphoton pulses invalidate the literal single-qubit story because Eve may, under an insufficient proof model, retain one photon and forward another. Decoy-State QKD varies intensity to estimate single-photon contributions without assuming Eve treats signal and decoy labels honestly. That analysis requires the photon-number sector to be indistinguishable between intensity settings except for its occurrence probability. Cryptography case studies applies such estimates to a modeled optical link.
Loss and accepted events
Section titled “Loss and accepted events”In an ideal model, channel loss can be treated as erasure and Eve may control which signals arrive. Security comes from the statistics of accepted events, not from the absence of detections. If acceptance depends on basis, bit, wavelength, arrival time, detector control, or a leaked source mode, the surviving sample may not represent the intended qubit ensemble.
Finite statistics
Section titled “Finite statistics”The asymptotic identity between test and key error rates is replaced by a confidence statement. A finite-key analysis must account for sampling without replacement, smoothing or entropy-estimation terms, error-correction leakage, verification failure, privacy-amplification failure, authentication failure, and all abort branches. Quantum Key Distribution explains those finite-block terms; Tomamichel et al. (2012) derive a finite-key BB84 bound.
BBM92 implements an entanglement-based version of the two-basis idea; E91 and entanglement-based QKD explains why distributing entanglement does not itself remove measurement trust. MDI-QKD instead sends characterized states from both endpoints to an untrusted relay. These changes require their own security arguments.
Exercises
Section titled “Exercises”1. Verify mutual unbiasedness
Section titled “1. Verify mutual unbiasedness”Compute all four cross-basis probabilities .
Solution
Using
one obtains
Thus either state in one basis gives a uniform outcome when measured in the other basis.
2. Count sifted rounds
Section titled “2. Count sifted rounds”Suppose signals produce valid detections, with detection independent of both basis choices. How many sifted rounds are expected with uniform independent bases? What is the basis-match probability if both parties choose with probability ?
Solution
Uniform choices match with probability , so the expected sifted count is
With ,
This would yield matched detections on average, but the -matched subset has expected fraction and may be too small for the desired finite statistical bound.
3. Partial intercept–resend
Section titled “3. Partial intercept–resend”In an otherwise noiseless ideal system, the measured QBER is . If every error is attributed to the partial intercept–resend model, what attacked fraction would explain it, and how much sifted-bit information would Eve have in that model?
Solution
Since ,
Eve knows the bit on half of the intercepted sifted rounds, so her mutual information in this simplified model is
bit per sifted bit. This inference is not valid for a general attack or a noisy implementation; it is specific to the stated model.
4. A biased bit can reveal the basis
Section titled “4. A biased bit can reveal the basis”Alice chooses the two bases with equal probability, but her encoded bit is zero with probability . Find and . What is the optimal single-signal probability of guessing the basis?
Solution
Writing , the two averages are
The difference has eigenvalues . Thus their trace distance and optimal equal-prior discrimination success are
Uniform bits give , as expected. For , the success probability is about . Equality of the two basis ensembles therefore depends on uniform bit preparation. This example does not imply that every known bias destroys key generation; it changes the source model and its security analysis. Trace distance explains the optimal equal-prior discrimination rule.
5. Find the ideal one-way threshold
Section titled “5. Find the ideal one-way threshold”Solve numerically. Evaluate the asymptotic fraction at .
Solution
The root satisfies and is
At ,
so
secret bit per sifted key bit under the ideal asymptotic assumptions.
6. Zero bit error with a nonzero phase error
Section titled “6. Zero bit error with a nonzero phase error”Take as the key basis. The channel applies with probability and does nothing otherwise. Find the -basis bit-error rate, the -basis test-error rate and the asymptotic key-fraction bound for .
Solution
The channel is
Both and are unchanged as physical rays, so . But and , so the -basis disagreement rate is . In this ideal model it bounds the phase-error rate of the key, giving
At the channel fully dephases in the key basis and the bound is zero despite perfect key-basis agreement. Measuring in and resending realizes that channel and lets Eve know every bit. Complementary-basis tests reveal the lost coherence.
7. Sifting with unequal detection efficiencies
Section titled “7. Sifting with unequal detection efficiencies”Both parties choose with probability . Bob detects a signal with probability when he chooses , and probability one when he chooses , independently of Alice’s setting and bit. What fraction of detections have matching bases?
Solution
The detection probability is . The matching-detection probability is . Hence
The unconditional basis-match probability is , so it cannot be applied to the detected count here. Among detections, about are matched in a large sample. This elementary counting example does not by itself establish a security reduction for the inefficient receiver.
8. Estimate an asymptotic output length
Section titled “8. Estimate an asymptotic output length”After testing, Alice has sifted key bits. Suppose a justified asymptotic model gives , reconciliation uses , and all finite-size, verification, and authentication terms are temporarily omitted. Estimate the remaining secret bits.
Solution
The engineering estimate is
Since ,
This is not a finite-key output length because the exercise explicitly omitted statistical, smoothing, verification, and authentication penalties. A real protocol must use a proven finite-key entropy bound and its associated failure parameters before choosing the hash length.
References
Section titled “References”- C. H. Bennett and G. Brassard, “Quantum Cryptography: Public Key Distribution and Coin Tossing,” in Proceedings of the IEEE International Conference on Computers, Systems and Signal Processing, Bangalore, 175–179 (1984); reprinted in Theoretical Computer Science 560, 7–11 (2014), doi:10.1016/j.tcs.2014.05.025.
- A. Chefles, “Unambiguous Discrimination Between Linearly-Independent Quantum States,” Physics Letters A 239, 339–347 (1998), arXiv:quant-ph/9807022.
- D. Gottesman, H.-K. Lo, N. Lütkenhaus, and J. Preskill, “Security of Quantum Key Distribution with Imperfect Devices,” Quantum Information and Computation 4, 325–360 (2004), doi:10.26421/QIC4.5-1.
- H.-K. Lo, H. F. Chau, and M. Ardehali, “Efficient Quantum Key Distribution Scheme and Proof of Its Unconditional Security,” Journal of Cryptology 18, 133–165 (2005), arXiv:quant-ph/0011056.
- P. W. Shor and J. Preskill, “Simple Proof of Security of the BB84 Quantum Key Distribution Protocol,” Physical Review Letters 85, 441–444 (2000), doi:10.1103/PhysRevLett.85.441.
- M. Tomamichel, C. C. W. Lim, N. Gisin, and R. Renner, “Tight Finite-Key Analysis for Quantum Cryptography,” Nature Communications 3, 634 (2012), doi:10.1038/ncomms1631.