Two people who wish to encrypt messages need a shared secret key. Quantum key distribution addresses a more specific question: can Alice and Bob use a quantum channel, together with authenticated classical communication, to produce correlated bits while checking for evidence of interference? For the protocol and probabilities below, assume ideal single-qubit signals, no loss or noise, and independently uniform choices of Alice’s bit and both bases. The quantum channel need not be trusted, but the authenticity of the classical discussion matters; an information-theoretically authenticated channel can be established using a short previously shared secret. An adversary who can impersonate each participant to the other can run separate exchanges with them.
BB84 uses two incompatible measurement bases. A recipient measuring in the wrong basis obtains a random result and alters the state sent onward. This observation gives a quantitative test for a particular attack. It does not, by itself, prove security against all possible attacks or imperfect devices.
The four states and basis choice
The computational or basis is . The basis consists of
Assign bit 0 to or , and bit 1 to or , according to the selected basis. Within either basis the states are orthogonal and are perfectly distinguished by a measurement in that basis. Across bases every squared inner product is . For example, . A measurement on gives either outcome with probability and leaves the corresponding state; it does not preserve .
Concept lensGeometric
The four states as four points on a Bloch circle
A pure qubit state corresponds to a point on the Bloch sphere, and two states at angle between their Bloch vectors have squared overlap . The two states of one basis are antipodal (, overlap ). The two bases are perpendicular axes (, overlap ), so sit at steps on one great circle.
In the ideal protocol, Alice independently chooses a uniformly random bit and one of the two bases and sends the corresponding state. Bob independently chooses a uniformly random basis and measures in it. After the quantum transmission, they publicly announce their bases, but not their bit values. They discard positions where the bases differ.
Definition 5.1.1
(Sifted key)
The sifted key consists of the positions at which Alice's and Bob's announced bases agree, with the bits Alice sent and Bob measured at those positions.
In the absence of noise and interference, the retained bits agree. Each position is retained with probability , so among independent transmissions the expected number retained is , not a guaranteed exact count.
Alice and Bob then publicly compare a randomly chosen subset of the sifted positions to estimate disagreement. The disclosed test bits must not be kept secret as key bits. On the remaining data, practical key generation also requires error correction and privacy amplification, followed by an appropriate security analysis. Sifting and a low observed error rate alone do not constitute those later steps.
Why a perfect undisturbed copy is impossible
Proposition 5.1.2
(No device copies all four BB84 states)
There is no unitary and fixed blank state with for each of , and .
Proof
(Linearity contradicts the copy of the plus state)
Such a device would copy both and . By linearity, its action on and the fixed blank would then produce , not . Thus no such universal copying device exists.
The argument does not say that known orthogonal states cannot be copied: the two computational basis states can be copied by a controlled-NOT gate.
A stronger, still idealized statement concerns a probe that need not contain a perfect copy. Assume Eve uses the same unitary interaction on each single transmitted qubit and a probe initially in a fixed pure state .
Theorem 5.1.3
(No information without disturbance for one signal)
Suppose Bob's outgoing qubit is exactly unchanged for all four BB84 inputs. Then Eve's final probe state is the same for all four inputs, so measuring it gives no information about the bit or basis.
Proof
(Factorization and comparison of probe states)
No measurement of Eve's probe is made before this interaction. Because Bob's reduced output state is the same pure state as the input, its joint state with Eve's probe factors as
where the probe states are normalized. Linearity sends to . For Bob's output to remain , the joint state must equal for some probe state. Comparing coefficients of and gives . The same equality makes linearity send to as well. Consequently Eve's final probe state is the same for all four inputs.
Proof X-ray
Where purity and the second basis are used
The factorization step is the non-obvious move: if a bipartite pure state has a pure reduced state on Bob's system, its Schmidt decomposition has only one nonzero term, so the joint state is a product. The input-output equalities use one common linear phase convention; any input-dependent overall phases are included in the probe kets before comparing them. The -basis inputs alone give no constraint, since and may differ, which is exactly the information a copying controlled-NOT leaves in the probe. The input is where the second basis enters: its coherence forces the two probe kets to coincide. A mixed initial probe can be purified by including an additional reference system; the same conclusion applies when Eve is given that reference too.
This proves an exact no-information-with-zero-disturbance statement under the stated single-signal model. It does not quantify what Eve can learn under small nonzero disturbance, or prove security against arbitrary attacks on many signals.
Intercept–resend: where 25% comes from
Definition 5.1.4
(Intercept–resend attack)
In the full intercept–resend attack, Eve attacks every signal independently: she chooses or uniformly at random, measures in that basis, and sends Bob a freshly prepared state matching her outcome.
Assume noiseless preparation, transmission and measurement, perfect single-qubit signals, and authenticated public communication. Alice's bit and both parties' basis choices are independent and uniformly random. Consider a position after sifting, so Alice's and Bob's bases agree.
Theorem 5.1.5
(Error rate of full intercept–resend)
Under the full intercept–resend attack in the ideal model, the probability that Bob's bit differs from Alice's, conditioned on the position being sifted, equals .
Proof
(Condition on Eve's basis)
Eve's basis agrees with theirs with probability . In that case her measurement returns Alice's bit with certainty, and Bob receives it without error. With probability Eve chose the other basis. Her outcome is then uniformly random; the state she resends yields Alice's bit in Bob's basis with probability and the opposite bit with probability . Therefore
The 25% figure is the conditional error rate among sifted bits, not the probability that every transmitted signal causes a detected error. A random sifted test position agrees with probability under this model. If Alice and Bob compare independently attacked sifted positions, the probability that none disagrees is ; for it is approximately . This is a probability of escaping this particular test under this particular attack, not a general bound on all of Eve's information.
Worked example 5.1.6
(A wrong-basis interception)
Alice sends and Bob uses the basis. If Eve measures , she obtains or with equal probability. Either state yields or with equal probability when Bob measures . Hence this wrong-basis branch has error probability ; it is not an error with certainty. If Eve had measured instead, the retained bit would be correct.
Worked example 5.1.7
(Attacking only a fraction of the signals)
If Eve independently attacks only a fraction of signals under the same ideal random-basis strategy, and leaves the rest untouched, the sifted error probability is . Independent attack decisions and test positions then give probability of no disagreement in tested sifted bits. For , no attack-induced errors appear; for , the full intercept–resend calculation is recovered. A finite observed sample can deviate from its expectation.
Worked example 5.1.8
(How many test bits give 99% detection?)
Under full intercept–resend the chance that tested sifted bits show no disagreement is . Detection with probability at least requires , that is . Checking directly, , while . So tested bits suffice for this particular attack, and do not.
Common mistake
(Conditioning on sifting twice)
Sifting first fixes the event that Alice's and Bob's bases match. Eve still matches that common basis with probability one half because her choice is independent. Only the other half of the cases has a one-half chance of a wrong bit. Multiplying these conditional probabilities gives one quarter; multiplying by Bob's separate sifting probability of one half would answer a different question and give .
What the test does and does not establish
An observed disagreement can be caused by device noise as well as an adversary. Conversely, a finite sample may miss errors. A practical protocol chooses an abort rule and uses statistical bounds to infer something about the untested positions. The simple formula above assumes independent intercept–resend errors; it cannot be applied unchanged to a correlated or otherwise general attack.
Privacy amplification compresses partially secret correlated data to a shorter key, with a length determined by an appropriate bound on Eve's information and on information revealed during reconciliation. A complete security proof must specify the physical and adversarial model, authenticated communication, finite-size confidence and the security definition. No such general proof follows solely from the no-cloning theorem or the 25% calculation.
Counterexample mode
No observed error does not prove Eve learned nothing
Claim: if the tested bits show no disagreement, Eve learned nothing. Take full intercept–resend and tested positions. Each tested position agrees with probability , so all ten agree with probability , although Eve intercepted every signal. If an untested sifted position remains, Eve chose the matching basis for it with probability and then learned that bit exactly, so with positive joint probability the test is passed and she holds a key bit. Passing a test is evidence interpreted through an explicit model, not logical proof that the attack did not occur. The repair is to state a confidence level: with the model above, clean tests would reduce the escape probability below .
Practice with solutions
Quick check
(Alice sends ; Eve measures in the basis and resends the observed state. Bob measures in the basis. Find Bob's error probability.)
Decide what states Eve can resend.
Solution · Answer
Eve obtains or with equal probability; either gives Bob with probability . The error probability is .
Quick check
(Under full random-basis intercept–resend, what is the expected number of disagreements in 200 sifted test bits? Is that number certain?)
Use linearity of expectation with error probability per bit.
Solution · Answer
Each test bit has error probability , so the expected number is by linearity of expectation. The actual count is random; 50 is not guaranteed.
Quick check
(Under the same independent model, Eve attacks each signal with probability . Find the sifted error probability and the probability that 20 tested sifted bits contain no disagreement.)
Use and .
Solution · Answer
The error probability is , and the no-disagreement probability is .
Quick check
(Why must Alice and Bob discard the publicly compared bits, and why must their classical messages be authenticated?)
Think about who hears the public discussion.
Solution · Answer
The public comparison reveals the test values to Eve, so those values cannot remain secret key bits. Authentication prevents an adversary from impersonating Alice and Bob in separate exchanges; quantum transmission alone does not authenticate the classical discussion.