Quantum Cryptography
Quantum: where the impossible is merely unmeasured.
Today, we’re kicking off our very first post on quantum computing.
Quantum is a hot topic—and many believe it holds the key to humanity’s future. Yet, for most people (myself included), it remains shrouded in mystery. That’s exactly why I’ve decided to write a series of posts exploring the basics of quantum theory and its potential applications.
In this first post, here’s what we’ll be diving into:
- Quantum Cryptography and Quantum Key Distribution (QKD)
- Photon
- BB84 Protocol
Quantum Cryptography
Unlike classical cryptography, which relies on complex mathematical algorithms, quantum cryptography leverages the fundamental behavior of quantum particles—such as photons—to ensure security. Below are some of its key features:
- Eavesdropping Detection: thanks to the Heisenberg Uncertainty Principle, any measurement of a quantum system inherently disturbs its state. This means that if an eavesdropper tries to intercept the communication, the quantum states will be altered, resulting in a noticeable increase in the Quantum Bit Error Rate (QBER).
- Unconditional Security: the security of quantum cryptography is based on the unchanging laws of quantum mechanics rather than computational difficulty. Unlike RSA or AES, which could be broken by sufficiently powerful computers (including quantum ones), quantum cryptography offers theoretical immunity from such attacks.
- Secure Key Distribution: Quantum Key Exchange (QKE), often implemented as Quantum Key Distribution (QKD), allows two parties to generate and share a secret cryptographic key over an insecure channel—with provable, physics-based security guarantees.
Quantum Key Distribution
Quantum Key Distribution (QKD) is a secure method for two parties to share a secret key. This key can then be used for encryption and decryption, allowing QKD to seamlessly integrate with classical cryptography without replacing existing systems. In this series, we will explore the BB84 protocol in detail to understand how QKD works.
Photon
Photons exhibit both particle-like and wave-like properties depending on how they are observed or measured—this phenomenon is known as wave-particle duality.
- Particle-Like Behavior: photons behave as discrete packets of energy, each carrying a specific amount of energy proportional to the light’s frequency.
- Wave-Like Behavior: at the same time, photons exhibit wave characteristics such as interference and diffraction, which arise from their wave functions (probability distributions).
To understand how photons work in quantum cryptography, we first need to introduce the concept of polarization, which describes the orientation of their electric field oscillations. In QKD protocols, polarization is used to encode information.
Why polarization? Because measuring a photon’s polarization in a particular basis causes its quantum state to collapse to one of the basis states. This fundamental property is key to the security of quantum cryptography. We will explore this concept in more detail when discussing the BB84 protocol.
BB84 Protocol
As the first and most widely studied QKD protocol, BB84 leverages the quantum properties we’ve discussed to ensure that any eavesdropping attempt introduces detectable errors. But how exactly does BB84 work? Let’s break it down step-by-step:
- Photon Transmission: generate a random sequence of bits and randomly chooses a basis for each bit.
- Photon Measurement: receives each photon and measures its polarization, randomly choosing either the rectilinear or diagonal basis.
- Basis Reconciliation (Sifting): communicate over a public, authenticated classical channel to reveal their basis choices for each photon, not the bit values.
- Eavesdropping Detection: randomly select a subset of the shifted key bits and publicly compare the values over the classical channel.
- Error Correction: use classical error-correction protocols (e.g., Cascade) over the public channel to fix there errors.
- Privacy Amplification: apply a mathematical transformation (e.g., universal hashing) to the corrected key.
We’ve outlined all the steps of the BB84 protocol, but the most crucial ones are steps 1 through 4. To help you understand how it works, here’s a simple example illustrating the process.
| $k_i$ | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|---|---|
| Sender Basis | + | + | x | x | + | + | x | x |
| Polarization | ↔ | ↕ | ↗ | ↖ | ↔ | ↕ | ↗ | ↖ |
| Receiver Slit | ↔ | ↗ | ↔ | ↗ | ↔ | ↗ | ↔ | ↗ |
| Photon Operation | P | ? | ? | A | P | ? | ? | A |
| Receiver Estimate | 0 | 0/1 | 0/1 | 1 | 0 | 0/1 | 0/1 | 1 |
| Basis Comparison | T | F | F | T | T | F | F | T |
| Left/Discard | L | D | D | L | L | D | D | L |
where:
- +/x: Rectilinear or Diagonal basis
- ↔/↕: Horizontal or Perpendicular Polarization
- ↗/↖: 45 Degree or -45 Degree Polarization
- P/A: Pass or Absord
- T/F: False or True
From the table above, the sender randomly chooses the bits, selects the bases, sends photons and its rules accordingly:
- Bits: [0, 1, 0, 1, 0, 1, 0, 1]
- Bases: [R, R, D, D, R, R, D, D] → R(Rectilinear)/D(Diagonal)
- Photons: [(0, Rh), (1, Rv), (0, D), (1, -D), (0, Rh), (1, Rv), (0, D), (1,-D)]
| $k_i$ | 0 | 1 |
|---|---|---|
| Rule1 | ↔ | ↕ |
| Rule2 | ↗ | ↖ |
Then, the receiver measures the photons using their own randomly chosen bases, where we define the estimates as follows:
| $k_i$ | Pass | Absord |
|---|---|---|
| ↔(+) | 0 | 1 |
| ↗(x) | 0 | 1 |
In cases where the receiver’s basis matches the sender’s, the measurement yields the correct bit value. Otherwise, the result is completely random and indeterminate. Because of this, only about 50% of the bits remain usable at the end of the process.
Conclusion
We have introduced a completely new system that can work alongside our existing technologies. Quantum mechanics still holds many mysteries waiting to be explored and promises to usher in a new era. While a deep understanding of the physics behind quantum mechanics may not be necessary for everyone, gaining a basic insight is definitely worthwhile.