§2.2: perfect one-time-pad security
ProvedQAlgorithms.Papers.Independent.Bridge50.P44.otp_perfectFix a message length and a bit string . The real one-time pad uses a fresh uniform shared key , forwards authentically, and outputs to Bob and Eve. The ideal channel outputs to Bob, and its simulator samples an independent uniform -bit string for Eve. Their output laws and satisfy
Here is the success probability in distinguishing the two laws with equal priors. Equality of these complete one-input output kernels gives the perfect security of Figures 2.3 and 2.5, including arbitrary contexts choosing the classical input.
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P44
noncomputable section
open scoped BigOperators Matrix ComplexOrder
namespace QAlgorithms.Papers.Independent.Bridge50.P44
open QAlgorithms
open QAlgorithms.RealRegisters (Hilbert)
open QAlgorithms.Papers.Independent.Dependency50.P33 (State traceSize)
open QAlgorithms.Papers.Independent.Dependency50.P24 (cqState)
open QAlgorithms.Papers.Independent.Frontier18.P08 (partialTraceFirst)
open QAlgorithms.Papers.Independent.Information100.P76 (maximallyMixed)
open QAlgorithms.Papers.Independent.Frontier18.P08 (conditionalEntropyNats)
attribute [local instance] Classical.propDecidable
attribute [local instance] Classical.decEq
/-- PDF p.13, §2.2: perfect one-time-pad security for Figures 2.3 and 2.5.
Both output kernels coincide, and every randomized black-box test has equal-prior
success exactly one half. The channel used here faithfully delivers ciphertexts. -/
theorem otp_perfect (n : ℕ) (x : Fin n → Bool) :
otpReal x = otpIdeal x ∧
∀ g : ((Fin n → Bool) × (Fin n → Bool)) → Set.Icc (0 : ℝ) 1,
binaryTestSuccess (otpReal x) (otpIdeal x) g = 1 / 2 := by sorry
end QAlgorithms.Papers.Independent.Bridge50.P44
end
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
For every natural number , including , and every Boolean word , define and , where is coordinatewise Boolean exclusive-or. The theorem asserts that as functions and that, for every function , . When , the word space consists of its single empty word, and the same assertions apply.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.