|q⟩ Bad Qubits

advanced · Physics · Quantum Cryptography & QKD

Cryptography Basics

Before any qubit appears, it pays to be precise about what problem cryptography is trying to solve and where the genuinely hard part lives. Quantum key distribution does not replace classical cryptography wholesale — it attacks one specific, stubborn link in the chain: getting a shared secret key into two distant hands without anyone else learning it.

The one-time pad: perfect secrecy exists

Suppose Alice wants to send Bob an nn-bit message m{0,1}nm \in \{0,1\}^n. If the two of them already share a uniformly random secret key k{0,1}nk \in \{0,1\}^n of the same length, Alice transmits the ciphertext

c=mk,c = m \oplus k,

the bitwise XOR. Bob recovers the message by XOR-ing again, since ck=mkk=mc \oplus k = m \oplus k \oplus k = m. This is the one-time pad, and Shannon proved it offers information-theoretic (perfect) secrecy: for a key drawn uniformly at random and used only once, the ciphertext cc is statistically independent of mm. An eavesdropper holding cc learns nothing — every plaintext remains exactly as likely as before.

Pr[M=mC=c]=Pr[M=m].\Pr[M = m \mid C = c] = \Pr[M = m].

Perfect secrecy is not a conjecture or a hardness assumption; it is a theorem. No amount of computation — classical or quantum — breaks a properly used one-time pad.

The catch: key distribution

The one-time pad has two unforgiving requirements: the key must be as long as the message and must be used only once. Reusing a pad is catastrophic, because c1c2=m1m2c_1 \oplus c_2 = m_1 \oplus m_2 leaks the XOR of the two plaintexts. So Alice and Bob constantly burn through key material, and they must somehow keep replenishing a shared secret. How do two parties who have never met agree on a large random key over a public channel an adversary can monitor? This is the key-distribution problem, and it is the real bottleneck.

How classical cryptography copes

Modern classical cryptography sidesteps the bottleneck two ways:

Both rest on computational hardness. That foundation has a quantum-shaped crack: Shor's algorithm factors integers and computes discrete logarithms in polynomial time, breaking RSA and Diffie–Hellman outright once a large fault-tolerant quantum computer exists. A message encrypted today and recorded can be decrypted later — the "harvest now, decrypt later" threat.

Where quantum key distribution fits

Quantum key distribution (QKD) returns to the gold standard of the one-time pad by solving the key-distribution problem with information-theoretic security. Instead of assuming an adversary cannot compute something, QKD leans on a law of physics: an unknown quantum state cannot be copied or measured without disturbance. Alice and Bob exchange quantum signals, then use a public classical channel to check whether those signals were disturbed. If the disturbance is small enough, they distill a shared secret key whose secrecy is guaranteed against an adversary bounded only by the laws of quantum mechanics — not by their computing power.

The rest of this module builds that idea precisely: the BB84 protocol and its use of conjugate bases, why eavesdropping is detectable, the entanglement-based E91 protocol, and the classical post-processing (reconciliation and privacy amplification) that turns a noisy, partially-leaked raw key into a short, perfectly secret one.

Sign in on the full site to ask questions and join the discussion.