Security Experiments #
This file defines simple security experiments that succeed unless they terminate with failure.
Each experiment carries bundled subprobabilistic semantics, so the experiment can be interpreted
through an internal semantic monad instead of requiring a global HasEvalSPMF instance on the
ambient monad.
We also define BoundedAdversary α β as an oracle computation bundled with a query bound.
Bias advantage of a Boolean-valued game: the gap between the probabilities of the two outputs.
This is the canonical single-game formulation for hidden-bit guessing experiments.
Instances For
Distinguishing advantage between two Boolean-valued games, measured on the true branch.
For Boolean outputs this is equivalent to measuring the gap on false; choosing true is just a
conventional presentation.
Instances For
Bias advantage of a Boolean-valued subdistribution: the gap between the probabilities of
returning true and false.
This is the SPMF analogue of ProbComp.boolBiasAdvantage, used for games that have already
been observed under bundled subprobabilistic semantics. Any remaining mass corresponds to failure
and therefore contributes to neither Boolean branch.
Instances For
Triangle inequality for Boolean distinguishing advantage.
A hidden-bit guessing game over two Boolean branches has bias exactly equal to the distinguishing advantage between those two branches.
Version of boolBiasAdvantage_eq_boolDistAdvantage_uniformBool_branch with a shared sampled
prefix before the real/random branch is chosen.
A security adversary bundling a computation with a bound on the number of queries it makes,
where the bound must be shown to satisfy IsQueryBound.
We also require an explicit list of all oracles used in the computation,
which is necessary in order to make certain reductions computable.
- run : α → OracleComp spec β
- qb : ι → ℕ
- qb_isQueryBound (x : α) : (self.run x).IsPerIndexQueryBound self.qb
- activeOracles : List ι
Instances For
Structure to represent a security experiment. The experiment is considered successful unless it terminates with failure.
A SecExp carries bundled SPMFSemantics directly. This keeps the semantic assumptions attached
to the experiment itself: the surface monad can be interpreted through some internal semantic
monad, and only then observed as a subdistribution for measuring success and failure
probabilities.
- instMonadSem : Monad self.Sem
- main : m Unit
Main experiment body. Success is interpreted as terminating without failure.