Pseudorandomness against circuits #
Concrete security of generators (Cslib.Crypto.PRG.Generator.Secure) is relative to a class of
admissible tests. This module supplies the nonuniform class: the deterministic tests computed by
De Morgan circuits with at most t gates (IsCircuitTest), where every AND, OR, NOT and constant
gate counts. isCircuitTest_iff_exists_circuit identifies this class with explicit circuits and
their size bound. The proof of the natural proofs barrier uses two levels of circuit security
[RazborovRudich1997, Theorem 4.1, pp. 30–31]:
- a keyed family of Boolean functions is pseudorandom against circuits when the generator mapping
a key to the truth table of its function is (
truthTableGenerator). The tests read the whole truth table, that is they query the function at every input. The family is exponentially secure when it resists circuits of size2 ^ (c n)with error2 ^ (-c n)for everyc(IsExponentiallySecure), the condition derived for the GGM family; - a family of length-doubling generators is subexponentially secure when, for all long seeds of
length
k, it resists circuits of size2 ^ mwith error2 ^ (-m)form ^ d ≤ k(IsSubexponentiallySecure). Security against circuits of size2 ^ (k ^ ε)with error2 ^ (-k ^ ε)gives it ford ε ≥ 1(IsSubexponentiallySecure.of_rpow).
It also proves the hybrid argument for independent samples in the form of averages
(abs_expect_comp_sub_expect_le): replacing |ι| independent outputs of a function by uniform
values, one coordinate at a time, costs at most |ι| times the cost of one replacement with all
other coordinates fixed.
Main definitions #
Cslib.Crypto.PRG.IsCircuitTest: the tests computed by circuits with at mosttgates.Cslib.Crypto.PRG.truthTableGenerator: a keyed family of Boolean functions, as a generator of truth tables.Cslib.Crypto.PRG.IsExponentiallySecure: keyed families pseudorandom against circuits of size2 ^ (c n)with error2 ^ (-c n), for everyc.Cslib.Crypto.PRG.IsSubexponentiallySecure: length-doubling generators resisting circuits of size2 ^ mwith error2 ^ (-m)wheneverm ^ d ≤ k, for all sufficiently largek.
Main results #
Cslib.Crypto.PRG.IsSubexponentiallySecure.of_rpow: security against circuits of size2 ^ (k ^ ε)gives subexponential security.Cslib.Crypto.PRG.abs_expect_comp_sub_expect_le: the hybrid argument for independent samples.
References #
Tests computed by circuits #
The tests on m-bit strings computed by De Morgan circuits with at most t gates: the
deterministic tests whose circuit complexity is at most t. As the admissible adversaries of
Cslib.Crypto.PRG.Generator.Secure, they express security against circuits of size t.
The semantic class of size-bounded circuit tests is exactly the class realized by one-output De Morgan circuits of that size. Size counts every gate, including constants.
The generator mapping a key to the truth table of the function F key. Its security against
IsCircuitTest t is the pseudorandomness of the keyed family F against circuits with at most
t gates that read the whole truth table, that is that query the function at every input.
A keyed family F of Boolean functions is exponentially secure against circuits when, for
every c, eventually no test computed with at most 2 ^ (c n) gates distinguishes the truth
table of F n key, for a uniformly random key, from a uniformly random truth table with advantage
more than 2 ^ (-c n). This formulation for arbitrary finite key types is novel to this library.
It packages the truth-table test in the proof of [RazborovRudich1997, Theorem 4.1, pp. 30–31,
equation (3)]. The paper constructs a GGM family from a length-doubling generator. For that family,
Cslib.Crypto.GGM.isExponentiallySecure_booleanFamily derives this condition from
IsSubexponentiallySecure and a polynomial bound on the generator's circuit size.
A family of length-doubling generators is subexponentially secure if, at all sufficiently
large seed lengths k, every De Morgan test of size at most S = 2 ^ m has advantage at most
1 / S whenever m ^ d ≤ k. For positive d this uses integer exponents up to the dth root
of k. At d = 0 it requires the bound for every m.
[RazborovRudich1997, p. 26 and §4, p. 30, before Theorem 4.1] conjecture generators of hardness
2 ^ (k ^ ε) for some ε > 0. Their H(Gₖ) is the least size budget S admitting a test with
advantage at least 1 / S on uniform seeds against uniform outputs. Thus H(Gₖ) > S gives a
strict upper bound at budget S, and this predicate allows equality. The polynomial circuit-size
bound on the generator in Theorem 4.1 is a separate hypothesis of the barrier theorem.
A generator family that, for all long seeds, resists circuits of size 2 ^ (k ^ ε) with
advantage 2 ^ (-k ^ ε), for some ε > 0, is subexponentially secure with exponent 1 / d for
every d ≥ 1 / ε.
The hybrid argument for independent samples #
The hybrid argument for independent samples. Let T be a statistic of ι-indexed tuples
in β. If, with all other coordinates fixed, replacing g a for a uniform a by a uniform b at
one coordinate changes the average of T by at most ε, then replacing every coordinate changes
it by at most |ι| ε. For T the acceptance probability of a test, this is the security of
independent copies of a generator g with loss |ι|.