πŸŽ‰ 75% of content is free forever β€” Unlock Premium from $10/mo β†’
CW
NEWSLIVESearch All Content
πŸ’Ό Servicesℹ️ Aboutβœ‰οΈ ContactView Pricing Plansfrom $10

Quantum Key Distribution

Quantum ComputingQuantum Key Distribution🟒 Free Lesson

QKD Security Framework

QKD provides information-theoretic security guaranteed by quantum mechanics. The security relies on:

  1. No-cloning theorem: eavesdropper cannot copy quantum states
  2. Measurement disturbance: measuring in the wrong basis introduces errors

The final secret key rate for BB84:

where is the error rate, is the binary entropy function, and is the error correction efficiency.

Plug in real numbers and the formula stops being decoration. At a quantum bit error rate of 1% the entropy term is 0.081, so with roughly 0.84 bits survive per sifted bit. At 5% the same calculation leaves 0.44, and at 11% β€” the usual security threshold for short keys β€” only 0.025 bits remain: essentially the whole run is spent reconciling errors. That curve is the operating constraint of every deployed system. Teams hold the error rate near 1–3% with active stabilisation, and abort the run rather than post-process a key whose rate has collapsed, because a key that costs more classical communication than it yields has no value left to protect.

BB84 Protocol (Detailed)

Encoding:

BitZ-basisX-basis
0|0⟩|+⟩
1|1⟩|βˆ’βŸ©

Steps:

  1. Alice sends qubits with random bit and basis choices
  2. Bob measures each qubit in a random basis
  3. Public basis reconciliation: keep only matching-basis rounds
  4. Sifted key: approximately bits remain
  5. Parameter estimation: publicly compare subset to estimate error rate
  6. Error correction: reconcile errors (e.g., Cascade protocol)
  7. Privacy amplification: compress to final key

Each step has a budget. Sifting throws away half the rounds by construction, so sending photons yields at best sifted bits before channel loss. Parameter estimation typically spends 5–10% of the sifted key to estimate the error rate to a few tenths of a percent. Cascade is interactive and leaks about bits per sifted bit over the authenticated channel, which must be subtracted in the analysis. Privacy amplification then compresses with a universal hash to roughly bits, and the leftover-hash lemma makes that remainder secure against an attacker who saw every public message.

E91 Protocol

The E91 protocol uses entanglement and Bell's inequality:

  1. Source produces Bell pairs
  2. Alice and Bob measure in randomly chosen bases
  3. Key generation: same-basis measurements
  4. Security check: different-basis measurements test Bell's inequality

The CHSH parameter:

If , Bell inequality is violated, confirming security.

Three numbers define the test: a classical local-hidden-variable strategy is bounded by 2, quantum mechanics reaches , and a real optical implementation with detector dark counts and afterpulsing typically lands around 2.4. The security argument needs the observed value to sit above 2 with a statistical margin, so the test consumes a chunk of the raw key and a finite-key analysis converts that margin into a bound on how much information Eve could hold. A measured value drifting toward 2 mid-run is the alarm signal β€” it means either a fault or an eavesdropper, and the protocol cannot distinguish the two, so it aborts.

Device-Independent QKD

DI-QKD provides security even when devices are untrusted:

  1. Security relies only on the observed Bell violation
  2. No assumptions about the internal workings of devices
  3. The Bell violation certifies the presence of entanglement

DI-QKD requires high-efficiency detectors (above roughly 82% for CHSH-based schemes), low-loss channels, and high-rate sources.

The efficiency figure is the hard wall: if more than about 18% of the qubits go undetected, an adversarial device can hide its computation in the loss and the Bell violation no longer certifies anything. Commodity avalanche detectors run at 10–25% system efficiency, which is why laboratory DI-QKD pairs superconducting nanowire detectors (near-unity efficiency at 1550 nm, but requiring cryogenics) with short, low-loss links. Demonstrated rates sit in the bits-per-hour to bits-per-second range β€” far below prepare-and-measure QKD β€” so DI-QKD is currently a certification experiment rather than a key-delivery product.

Continuous-Variable QKD

CV-QKD uses quadratures of light instead of photon polarization:

  • GG02 protocol: uses coherent states and homodyne detection
  • Advantages: compatible with standard telecom components
  • Disadvantages: limited range, lower key rates at long distances

The secret key rate:

where is the reconciliation efficiency.

Reconciliation efficiency is where CV systems live or die: standard error-correcting codes achieve – over short links, but the efficiency falls sharply as the excess noise grows, and low destroys the key rate linearly. The other boundary is channel loss β€” direct reconciliation over one-way Gaussian modulation cannot produce key beyond roughly 3 dB of loss, while reverse reconciliation removes that ceiling and is what deployed CV systems use. The reward for solving both is hardware that fits on a standard telecom bench: commercial lasers, 50:50 beamsplitters and balanced photodiodes instead of single-photon counters.

QKD Networks

Practical QKD networks require:

  1. Trusted nodes: intermediate stations where keys are relayed
  2. Quantum repeaters: enable long-distance entanglement (not yet practical)
  3. Key management: key storage, distribution, and refresh

The Tokyo QKD Network and Beijing-Shanghai backbone demonstrate metropolitan and inter-city QKD.

The trust assumption is what makes long links work today. The Beijing–Shanghai backbone runs about 2000 km through 32 trusted relay sites: the quantum link never spans the full distance, so each intermediate station can read the key in the clear, and security reduces to guarding those rooms. Metropolitan deployments such as the Tokyo QKD Network and city-scale fibre rings show the same pattern at smaller scale β€” key rates of kilobits per second over tens of kilometres, enough to feed a one-time-pad for a limited stream or, more commonly, to refresh a symmetric key for an AES link. Twin-field and measurement-device-independent protocols push the direct span past 400 km, but they do not remove the need for a network layer that manages key buffers, expiry and rekey intervals.

Python: QKD Security Analysis

python
import numpy as np

def bb84_key_rate(n, error_rate, efficiency=0.95):
    def h(x):
        if x <= 0 or x >= 1: return 0
        return -x * np.log2(x) - (1-x) * np.log2(1-x)
    e = error_rate
    rate = 1 - h(e) - efficiency * h(e)
    return max(0, rate) * n

n = 1000000
for e in [0.01, 0.05, 0.11, 0.15]:
    rate = bb84_key_rate(n, e)
    print(f"QBER={e:.2f}: {rate:.0f} bits ({100*rate/n:.1f}%)")

correlations = [1, -1, -1, 1]
S = abs(correlations[0] - correlations[1] + correlations[2] + correlations[3])
print(f"CHSH: S = {S:.3f} (max = {2*np.sqrt(2):.3f})")

The rate column is the one to watch: 84% at 1% error, 44% at 5%, and 2.5% at 11% β€” a factor of 34 between a healthy link and one sitting on the abort threshold, from a single parameter. The CHSH line prints 2.000 for the correlation signs listed above, which is exactly the classical bound: that assignment is one a local model can reproduce, so it certifies nothing. Security comes from pushing into the gap between 2 and the quantum maximum of 2.828, and the whole margin a real system has to work with lives in that sliver.

Python: Link Budget

Estimating how many secure bits a real fibre run produces, including loss and the composable finite-key penalty:

python
import numpy as np

def h2(x):
    if x <= 0.0 or x >= 1.0:
        return 0.0
    return -x * np.log2(x) - (1 - x) * np.log2(1 - x)

def link_budget(n_sent, length_km, qber, f_ec=0.95, eta_det=0.10, eps=1e-10):
    alpha = 0.2                                   # dB/km at 1550 nm
    channel = 10 ** (-alpha * length_km / 10)
    sifted = 0.5 * n_sent * channel * eta_det     # basis match x loss x detector
    leaked = f_ec * sifted * h2(qber)             # error-correction leakage
    finite = 2 * np.log2(1 / eps)                 # composable security penalty
    secure = sifted * (1 - h2(qber)) - leaked - finite
    return sifted, leaked, max(0.0, secure)

for km in (10, 40, 80, 120):
    sifted, leaked, key = link_budget(1e8, km, qber=0.03)
    print(f"{km:3d} km  sifted={sifted:10.0f}  leaked={leaked:9.0f}  secure={key:9.0f}")

Doubling the distance costs a factor of in sifted bits: going from 40 km to 80 km keeps only 16% of the detections, and 120 km leaves under 1% of what 10 km produced. The finite-key penalty in this model is a flat 66 bits β€” invisible against sent photons, but a visible share of a run that only sends a few thousand, which is where composable terms actually bite.

What Breaks a Deployed QKD Link

Failure modes and the countermeasures that operators actually run:

Failure modeObserved symptomCountermeasure
Detector afterpulsing and dead timeError rate climbs as count rate risesAttenuate the source, gate the detectors, search the plateau rather than the peak
Photon-number splitting on weak pulsesEve samples multi-photon pulses losslesslyDecoy states at two or three intensities to bound the single-photon yield
Polarisation drift in buried fibreSifting rate drifts over hoursDaily or hourly basis alignment, stabilised reference pulses
Stray light and dark countsElevated baseline error floorNarrow spectral filtering, cooled detectors, night-time measurement windows
Compromised trusted relayKey exposed in the clear at the nodePhysical access control plus end-to-end encryption above the QKD layer
Authentication key exhaustionSession authentication fails after long uptimeRefresh the initial hash key from the generated key material

Every one of these appears in field reports rather than in protocol papers, and all of them move the effective error rate β€” the single quantity the secret-key formula reacts to. Monitoring that number continuously, with an abort threshold agreed before deployment, is the operational discipline that separates a lab demonstration from a link that carries traffic.

QKD Protocol Comparison

ProtocolBasisKey GenerationSecurity Proof
BB84DiscreteSifting + error correctionIndividual attacks
E91EntanglementBell inequalityCollective attacks
B922 statesDirectIndividual attacks
SARG04DiscreteImproved siftingCollective attacks
CV-QKDContinuousHomodyne detectionCollective attacks
MDI-QKDDiscreteBell measurement at untrusted relayMeasurement-device-independent

Common Mistakes

Treating a 11% error rate as a normal operating point

Fix: Hold the error rate near 1–3% and abort above the agreed threshold β€” at 11% only about 2.5% of sifted bits survive, which is below the cost of running the link

Assuming a trusted node keeps the link quantum-safe end to end

Fix: Each relay holds the key in the clear, so protect the nodes physically and keep application-layer encryption above the QKD layer

Comparing CV-QKD key rates without stating reconciliation efficiency

Fix: Report beta with the rate β€” standard codes reach 0.95 at short range and collapse as excess noise grows, and the key rate scales linearly with it

Ignoring finite-key terms because the run looks long

Fix: Subtract the composable penalty of two log-squared of one over epsilon β€” on short runs it consumes a visible share of the output

Key Takeaways

  • The secret-key formula is an operating budget: 1% error keeps 84% of sifted bits, 5% keeps 44%, and 11% keeps 2.5%, which is why links are stabilised to 1–3% and aborted rather than pushed through
  • BB84 spends half its rounds on sifting, 5–10% on parameter estimation and f times H of e on error correction, so a billion sent photons produce a much smaller usable key before privacy amplification
  • E91 security rests on a measured CHSH value above 2 against a quantum maximum of 2.83, and real setups sit near 2.4 with a finite statistical margin
  • Deployed long-haul QKD today runs through trusted relays or twin-field links, with field failures dominated by drift, afterpulsing and loss rather than by attacks on the protocol
CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-15

β€”
β˜†β˜†β˜†β˜†β˜†
0 ratings

Rate & Feedback

Need Expert Quantum Computing Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement