ArticleslgStudy

computer science

BB84

BB84 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand BB84 rather than just read about it. In short: The BB84 protocol, invented in 1984 by Charles Bennett and Gilles Brassard who later won the 2025 ACM A.M. Turing Award for their invention, is a prepare-and-measure quantum key distribution (QKD) protocol, in which, one party (e.g.

BB84 — main illustration
BB84 — illustration

Key takeaways

  • BB84 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect BB84 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of BB84 from memory before moving on to harder problems.

Reference excerpt

The BB84 protocol, invented in 1984 by Charles Bennett and Gilles Brassard who later won the 2025 ACM A.M. Turing Award for their invention, is a prepare-and-measure quantum key distribution (QKD) protocol, in which, one party (e.g. Alice) performs the encoding by preparing the quantum states, and the other party (e.g., Bob) measures them. The BB84 QKD scheme is the first quantum cryptography protocol, and has become one of the most well-studied QKD protocols. The protocol is provably secure assuming a perfect implementation, relying on two conditions: (1) the quantum property that information gain is only possible at the expense of disturbing the signal if the two states one is trying to distinguish are not orthogonal (see no-cloning theorem); and (2) the existence of an authenticated public classical channel. As such, the security of the BB84 protocol is fundamentally based on the principle that two non-orthogonal quantum states cannot be perfectly distinguished. This inherent limitation means that the states cannot be reliably copied, thereby ensuring a robust framework for secure quantum communication. The BB84 QKD protocol is usually explained as a method of securely communicating a private key from one party to another for use in one-time pad encryption. The proof of BB84 QKD scheme depends on a perfect implementation. Side channel attacks exist, taking advantage of non-quantum sources of information. Since this information is non-quantum, it can be intercepted without measuring or cloning quantum particles. The BB84 protocol provides a significant advance in the field of quantum cryptography and represents a pioneering step toward achieving secure communication in the quantum era.

Overview BB84 QKD system transmits individual photons through a fiber optic cable, with each photon representing a bit of data (zero or one). Polarizing filters on the sender's side set each photon's orientation, while the receiver uses beam splitters to read it. The sender and receiver then compare their photon orientations, with the matching set becoming the cryptographic key. However, encoding with other degrees of freedom, e.g., phase, is also possible, and the procedures are similar.

Description

In the BB84 scheme, Alice wishes to send a private key to Bob. She begins with two strings of bits, a and b, each n bits long. She then prepares an n-qubit state written as:

|ψ⟩=⨂i=1n|ψaibi⟩, where ai and bi are the i-th bits of a and b respectively. Together, aibi give us an index into the following four qubit states:

|ψ00⟩=|0⟩, |ψ10⟩=|1⟩, |ψ01⟩=|+⟩=12|0⟩+12|1⟩, |ψ11⟩=|−⟩=12|0⟩−12|1⟩. Note that the bit bi is what decides which basis ai is encoded in (either in the computational basis or the Hadamard basis). The qubits are now in states that are not mutually orthogonal, and thus it is impossible to distinguish all of them with certainty without knowing b. Alice sends |ψ⟩ over a public and authenticated quantum channel ℰ to Bob. Bob receives a state ℰ(ρ)=ℰ(|ψ⟩⟨ψ|), where ℰ represents both the effects of noise in the channel and eavesdropping by a third party we'll call Eve. After Bob receives the string of qubits, both Bob and Eve have their own states. However, since only Alice knows b, it makes it virtually impossible for either Bob or Eve to distinguish the states of the qubits. Also, after Bob has received the qubits, we know that Eve cannot be in possession of a copy of the qubits sent to Bob, by the no-cloning theorem, unless she has made measurements. Her measurements, however, risk disturbing a particular qubit with probability ⁠1/2⁠ if she guesses the wrong basis. Bob proceeds to generate a string of random bits b′ of the same length as b and then measures the qubits he has received from Alice, obtaining a bit string a′. At this point, Bob announces publicly that he has received Alice's transmission. Alice then knows she can now safely announce b, i.e., the bases in which the qubits were prepared. Bob communicates over a public channel with Alice to determine which bi and b'i are not equal. Both Alice and Bob now discard the bits in a and a′ where b and b′ do not match. From the remaining k bits where both Alice and Bob measured in the same basis, Alice randomly chooses k/2 bits and discloses her choices over the public channel. Both Alice and Bob announce these bits publicly and run a check to see whether more than a certain number of them agree. If this check passes, Alice and Bob proceed to use information reconciliation and privacy amplification techniques to create some number of shared secret keys. Otherwise, they cancel and start over.

See also SARG04 E91 – quantum cryptographic communication protocol

References

Worked examples

Example 1 — a first encounter with BB84

Start with the simplest possible case. Write down what BB84 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to BB84 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about BB84 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of BB84

In research
BB84 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses BB84 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
BB84 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic algorithms, Quantum cryptography, Quantum cryptography protocols, so understanding it makes those chapters shorter.
In everyday life
Look for BB84 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “BB84” →

How to study BB84 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what BB84 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain BB84 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is BB84 in simple terms?

The BB84 protocol, invented in 1984 by Charles Bennett and Gilles Brassard who later won the 2025 ACM A.M. Turing Award for their invention, is a prepare-and-measure quantum key distribution (QKD) protocol, in which, one party (e.g.

Why does BB84 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study BB84?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on BB84.

Tags

  • Cryptographic algorithms
  • Quantum cryptography
  • Quantum cryptography protocols
  • Quantum information science

Keep exploring