Protocol (Bennett and Brassard).
- Preparation. For each round, Alice picks a bit and a basis uniformly at random and sends (basis ) or (basis ) encoding .
- Measurement. Bob picks a basis at random and measures, obtaining .
- Sifting. Over the public channel they announce bases and keep rounds with , about half of them. In the absence of noise and eavesdropping, in every kept round.
- Parameter estimation. They reveal a random sample of kept rounds and compute the quantum bit error rate , the fraction with . If is too high, they abort.
- Error correction. Alice sends syndrome information so that Bob can correct his string to hers, leaking about bits per bit in the ideal case.
- Privacy amplification. Both apply a randomly chosen two-universal hash, shortening the string to a length that the security proof certifies as secret (see the leftover hashing lemma).
The 1984 paper describes steps 1 to 4, with the public comparison of a random subset of bits as the eavesdropping test; error correction and privacy amplification by hashing were added in later work.
Why eavesdropping is detected: the intercept-resend attack. Suppose Eve measures every qubit in a random basis and resends what she found. In a sifted round she chooses the wrong basis with probability ; she then sends, for example, for a -basis bit, and Bob's measurement is wrong with probability . So she causes while learning the sifted bit only half of the time. More generally, any measurement that gains information about states from two conjugate bases disturbs them; this is the information–disturbance trade-off behind the no-cloning theorem.
Security. Security against arbitrary attacks was proved by Mayers and, by reduction to entanglement distillation with CSS codes, by Shor and Preskill; for one-way post-processing the asymptotic key rate is (see the Shor–Preskill rate). Bennett, Brassard and Mermin observed that BB84 is equivalent to an entanglement-based protocol in which a source distributes Bell pairs, which is the starting point of these proofs. Finite-key, composable proofs follow Renner. Practical implementations use attenuated laser pulses with decoy states; see Scarani et al..