Documentation

Cslib.Crypto.Protocols.PerfectSecrecy.Internal.PerfectSecrecy

Perfect Secrecy: Internal proofs #

Auxiliary lemmas for perfect secrecy:

theorem Cslib.Crypto.Protocols.PerfectSecrecy.jointDist_eq {M K C : Type u} (scheme : EncScheme M K C) (msgDist : PMF M) (m : M) (c : C) :
(scheme.jointDist msgDist) (m, c) = msgDist m * (scheme.ciphertextDist m) c

The joint distribution at (m, c) equals msgDist m * ciphertextDist m c.

theorem Cslib.Crypto.Protocols.PerfectSecrecy.jointDist_tsum_fst {M K C : Type u} (scheme : EncScheme M K C) (msgDist : PMF M) (c : C) :
∑' (m : M), (scheme.jointDist msgDist) (m, c) = (scheme.marginalCiphertextDist msgDist) c

Summing the joint distribution over messages gives the marginal ciphertext distribution.

theorem Cslib.Crypto.Protocols.PerfectSecrecy.perfectlySecret_iff_indep {M K C : Type u} (scheme : EncScheme M K C) :
scheme.PerfectlySecret ∀ (msgDist : PMF M) (m : M) (c : C), (scheme.jointDist msgDist) (m, c) = msgDist m * (scheme.marginalCiphertextDist msgDist) c

Perfect secrecy is equivalent to message-ciphertext independence. The two formulations are related by multiplying/dividing by marginal(c).

theorem Cslib.Crypto.Protocols.PerfectSecrecy.indep_of_ciphertextIndist {M K C : Type u} (scheme : EncScheme M K C) (h : scheme.CiphertextIndist) (msgDist : PMF M) (m : M) (c : C) :
(scheme.jointDist msgDist) (m, c) = msgDist m * (scheme.marginalCiphertextDist msgDist) c

Ciphertext indistinguishability implies message-ciphertext independence.

Ciphertext indistinguishability implies perfect secrecy.

Perfect secrecy implies ciphertext indistinguishability.

theorem Cslib.Crypto.Protocols.PerfectSecrecy.encrypt_key_injective {M K C : Type u} (scheme : EncScheme M K C) (f : MK) (c₀ : C) (hf_mem : ∀ (m : M), f m scheme.gen.support) (hf_enc : ∀ (m : M), c₀ (scheme.enc (f m) m).support) :

If each message maps to a key that encrypts it to a common ciphertext, then the key assignment is injective (by correctness of decryption).

Perfect secrecy requires |K| ≥ |M| (Shannon's theorem).