Documentation

Complexity.Crypto.Computational.Encryption.PolyTime

Native runtime of the chosen-message experiment #

The actual experiment composes key generation, message selection, encryption and guessing. Native certificates charge the complete sampled public key, saved adversary state and challenge ciphertext; no independent bound on those intermediate values is assumed.

Main results #

References #

The chosen-message experiment gameOn valid has a strict clock in the full encoded caller input when valid is computable in polynomial time.

The unrestricted chosen-message experiment has a strict clock in the full encoded caller input.

theorem Cslib.Crypto.Encryption.AdversaryOf.IsPPT.restrict {Msg : Type} {encMsg : Msg ↪ List Bool} {valid : ℕ → List Bool → Msg → Msg → Bool} (hvalid : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × List Bool × Msg × Msg) => valid p.1 p.2.1 p.2.2.1 p.2.2.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair encMsg encMsg))) Turing.MultiTapeTM.encBool) {adversary : AdversaryOf Msg} (hadversary : IsPPT encMsg adversary) :
IsPPT encMsg (AdversaryOf.restrict valid adversary)

Restricting a uniform strict PPT adversary by a polynomial-time admissibility predicate keeps it uniform strict PPT: choose additionally evaluates valid and prepends one bit to the saved state, and guess branches on that bit.

theorem Cslib.Crypto.Encryption.INDCPAOf.indcpaOn {Msg : Type} {encMsg : Msg ↪ List Bool} {valid : ℕ → List Bool → Msg → Msg → Bool} {keyGen : ℕ → ProbComp (List Bool × List Bool)} {encrypt : ℕ → List Bool → Msg → ProbComp (List Bool)} (h : INDCPAOf encMsg keyGen encrypt) (hvalid : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × List Bool × Msg × Msg) => valid p.1 p.2.1 p.2.2.1 p.2.2.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair encMsg encMsg))) Turing.MultiTapeTM.encBool) :
INDCPAOn valid encMsg keyGen encrypt

Unrestricted IND-CPA implies IND-CPA under every polynomial-time admissibility predicate.

theorem Cslib.Crypto.Encryption.INDCPAOf.wordINDCPA {keyGen : ℕ → ProbComp (List Bool × List Bool)} {encrypt : ℕ → List Bool → List Bool → ProbComp (List Bool)} (h : INDCPAOf Turing.MultiTapeTM.encBits keyGen encrypt) :
WordINDCPA keyGen encrypt

Unrestricted bit-word IND-CPA implies WordINDCPA.

Strict PPT key generation supplies an executable unary polynomial bounding the total public and secret key material on every supported execution. No width function is assumed computable.