OTP.Distributions.lean #
This file defines the probability distributions related to the one-time pad (OTP) cryptographic scheme. It includes:
- Uniform distribution over keys
- Joint distribution of plaintext and key
- Ciphertext distribution derived from plaintext and key
- Conditional distribution of ciphertext given plaintext
Files in this series:
- OTP.Basic: Basic definitions and operations for OTP
- OTP.KeyUniqueness: Properties of keys in OTP
- OTP.Distributions: Probability distributions related to OTP
- OTP.PerfectSecrecy: Properties of perfect secrecy in OTP
- OTP.Examples: Concrete examples and demos of OTP operations and properties
- OTP.SimpleSecrecy: Simplified version of OTP.PerfectSecrecy where we assume the message distribution is uniform.
Uniform Key Distribution #
Independence and Joint Distribution #
The crucial assumption for OTP's perfect secrecy is that the key is chosen independently of the message.
For pmfs μM : PMF (Plaintext n)
and μK : PMF (Key n)
, their joint
distribution μMK : PMF (Plaintext n × Key n)
assigns probability
(μM m) ⬝ (μK k)
to the pair (m, k)
.