Bounds for supported decryption replies #
A native key generator bounds the supported secret-key length. Composing that bound with a native optional decryptor bounds its encoded replies using only the security parameter and query word. No oracle assumption or correctness premise is needed.
Main results #
Cslib.Crypto.Encryption.exists_decryption_length_bound: a unary-computable reply cap.
theorem Cslib.Crypto.Encryption.exists_decryption_length_bound {Out : Type} {encOut : Out ↪ List Bool} {keyGen : ℕ → ProbComp (List Bool × List Bool)} {decrypt : ℕ → List Bool → List Bool → Option Out} (hkeyGen :
Probability.IsPPTOn Turing.MultiTapeTM.encUnary
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) keyGen) (hdecrypt :
Turing.MultiTapeTM.ComputableInPolyTime
(fun (x : ℕ × List Bool × List Bool) =>
match x with
| (n, sk, ct) => decrypt n sk ct)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits))
(Turing.MultiTapeTM.encOption encOut)) :
∃ (bound : ℕ → List Bool → ℕ),
Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × List Bool) => bound p.1 p.2)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encUnary ∧ ∀ (n : ℕ),
∀ keys ∈ (keyGen n).eval.support,
∀ (ct : List Bool), ((Turing.MultiTapeTM.encOption encOut) (decrypt n keys.2 ct)).length ≤ bound n ct
A native decryptor has a unary-computable reply cap on every supported secret key and every query word. The cap includes the option tag, so rejection and empty successful replies are both fully readable.