Documentation

VCVio.CryptoFoundations.PRG

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 #

structure PRGScheme (S R : Type) :

A pseudorandom generator with seed space S and output space R. The generator is a deterministic function; security comes from the seed being sampled uniformly.

  • gen : SR
Instances For

    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.

          Instances For