Inversion and prediction experiments #
The two experiments behind one-way functions and hard-core predicates, stated for one fixed function and input distribution.
inversionExperiment sample f A: drawx ← sampleand give the inverterf x; it wins when it returns anyx'withf x' = f x.predictionExperiment sample f h A: drawx ← sampleand give the predictorf x; it wins when it returns the bith x.
The input distribution is a parameter, so the same experiment serves fixed-length inputs of a
word function and the finite Goldreich–Levin analysis, and can serve other input laws such as
uniform residues.
There is no security parameter, setup or encoding: asymptotic notions such as
Cslib.Crypto.OneWay draw their setup and then run these experiments. The experiments are written
for any monad. Programs use ProbComp; finite distributional arguments use PMF, and
ProbComp.eval_inversionExperiment relates the two.
Main definitions #
Cslib.Crypto.inversionExperiment: the inversion experiment, accepting any preimage.Cslib.Crypto.predictionExperiment: the experiment of predicting a hidden bit of the input from its image.
Main results #
Cslib.Crypto.inversionExperiment_eq_of_injective: for an injective function, accepting any preimage is the same as recovering the sampled input.Cslib.ProbComp.eval_inversionExperiment,Cslib.ProbComp.eval_predictionExperiment: evaluating a program experiment gives the same experiment on distributions.Cslib.Crypto.inversionExperiment_bind: randomness that the inverter samples independently of its challenge may be sampled before the experiment.Cslib.Crypto.predictionExperiment_uniform_bit: an independent uniform hidden bit is guessed with probability exactly one half.
References #
- S. Arora, B. Barak, Computational Complexity: A Modern Approach, Section 9.2.1, Definition 9.4 (one-way functions).
- O. Goldreich, Foundations of Cryptography, Volume 1, Definitions 2.2.1 (strong one-way functions) and 2.5.1 (hard-core predicates).
The inversion experiment for f on inputs drawn from sample: the challenger draws x and
gives the inverter f x; the inverter wins when it returns any preimage of f x.
The prediction experiment for the bit h of inputs drawn from sample: the challenger draws
x and gives the predictor f x; the predictor wins when it returns h x.
For an injective function, accepting any preimage is the same as recovering the sampled input.
On distributions, the inversion experiment maps the inverter's output distribution through the success test.
Randomness that the inverter samples independently of its challenge may be sampled before the experiment.
An independent uniform hidden bit is guessed correctly with probability exactly one half,
whatever the predictor: with a fixed view o, the experiment's outcome is a fair bit.
Evaluating the inversion experiment of programs gives the inversion experiment of their distributions.
Evaluating the prediction experiment of programs gives the prediction experiment of their distributions.