Word-level pseudorandom functions as finite ones #
At security parameter n, a word family family : List Bool → List Bool → List Bool is a keyed
function PRF.atLevel family n on n-bit strings, and a word distinguisher A is a finite PRF
adversary (OracleCodec.bitString n).adapt (A n []): it reads n-bit requests as strings and
answers other requests with the empty word without a call, which is the convention of the word
games. The two views have the same games (PRF.advantage_atLevel_adapt): the finite PRF
advantage of the adapted adversary against PRF.atLevel family n is the advantage of A between
prfRealGame id family A n and prfIdealGame id id A n, for every length-preserving family.
So a PseudorandomFunction makes the finite advantage of every adapted oracle-PPT distinguisher
negligible in n, and an argument about finite PRF adversaries (a hybrid step, a switching lemma,
a derived keyed function) transfers to the word notion by exhibiting its finite adversary as an
adapted word program.
Main definitions #
Cslib.Crypto.PRF.atLevel: the finite keyed function of a word family at one parameter.
Main results #
Cslib.Crypto.PRF.eval_realExperiment_atLevel_adapt,Cslib.Crypto.PRF.idealExperiment_adapt: the real and ideal finite PRF experiments of an adapted word distinguisher agree with the corresponding word-level games.Cslib.Crypto.PRF.advantage_atLevel_adapt: the finite PRF advantage of an adapted word distinguisher is its word-level PRF advantage.
A table on n-bit strings presents randomFunctionOracle n f on the word channel: through
OracleCodec.bitString n, an n-bit request is answered by the bits of the table's value and any
other request by the empty word.
The keyed function of the word family family at parameter n: an n-bit key and an n-bit
query give the first n bits of family key query, padded with false. For a length-preserving
family no padding happens.
For a length-preserving family, the finite real PRF experiment on (OracleCodec.bitString n).adapt (A n []) against PRF.atLevel family n has the same Boolean law as
prfRealGame id family A n.
The finite ideal PRF experiment on (OracleCodec.bitString n).adapt (A n []) equals
prfIdealGame id id A n.
Finite and word PRF games agree. For a length-preserving family, the finite PRF advantage
of the adapted word distinguisher against PRF.atLevel family n is the advantage of A between
the word games prfRealGame id family A n and prfIdealGame id id A n.