Prefix-free word-oracle distinguishers #
This module records word-oracle queries and expresses prefix-free admissibility against deterministic oracles of the declared reply width. Invalid queries are ignored by the prefix condition, and repeated identical valid queries are allowed.
To apply [BS23], Definition 4.5 (printed p. 152), one must also show that every query is nonempty and belongs to the PRF input domain.
Main definitions #
Cslib.Crypto.wordQueryRunDist: the law of the output and chronological query log.Cslib.Crypto.IsPrefixFreeOraclePPT: strict oracle-PPT distinguishers with prefix-free queries.Cslib.Crypto.PrefixFreePseudorandomFunctionOn: security against that class of distinguishers.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Definition 4.5, printed p. 152.
A private sample affects the continuation but contributes no external query to the log.
Forgetting the query log gives the ordinary run against the deterministic oracle.
The probability of a particular output and query log depends only on how the oracle answers the queries in that log, even when further queries depend on earlier replies.
Querying a fixed list of words records exactly that list. Against a deterministic oracle, processing the replies and then returning a value is also deterministic.
IsPrefixFreeOn valid outLen program holds when, against every deterministic word oracle that
maps valid words to outLen-bit replies and invalid words to [], every supported query log of
program satisfies WordPrefixFree valid. This is the domain-relative prefix condition from
[BS23], Definition 4.5 (printed p. 152), which additionally requires every query to be
nonempty and in the input domain.
Uniform strict oracle-PPT distinguishers whose queries are prefix-free on valid n with
outLen n-bit valid replies at every security parameter n, in the sense of IsPrefixFreeOn.
Every program is prefix-free on a fixed-length domain, since equal-length prefixes are equal.
Every program making at most one query is prefix-free on every domain.
Prefix-free uniform computational pseudorandom function over valid ([BS23],
Section 4.6.1, Definition 4.5, printed p. 152, and Section 6.4, printed p. 226): deterministic
polynomial-time evaluation, output length outLen, and indistinguishability against
the domain-relative class IsPrefixFreeOraclePPT valid outLen.
- 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) (IsPrefixFreeOraclePPT valid outLen)
Indistinguishability against uniform strict oracle-PPT prefix-free distinguishers.