Fiveable
Fiveable
Fiveable
Fiveable

11.2 Quantum key distribution (BB84 protocol)

3 min readLast Updated on July 23, 2024

Quantum Key Distribution (QKD) uses quantum mechanics to securely share cryptographic keys. The BB84 protocol, a popular QKD method, leverages quantum principles like superposition and entanglement to detect eavesdropping attempts during key exchange.

BB84 involves preparing qubits, transmitting them over a quantum channel, measuring them, and discussing results publicly. Through error estimation, correction, and privacy amplification, Alice and Bob can establish a secure key for encrypted communication.

Quantum Key Distribution (QKD) and the BB84 Protocol

Principles of quantum key distribution

Top images from around the web for Principles of quantum key distribution
Top images from around the web for Principles of quantum key distribution
  • Utilizes quantum mechanics principles (superposition, entanglement) to securely distribute cryptographic keys between two parties (Alice and Bob)
  • Quantum states (qubits) are used to encode and transmit the key
    • Qubits can exist in multiple states simultaneously until measured
    • Measuring a qubit collapses its state to a single value (0 or 1)
  • Any attempt to intercept or measure the qubits during transmission alters their states irreversibly
    • This alteration introduces detectable errors in the key
    • Presence of errors alerts Alice and Bob to potential eavesdropping attempts
  • Advantages over classical key distribution methods:
    • Unconditional security guaranteed by laws of quantum mechanics
    • Eavesdropping attempts are detectable due to introduced errors
    • Security does not rely on assumed computational limitations of adversaries

Steps in BB84 protocol

  1. State preparation:
    • Alice prepares a sequence of qubits, each randomly in one of four states:
      • 0|0\rangle, 1|1\rangle (computational basis)
      • +|+\rangle, |-\rangle (Hadamard basis)
    • Basis choice for each qubit is random and independent
  2. Quantum channel transmission:
    • Alice sends the prepared qubits to Bob over a quantum channel (optical fiber, free space)
    • Qubits maintain their quantum states during transmission
  3. Measurement:
    • Bob measures each received qubit independently in a randomly chosen basis
      • Computational basis (0|0\rangle, 1|1\rangle) or Hadamard basis (+|+\rangle, |-\rangle)
    • Bob records the measurement result (0 or 1) and the corresponding basis for each qubit
  4. Public discussion and key sifting:
    • Alice and Bob communicate over an authenticated classical channel (not secure)
    • They compare their chosen bases for each qubit
    • Qubits measured in mismatched bases are discarded
    • Remaining qubits form the raw key (sifted key)
  5. Error estimation and correction:
    • Alice and Bob compare a random subset of their raw key bits
    • Differences indicate potential eavesdropping or channel noise
    • If error rate is below a predetermined threshold, they proceed with error correction
      • Corrects errors using classical error correction techniques (CASCADE, LDPC)
  6. Privacy amplification:
    • Alice and Bob apply a hash function to the error-corrected key
    • Reduces any potential information leakage to an eavesdropper
    • Resulting final key is used for secure communication (one-time pad encryption)

Security of BB84 protocol

  • Eavesdropping attacks:
    • Intercept-resend attack:
      • Eve intercepts qubits, measures them, and sends new qubits to Bob
      • Introduces errors due to measuring in bases incompatible with Alice and Bob's
      • Detected during key comparison and error estimation
    • Beam-splitting attack:
      • Eve attempts to split the quantum signal and measure a portion
      • Introduces detectable errors and reduces signal strength received by Bob
  • Unconditional security:
    • BB84 protocol's security relies on fundamental principles of quantum mechanics
      • No-cloning theorem: Qubits cannot be perfectly copied without altering the original
      • Uncertainty principle: Measuring a qubit in one basis disturbs its state in other bases
    • Eavesdropping attempts inevitably introduce detectable errors
    • Security does not depend on assumed computational limitations of adversaries

Implementation of BB84 protocol

  • Quantum circuit implementation:
    • Qubits represent the quantum states prepared by Alice
    • Quantum gates (Hadamard, X) prepare qubits in desired bases and states
    • Quantum channel simulated by transmitting qubits to Bob
    • Bob's measurements implemented using basis gates and measurement operations
  • Simulation steps:
    1. Generate random bit sequence for Alice's key
    2. Encode each bit into a qubit using randomly chosen bases
    3. Simulate qubit transmission through the quantum channel
    4. Perform measurements on received qubits according to Bob's random bases
    5. Compare Alice and Bob's bases, discard mismatched bits (raw key)
    6. Estimate error rate, perform error correction and privacy amplification
    7. Obtain final secure key
  • Simulation analysis:
    • Verify Alice and Bob's final keys are identical
    • Introduce simulated eavesdropping, observe resulting errors
    • Demonstrate eavesdropping detection and secure key distribution


© 2025 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2025 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.
Glossary
Glossary