One-Time Pad: Internal proofs #
The OTP ciphertext distribution is uniform regardless of message.
@[implicit_reducible]
Equations
- Cslib.Crypto.Protocols.PerfectSecrecy.OTP.bitVecFintype n = Fintype.ofEquiv (Fin (2 ^ n)) { toFun := BitVec.ofFin, invFun := BitVec.toFin, left_inv := ⋯, right_inv := ⋯ }
theorem
Cslib.Crypto.Protocols.PerfectSecrecy.OTP.otp_ciphertextDist_eq_uniform
(l : ℕ)
(m : BitVec l)
:
((PMF.uniformOfFintype (BitVec l)).bind fun (k : BitVec l) => PMF.pure (k ^^^ m)) = PMF.uniformOfFintype (BitVec l)
The ciphertext distribution of the OTP is uniform, regardless of the message.