Word PRF games on a restricted input domain #
Each game uses a parameter-indexed validity predicate. The real oracle evaluates valid queries under a uniform key. The ideal oracle caches uniform fixed-width replies to valid queries. Both return the empty word for an invalid query.
Main definitions #
Cslib.Crypto.prfRealGameOn,Cslib.Crypto.prfIdealGameOn: the two games.Cslib.Crypto.PseudorandomFunctionOn: strict oracle-PPT indistinguishability with efficient evaluation and a declared reply length.
Main results #
Cslib.Crypto.eval_prfRealGameOn_length_eq,Cslib.Crypto.eval_prfIdealGameOn_length_eq: a fixed-length domain recovers the existing fixed-length real and ideal game laws.Cslib.Crypto.eval_prfIdealGameOn_eq_eager_of_codec: a finite query codec identifies the cached ideal oracle with an eager table.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Attack Game 4.2 (printed p. 132) and Definitions 4.2 and 4.4.
Memoize uniform outLen-bit samples on valid queries, rejecting malformed words without
altering the cache.
Real PRF experiment on the query domain valid n ([BS23], Attack Game 4.2,
printed p. 132): sample a uniform n-bit key and answer valid queries with family key and
invalid queries with [].
Ideal PRF experiment on the query domain valid n with outLen n-bit outputs
([BS23], Attack Game 4.2, printed p. 132): answer valid queries with consistent lazy
uniform outLen n-bit values and invalid queries with [].
On fixed inLen n-bit inputs, prfRealGameOn is identical in distribution to prfRealGame.
For a finite query codec with raw fixed-width replies, the lazy domain-restricted ideal oracle has the same output law as an eagerly sampled uniform table.
On fixed inLen n-bit inputs, prfIdealGameOn is identical in distribution to
prfIdealGame.
Uniform computational pseudorandom function over the parameter-indexed query domain valid with
n-bit keys and outLen n-bit outputs ([BS23], Attack Game 4.2 and Definitions 4.2 and
4.4, printed pp. 132–133 and 139–141).
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime (fun (pair : List Bool × List Bool) => family pair.1 pair.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits
Deterministic polynomial-time evaluation from
(key, query). - length_eq (key query : List Bool) : valid key.length query = true → (family key query).length = outLen key.length
Valid queries under a key receive
outLen key.length-bit answers. - secure : Game.Indistinguishable (fun (adversary : OracleDistinguisher) (n : ℕ) => (prfRealGameOn valid family adversary n).eval) (fun (adversary : OracleDistinguisher) (n : ℕ) => (prfIdealGameOn valid outLen adversary n).eval) (Probability.IsOraclePPT Turing.MultiTapeTM.encBool)
Indistinguishability of the real and ideal domain-restricted experiments.