Documentation

CsdLean4.Empirical.QM.Crypto.BB84

Empirical/QM: BB84 quantum-key-distribution security (intercept-resend QBER) #

Category: 3-Local (QM-validity content, no CSD ontology).

BB84 (Bennett-Brassard 1984) encodes each bit in one of four states drawn from two mutually-unbiased bases:

An eavesdropper (Eve) who intercepts, measures, and resends cannot avoid disturbing the channel whenever she guesses the basis wrong, because the Z and X states are non-orthogonal. This is the information-disturbance tradeoff that makes eavesdropping detectable.

What this delivers (all Born-grounded) #

The Born transition probability is bornProb a b = ‖⟨a|b⟩‖², a genuine probability for unit vectors. On the canonical sifted round (Alice sends |0⟩ in Z, Bob reads Z, Bob's error is the |1⟩ outcome):

Honest scope #

This proves the intercept-resend QBER, its detectability, and the non-orthogonality disturbance root, all Born-grounded via ‖⟨a|b⟩‖². The intercept-resend error is modelled as a classical marginal over Eve's measurement outcome (Eve gets outcome k with Born probability bornProb (E k) |0⟩, resends the eigenstate E k, and Bob then errs with Born probability bornProb |1⟩ (E k)); no measurement-update / collapse operator is needed for this content.

The full composable finite-key security, phrased via a measurement-update (collapse) operator, remains out of scope — the same LF5 gate noted in Empirical/QM/Resources/Teleportation.lean (the measurement step proper: collapse of a superposition to a single classical outcome). This mirrors the E91 tranche, which obtained finite-key confidence via CHSH concentration (Crypto/E91FiniteKey.lean) rather than a collapse operator. Nothing beyond the intercept-resend model is claimed here.

References #

The four BB84 states #

Z-basis state |0⟩ = e₀.

Equations
Instances For

    Z-basis state |1⟩ = e₁.

    Equations
    Instances For

      X-basis state |+⟩ = (e₀ + e₁)/√2.

      Equations
      Instances For

        X-basis state |−⟩ = (e₀ − e₁)/√2.

        Equations
        Instances For
          noncomputable def CSD.Empirical.BB84.bornProb (a b : EuclideanSpace (Fin 2)) :

          The Born transition probability bornProb a b = ‖⟨a|b⟩‖². A genuine probability for unit vectors (= |⟨a|b⟩|²).

          Equations
          Instances For

            (√2⁻¹)² = ½: ‖(√2:ℂ)⁻¹‖² = 1/2. The only nonalgebraic fact used below.

            Born probability is symmetric: bornProb a b = bornProb b a. From inner_conj_symm (⟨a,b⟩ = conj ⟨b,a⟩) and Complex.norm_conj.

            Inner products of the BB84 states #

            ⟨0|1⟩ = 0 (Z orthonormality).

            ⟨1|0⟩ = 0 (Z orthonormality).

            ⟨0|+⟩ = (√2)⁻¹ (mutually unbiased).

            ⟨0|−⟩ = (√2)⁻¹ (mutually unbiased).

            ⟨1|+⟩ = (√2)⁻¹ (mutually unbiased).

            ⟨1|−⟩ = −(√2)⁻¹ (mutually unbiased).

            Born transition probabilities #

            bornProb |0⟩ |1⟩ = 0 (Z orthonormality).

            bornProb |1⟩ |0⟩ = 0 (Z orthonormality).

            bornProb |0⟩ |+⟩ = 1/2 (mutually unbiased).

            bornProb |0⟩ |−⟩ = 1/2 (mutually unbiased).

            bornProb |1⟩ |+⟩ = 1/2 (mutually unbiased).

            bornProb |1⟩ |−⟩ = 1/2 (mutually unbiased).

            The intercept-resend eavesdropping model #

            noncomputable def CSD.Empirical.BB84.zBasis :

            Eve's two measurement bases as Fin 2 → EuclideanSpace ℂ (Fin 2).

            Equations
            Instances For
              noncomputable def CSD.Empirical.BB84.irErrorZ0 (E : Fin 2EuclideanSpace (Fin 2)) :

              Intercept-resend error probability on the canonical sifted round (Alice sends |0⟩ in Z, Bob reads Z, error = the |1⟩ outcome). A classical marginal over Eve's outcome k: Eve gets k with Born probability bornProb (E k) |0⟩, resends the eigenstate E k, and Bob then errs with Born probability bornProb |1⟩ (E k).

              Equations
              Instances For

                Eve in the matching (Z) basis injects no error. irErrorZ0 zBasis = 0 (1·0 + 0·1): guessing Alice's basis, Eve learns the bit and disturbs nothing.

                Eve in the wrong (X) basis injects error ½. irErrorZ0 xBasis = 1/2 ((½)(½) + (½)(½)): the information-disturbance tradeoff.

                The BB84 sifted-key QBER: ¼. Averaging over Eve's uniformly random basis choice, (½)·irErrorZ0 zBasis + (½)·irErrorZ0 xBasis = 1/4. This is the quantum bit-error rate that reveals intercept-resend eavesdropping.

                Honest baseline: no eavesdropping, zero error. With no Eve, Bob's sifted bit equals Alice's: bornProb |1⟩ |0⟩ = 0.

                Eavesdropping is detectable. The QBER strictly rises above the honest baseline under intercept-resend: 1/4 > 0.

                The non-orthogonality disturbance root. The Z and X states are non-orthogonal, ⟨0|+⟩ = (√2)⁻¹ ≠ 0. This is why Eve cannot measure without disturbing: non-orthogonal states cannot be perfectly distinguished.

                Protocols.SecurityBound tie #

                The per-signal disturbance rate Eve induces in the mismatched (X) basis, recorded as a Protocols.SecurityBound with ε = 1/2. The honest reading: "in the mismatched case Eve's tampering flips the sifted bit with probability ½" (equivalently, her per-signal guessing advantage saturates at ½). A minimal stand-in, not a min-entropy / composable accounting.

                Equations
                Instances For

                  The mismatched-basis intercept-resend error equals the declared security bound. irErrorZ0 xBasis = bb84Security.ε = 1/2. This makes SecurityBound load-bearing: its ε is the proved mismatched-basis disturbance rate, not a decorative constant.