Finite pseudorandom functions #
A keyed function F : Key → D → R on finite types is compared with a uniformly random function
D → R by an adaptive oracle adversary with private coins ([BS23], Section 4.4, Attack
Game 4.2). The real experiment samples one uniform key and answers every query x with F key x;
the ideal experiment samples one whole random function f and answers every query with f x. The
adversary's private samples are independent of the key or table. The advantage is the
distinguishing advantage of the two experiments.
This is the concrete, single-key form of PRF security for arbitrary finite domains and ranges. It
complements the word-level asymptotic games Cslib.Crypto.prfRealGame and
Cslib.Crypto.prfIdealGame. Several independent keys reduce to this game through the hybrid
reductions of Cslib.Crypto.PRF.multiKeyReduction, which the finite Luby–Rackoff theorems use.
Main definitions #
Cslib.Crypto.PRF.Adversary: an adaptive oracle test with private coins.Cslib.Crypto.PRF.realExperiment,Cslib.Crypto.PRF.idealExperiment: the keyed and random-function experiments.Cslib.Crypto.PRF.advantage: their distinguishing advantage.
Main results #
Cslib.Crypto.PRF.eval_realExperiment,Cslib.Crypto.PRF.eval_idealExperiment: the laws of the two experiments, with the key or the random function sampled at thePMFlevel.Cslib.Crypto.PRF.eval_idealExperiment_eq_runWith_memoize: the ideal experiment with the random function sampled lazily, one uniform value per new query, by amemoizelist cache.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 4.4, Attack Game 4.2 and Definition 4.2.
An adaptive test with private coins and oracle access to a function D → R.
The ideal experiment: sample one uniform function f : D → R and answer every query x with
f x.
The law of realExperiment: a uniform key, then the adversary interpreted at the PMF level
against F key.
The law of idealExperiment: a uniform function f, then the adversary interpreted at the
PMF level against f.
The law of idealExperiment with the random function sampled lazily: a memoize list cache
draws one uniform value for each new query and replays it for repeated queries.