Documentation

OTP.KeyUniqueness

OTP.KeyUniqueness.lean #

Key Uniqueness in One-Time Pad (OTP) #

This file proves properties of keys in the one-time pad (OTP) encryption scheme that are crucial for OTP's perfect secrecy.

These properties include:

Files in this series:

Properties of vec_xor #

theorem vec_xor_left_involutive {n : } (m : Plaintext n) (k : Key n) :
vec_xor m (vec_xor m k) = k
theorem vec_xor_right_involutive {n : } (m : Plaintext n) (k : Key n) :
vec_xor (vec_xor m k) k = m
theorem decrypt_encrypt {n : } (m : Plaintext n) (k : Key n) :
decrypt (encrypt m k) k = m
theorem encrypt_decrypt {n : } (c : Ciphertext n) (k : Key n) :
encrypt (decrypt c k) k = c
theorem key_uniqueness {n : } (m : Plaintext n) (k : Key n) (c : Ciphertext n) :
vec_xor m k = c k = vec_xor m c

vec_xor is a bijection between Key and Ciphertext #

def xorEquiv {n : } (m : Plaintext n) :
Equations
Instances For