Symmetric Encryption Schemes #
This file defines SymmEncAlg m M K C, a monad-generic symmetric encryption scheme with
message space M, key space K, and ciphertext space C.
The struct follows the same pattern as AsymmEncAlg, KEMScheme, MacAlg, etc.: it is
parameterized by an ambient monad m and uses plain Type parameters. Asymptotic security
statements are expressed externally by quantifying over a family
(sp : ℕ) → SymmEncAlg m (M sp) (K sp) (C sp).
Instances For
Instances For
Definitions and Equivalences #
perfectSecrecyAt is the canonical notion (independence form).
We also provide equivalent formulations:
perfectSecrecyPosteriorEqPriorAt(cross-multiplied posterior/prior form),perfectSecrecyJointFactorizationAt(same factorization with named marginals).
The _iff_ lemmas below record equivalence between these forms.
Joint message/ciphertext experiment used to express perfect secrecy.
Instances For
Ciphertext marginal induced by the perfect-secrecy experiment.
Instances For
Ciphertext experiment conditioned on a fixed message.
Instances For
Strong perfect secrecy: ciphertexts are independent of messages for every prior distribution on messages (PMF-level quantification).
Instances For
Equivalent channel-style formulation: every message induces the same ciphertext distribution.
Instances For
Standard perfect secrecy expressed as independence:
Pr[(M, C)] = Pr[M] * Pr[C].
Instances For
Posterior-equals-prior form, written in cross-multiplied form to avoid division.
Instances For
Joint-factorization form (same mathematical statement as independence, with explicit named priors/marginals).
Instances For
Core uniformity lemma: uniform keygen plus unique key per (message, ciphertext) pair
implies every (message, ciphertext) conditional has probability (card K)⁻¹.
Both Shannon theorems follow from this.
Constructive Shannon direction: if keygen is uniform and each (message, ciphertext)
pair is realized by a unique key in support, then perfect secrecy holds.
deterministicEnc asserts encryption is deterministic in distribution
(singleton support for each fixed (key, message)).
Constructive Shannon direction for all priors: uniform keys plus uniqueness imply perfect secrecy for all prior distributions on messages.