Pseudorandom Functions (PRFs) #
This file defines pseudorandom functions and their security game.
A PRF adversary gets oracle access to uniform sampling plus a function D → R and tries to
distinguish the real function PRF.eval k (for a random key k) from a truly random function
(modeled as a lazy random oracle with consistent responses).
Main Definitions #
PRFScheme K D R— a PRF with key spaceK, domainD, and rangeR.PRFAdversary D R— a distinguisher with oracle access toD →ₒ R.prfRealExp— the real experiment (adversary queriesPRF.eval k).prfIdealExp— the ideal experiment (adversary queries a random oracle).prfAdvantage— distinguishing advantage.
Oracle interface for PRF distinguishers: unrestricted access to uniform sampling plus oracle access to the candidate function.
Instances For
A PRF adversary gets oracle access to uniform sampling and a function D → R,
and outputs a boolean guess (true = "real PRF", false = "random function").
Instances For
A PRF has uniform key generation when its keygen algorithm is exactly uniform sampling.
Instances For
Query implementation for the real PRF experiment. Uniform-sampling queries are handled
by the ambient unifSpec; function queries are answered by prf.eval k.
Instances For
Query implementation for the ideal PRF experiment. Uniform-sampling queries are handled
by the ambient unifSpec; function queries are answered by a lazy random oracle.
Instances For
Real PRF experiment: sample a key, let the adversary query prf.eval k.
Instances For
Ideal PRF experiment: let the adversary query a lazy random oracle (consistent random function). The oracle caches responses so that the same input always yields the same output.
Instances For
PRF advantage: how well the adversary distinguishes the real PRF from a random function.