Pseudorandom Generators (PRGs) #
This file defines pseudorandom generators and their security game.
A PRG stretches a short random seed into a longer pseudorandom output.
Security means no efficient adversary can distinguish gen(s) (for a random seed s)
from a truly random output r.
Main Definitions #
PRGScheme S R— a PRG with seed spaceSand output spaceR.PRGAdversary R— a distinguisher receiving a single value inR.prgRealExp— the real experiment (adversary seesgen(s)for randoms).prgIdealExp— the ideal experiment (adversary sees randomr).prgAdvantage— distinguishing advantage.
A PRG adversary receives a single value and guesses whether it was generated by the PRG or sampled uniformly.
Instances For
def
PRGScheme.prgRealExp
{S R : Type}
[SampleableType S]
(prg : PRGScheme S R)
(adversary : PRGAdversary R)
:
Real PRG experiment: sample a random seed and let the adversary see the PRG output.
Instances For
Ideal PRG experiment: let the adversary see a uniformly random value.
Instances For
noncomputable def
PRGScheme.prgAdvantage
{S R : Type}
[SampleableType S]
[SampleableType R]
(prg : PRGScheme S R)
(adversary : PRGAdversary R)
:
PRG advantage: how well the adversary distinguishes PRG output from random.