Security against adversaries with advice #
Nonuniform security lets every adversary read, besides the unary parameter n and its
challenge, an advice word advice n from an arbitrary family whose lengths are polynomially
bounded. The adversary itself is still one uniform strict PPT program, clocked on the whole
input, including the advice. This is the usual "PPT with polynomial advice" adversary class: the
family need not be computable, so it can hard-wire information about every parameter separately.
NonuniformlyIndistinguishable, NonuniformOneWay and NonuniformPRG relativize
ComputationallyIndistinguishable, OneWay and PseudorandomGenerator to this class. Each
uniform adversary is an advice adversary that ignores empty advice, so every nonuniform notion
implies its uniform counterpart. IndistinguishableWithAdvice advice and
InversionHardWithAdvice f advice fix one advice family; with empty advice they are exactly the
uniform notions, so a reduction proved relative to a fixed family yields both the uniform and the
nonuniform theorem. Moreover, an advice word may carry a value of any type under any encoding
(IndistinguishableWithAdvice.negligible_encoded,
InversionHardWithAdvice.inversion_negligible_encoded): an adversary need not decode its advice,
since it may run on the encoded word exactly as on the typed value.
These are definitions, not assertions that such primitives exist.
Main definitions #
Cslib.Crypto.IndistinguishableWithAdvice: indistinguishability against uniform strict PPT tests given one fixed advice family.Cslib.Crypto.NonuniformlyIndistinguishable: indistinguishability with every polynomially bounded advice family.Cslib.Crypto.InversionHardWithAdvice: hardness of inversion against uniform strict PPT inverters given one fixed advice family.Cslib.Crypto.NonuniformOneWay: one-wayness against inverters given polynomially bounded advice.Cslib.Crypto.NonuniformPRG: a stretching generator whose output is nonuniformly indistinguishable from uniform.
Main results #
Cslib.Crypto.NonuniformlyIndistinguishable.refl,Cslib.Crypto.NonuniformlyIndistinguishable.symm,Cslib.Crypto.NonuniformlyIndistinguishable.trans: an equivalence relation on ensembles.Cslib.Crypto.NonuniformOneWay.of_inversion_negligible: the inversion-probability constructor.Cslib.Crypto.NonuniformlyIndistinguishable.computationallyIndistinguishable,Cslib.Crypto.NonuniformOneWay.toOneWay,Cslib.Crypto.NonuniformPRG.toPRG: nonuniform security implies uniform security.Cslib.Crypto.computationallyIndistinguishable_iff_indistinguishableWithAdvice_nil: uniform indistinguishability is indistinguishability with empty advice.Cslib.Crypto.IndistinguishableWithAdvice.map: efficient postprocessing.Cslib.Crypto.IndistinguishableWithAdvice.negligible_encoded,Cslib.Crypto.IndistinguishableWithAdvice.of_negligible_encoded,Cslib.Crypto.InversionHardWithAdvice.inversion_negligible_encoded: advice of any encoded type.Cslib.Crypto.oneWay_iff_inversionHardWithAdvice_nil: uniform one-wayness is hardness of inversion with empty advice.Cslib.Crypto.not_computationallyIndistinguishable_pure_uniformList,Cslib.Crypto.not_nonuniformlyIndistinguishable_pure_uniformList: fixed words are distinguishable from uniform words, so the indistinguishability notions are not trivially true.
References #
- O. Goldreich, Foundations of Cryptography, Volume 1, Sections 2.2 and 3.2.
Two ensembles are indistinguishable with advice advice when each uniform strict PPT
test reading the parameter n, the advice word advice n and a sample has negligible advantage.
The advice family is not bounded here; its length is charged to the test's clock, which is
polynomial in the length of its whole input, including the advice and the sample, as for
ComputationallyIndistinguishable: for ensembles of superpolynomial sample length the test gets
more than poly(n) time, unlike a polynomial-size circuit. With empty advice this is uniform
computational indistinguishability
(computationallyIndistinguishable_iff_indistinguishableWithAdvice_nil).
Uniform indistinguishability is the empty-advice case. A uniform test is an advice test that ignores its advice, and an advice test run on empty advice is a uniform test.
Efficient parameter-dependent deterministic postprocessing preserves indistinguishability with advice.
Every ensemble is nonuniformly indistinguishable from itself.
Nonuniform indistinguishability is symmetric.
Nonuniform indistinguishability composes through an intermediate ensemble.
Nonuniform indistinguishability implies uniform indistinguishability: a uniform test ignores empty advice.
Advice of any encoded type. Indistinguishability with the advice words
encAdvice (advice n) covers every uniform strict PPT test that reads the advice value
advice n itself, of an arbitrary type γ under an arbitrary encoding. The test need not be able
to decode the advice word: the test is a word test run on that word
(Cslib.Probability.IsPPTOn.exists_bool_factor).
Typed advice tests suffice. The converse of negligible_encoded: if every uniform strict
PPT test that reads the advice value advice n itself has negligible advantage, the ensembles are
indistinguishable with the advice words encAdvice (advice n). A word test is a typed test that
first exposes the encoded advice.
Fixed words are distinguishable from uniform words, already by a uniform test: the first
bit of PMF.pure (target n) is constant, while that of a uniform word of positive length is a fair
coin. This needs no bound on target.
Nonuniform indistinguishability is not trivially true: fixed words are not nonuniformly
indistinguishable from uniform words (not_computationallyIndistinguishable_pure_uniformList).
Inversion of f is hard with advice advice when each uniform strict PPT inverter
reading the parameter n, the advice word advice n and the image of a uniform n-bit input has
negligible probability of finding any preimage. The advice family is not bounded here; its length
is charged to the inverter's clock. With empty advice this is the security condition of OneWay
(oneWay_iff_inversionHardWithAdvice_nil), that is, of [Gol98],
Definition 2.2.1, p. 29; required of every polynomially bounded family, it is the security
condition of NonuniformOneWay (Definition 2.2.6, p. 36). One fixed family is not a notion of
the source, and a family whose length grows faster than every polynomial also extends the
inverter's clock beyond the source's polynomial bounds.
Each efficient inverter with the given advice has negligible success.
Establish hardness with advice by bounding every efficient inverter's success probability.
Advice of any encoded type. Hardness with the advice words encAdvice (advice n) covers
every uniform strict PPT inverter that reads the advice value advice n itself, of an arbitrary
type under an arbitrary encoding.
Uniform one-wayness is the empty-advice case. A uniform inverter is an advice inverter that ignores its advice, and an advice inverter run on empty advice is a uniform inverter.
A function is nonuniformly one-way when one deterministic polynomial-time algorithm evaluates it and inversion is hard with every polynomially bounded advice family.
This is [Gol98], Definition 2.2.6, p. 36, with uniform strict PPT inverters that read a polynomially bounded advice word, charged to their clock, in place of the source's families of polynomial-size circuits. The two give the same notion: fixing an advised inverter's coins to a best choice and writing out its run gives a polynomial-size circuit at each length, as the source's remark after the definition does for uniform inverters, and a circuit's description is polynomially bounded advice for a uniform circuit evaluator. Section 1.3.3, pp. 18–20, of the source describes this correspondence between machines with advice and circuit families.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime f Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits
A deterministic polynomial-time algorithm evaluates the function.
- secure (advice : ℕ → List Bool) : (PolynomiallyBounded fun (n : ℕ) => (advice n).length) → InversionHardWithAdvice f advice
With each polynomially bounded advice family, inversion is hard.
Each efficient inverter with polynomially bounded advice has negligible success.
Establish nonuniform one-wayness by bounding the success probability of every efficient inverter with polynomially bounded advice.
Nonuniform one-wayness implies uniform one-wayness: a uniform inverter ignores empty advice.
A nonuniform pseudorandom generator: a plain polynomial-time generator with exact output
length length, strictly expanding every seed length, whose output on a uniform seed is
nonuniformly indistinguishable from a uniform word of the output length.
This is [Gol98], Definition 3.3.2, p. 85, with pseudorandomness against
polynomial-size circuits, the indistinguishability that Exercise 8 of Chapter 3, p. 121, defines,
in place of probabilistic polynomial-time tests. As for NonuniformOneWay, the circuits are
replaced by uniform strict PPT tests reading a polynomially bounded advice word, which give the
same notion; fixing a probabilistic test's coins loses no distinguishing gap (Exercise 7 of
Chapter 3, p. 121).
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits
One deterministic polynomial-time machine evaluates the generator.
The output length depends only on the seed length.
Every seed length is strictly expanded.
- secure : NonuniformlyIndistinguishable (generatorEnsemble generator) fun (n : ℕ) => BitString.uniformList (length n)
Generated words are indistinguishable from uniform words with polynomially bounded advice.
A nonuniform pseudorandom generator is a uniform pseudorandom generator.