Uniform computational pseudorandom functions #
Keys, valid queries and answers have length n. An adversary receives the unary security
parameter, independent private randomness and adaptive access to one word channel. The real game
samples one key; the ideal game samples one whole function and reuses it across calls. Both games
invoke the adversary with empty auxiliary input and reject malformed queries with the empty word.
The table is a semantic specification; RandomOracle certifies a lazy realization of the same
law for oracle-PPT adversaries.
The keyed evaluator has a uniform deterministic TM certificate on the encoded key/query pair.
Admissible adversaries satisfy IsOraclePPT, charging ordinary computation and request writing,
with one machine and polynomial for all parameters and auxiliary inputs.
Main definitions #
Cslib.Crypto.OracleDistinguisher: a parameterized randomized adaptive oracle test.Cslib.Crypto.prfRealGame,.prfIdealGame: the keyed and random-function experiments.Cslib.Crypto.PseudorandomFunction: efficient evaluation, length and adaptive security.
Main results #
Cslib.Crypto.interpret_randomFunctionQuery: correctness of the finite-domain adapter.Cslib.Crypto.prfIdealGame_eq_lazy: an exact lazy implementation of the ideal experiment.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Chapter 4.
- O. Goldreich, S. Goldwasser, S. Micali, How to Construct Random Functions.
Adapted from Crypto/Computational/PseudorandomFunction.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the shared typed interpreter and word channel.
An adaptive test with a unary parameter, an auxiliary word and one external word channel.
Instances For
Adapt a valid word to the finite domain. Malformed words make no external call.
Instances For
The finite query adapter preserves the word-valued table interface in every lawful monad.
Sample one whole random function, independently of the adversary's private samples.
Instances For
The ideal game admits consistent lazy answers to adaptive queries, with private randomness independent of the table and the same rejection convention for malformed inputs.
A keyed family evaluated in plain polynomial time, secure against every uniform adaptive oracle test.
- 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
One deterministic machine evaluates the family from the encoded key and query.
- length_eq (key query : List Bool) : query.length = key.length → (family key query).length = key.length
Valid queries receive answers of the declared width.
- secure : Game.Indistinguishable (fun (adversary : OracleDistinguisher) (n : ℕ) => (prfRealGame family adversary n).eval) (fun (adversary : OracleDistinguisher) (n : ℕ) => (prfIdealGame adversary n).eval) (Probability.IsOraclePPT Turing.MultiTapeTM.encBool)
The real and ideal experiments use the common game-security calculus.
Instances For
Recover the tidy presentation for proofs without changing the security contract.