# Quantum networks, BB84, and post-quantum cryptography {#networks}

**Learning goals.** Separate entanglement distribution from classical communication, derive intercept–resend disturbance, and distinguish QKD from post-quantum cryptography.

## Networks distribute a quantum resource

A quantum network connects systems using quantum channels and classical coordination. It may distribute entanglement for teleportation, remote gates, sensing, or key distribution. It does not permit faster-than-light communication. Classical messages remain necessary for heralding, synchronization, correction information, and authenticated protocol steps.

Optical attenuation limits direct transmission. Ordinary repeaters cannot amplify arbitrary unknown quantum states by cloning. Quantum repeaters instead combine entanglement generation, memories, entanglement swapping, and, depending on the architecture, purification or error correction [@repeater; @internet].

Entanglement swapping starts with Bell pairs AB and CD. A Bell-basis measurement on BC projects the distant pair AD into a Bell state determined by the measurement result. Communicating the result identifies the Pauli correction. Entanglement need not have existed directly between A and D beforehand.

A remote gate can be constructed using shared entanglement and local operations with feed-forward. Main and colleagues demonstrated distributed quantum computation across an optical link between modules in 2025 [@network]. This is a concrete interconnect experiment, not an already deployed general-purpose quantum internet.

## BB84 prepares incompatible alternatives

Alice chooses a random bit a and a random basis, Z or X. She sends $|0\rangle$ or $|1\rangle$ for Z, and $|+\rangle$ or $|-\rangle$ for X. Bob independently chooses Z or X and measures.

Over an authenticated classical channel they announce bases, keeping only matching-basis positions. They do not publicly announce every retained bit. With uniform independent basis choices, about half the signals survive this **sifting** step. In an ideal noiseless channel, matching bases give equal bits [@bb84].

They sacrifice a subset to estimate errors, perform information reconciliation, account for information leaked during reconciliation, and apply privacy amplification. Authentication is essential; without it an attacker could conduct separate sessions with both parties.

## Derive the intercept–resend error

Suppose Eve intercepts every signal, independently chooses Z or X, measures, and sends the resulting state to Bob. Condition on Alice and Bob choosing the same basis.

Eve chooses that basis with probability $1/2$, introducing no error. With probability $1/2$, she chooses the conjugate basis. Bob's result is then random relative to Alice's, giving error probability $1/2$. Therefore

$$Q=\frac12(0)+\frac12\left(\frac12\right)=\frac14.$$

If Eve attacks a fraction e of signals, the ideal sifted QBER is e/4. Add an independent bit flip with probability q after the measurement. Combining XOR error events gives

$$Q_\mathrm{total}=q+\frac e4-2q\frac e4
=q+(1-2q)\frac e4.$$

The subtraction accounts for two flips canceling. Adding error probabilities without accounting for overlap is only a small-error approximation.

The 25% result concerns this specific attack. It is not a universal threshold guaranteeing security against all adversaries, nor does a low observed QBER prove the absence of side channels [@qkdreview].

::: {.lab #lab-bb84}
**Laboratory L26 — BB84 transmission.** Change intercepted fraction, teaching noise, signal count, and seed. Inspect preparation and measurement bases, sifted bits, and QBER. Export the complete simulated transcript.
:::

## From raw correlation to a secret key

An idealized asymptotic single-photon BB84 analysis with suitable symmetric assumptions yields a secret fraction per sifted bit of

$$r\ge1-2h_2(Q),\qquad
h_2(Q)=-Q\log_2Q-(1-Q)\log_2(1-Q).$$

One term accounts for reconciliation and the other for privacy reduction in the ideal bound. The expression becomes zero near Q≈11%. Real finite-key analyses include parameter-estimation uncertainty, imperfect reconciliation, authentication costs, loss, source assumptions, and a composable security parameter [@shorpreskill].

This formula is not a software recipe for production security. The browser uses it only to illustrate the difference between sifted correlation and asymptotic secret fraction. It does not generate a certified secure key.

Weak coherent laser pulses can contain multiple photons. Decoy-state methods help bound relevant contributions under a source model. Detector imperfections and implementation attacks motivate techniques such as measurement-device-independent QKD. Device-independent protocols use Bell tests under demanding assumptions; a simulated CHSH violation is not a security proof for a physical device.

## QKD and PQC address different layers

**Quantum key distribution** uses quantum signals plus authenticated classical communication to establish key material with a security proof under physical and protocol assumptions. It requires suitable quantum hardware and channels.

**Post-quantum cryptography (PQC)** consists of classical algorithms designed to resist known classical and quantum attacks. It can be deployed on ordinary computing and communication systems. It does not require a quantum link. Neither “post-quantum” nor “quantum-safe” means security against every imaginable future mathematical discovery.

NIST finalized FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA) in August 2024 [@nist]. ML-KEM is a key-encapsulation mechanism, not an encryption mode for arbitrary bulk data. ML-DSA and SLH-DSA are signature schemes. Correct protocol integration, implementations, and key management remain necessary.

Shor threatens the mathematical problems underlying widely used RSA and elliptic-curve systems at sufficient fault-tolerant scale. Grover changes generic search costs and motivates appropriate symmetric-security parameters, but it is not an immediate break of all symmetric encryption. Migration planning must consider long-lived confidential data that may be recorded now and attacked later; this is different from asserting that a cryptographically capable quantum machine already exists.

## Exercises

:::: {.exercise #ex22-1}
**22.1.** With 2,000 ideal signals and independent uniform basis choices, what is the expected sifted count?

::: {.solution}

1,000. Actual counts fluctuate binomially; the expectation is not a guaranteed exact total.
:::

::::

:::: {.exercise #ex22-2}
**22.2.** If Eve attacks 40% of signals with intercept–resend, find ideal QBER.

::: {.solution}

$0.4/4=0.1$, or 10%.
:::

::::

:::: {.exercise #ex22-3}
**22.3.** Add independent teaching bit flips q=0.02 to the previous case.

::: {.solution}

$Q=0.02+(1-0.04)(0.1)=0.116$, or 11.6%. Simple addition would give 12%, ignoring cancellations.
:::

::::

:::: {.exercise #ex22-4}
**22.4.** Why can Alice and Bob not publish all sifted bits while keeping them as a secret key?

::: {.solution}

Publishing reveals them to an adversary. Only a sacrificed sample is opened for estimation; reconciliation leakage must also be accounted for.
:::

::::

:::: {.exercise #ex22-5}
**22.5.** Match ML-KEM, ML-DSA, and BB84 to their roles.

::: {.solution}

ML-KEM: classical key encapsulation designed for post-quantum security. ML-DSA: classical digital signatures designed for post-quantum security. BB84: quantum-signal key distribution with authenticated classical processing.
:::

::::

