Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.CircuitLowerBound

Unconditional 2n - 2 B₂-circuit size lower bound for pseudorandom functions #

For every Boolean-output PRF ensemble, at all sufficiently large input lengths n, some function in its support requires at least 2 * n - 2 gates. This gives the worst-case bound of [FanLiYang2022, Theorem 7.5, p. 41] over the complete two-input Boolean basis B₂. Definition 4.9 (p. 28) takes the maximum of the minimum gate counts over the collection Fₙ supporting the distribution. A witness in the support belongs to every such collection.

The proof establishes the stronger distributional bound that the probability of sampling a function below the threshold is negligible. The keyed corollaries apply this bound to the first output bit of a word-valued PRF and then to circuits computing all its output bits.

Proof architecture and design notes #

Main definitions #

Main results #

References #

Boolean-output PRF ensembles and first-bit reduction #

A deterministic word-channel oracle exposing f : BooleanFunction n on n-bit queries and returning [] on malformed queries.

noncomputable def Cslib.Crypto.evalBooleanOracle (adversary : OracleDistinguisher) (n : ℕ) (f : BooleanFunction n) :

Run an OracleDistinguisher against a fixed f : BooleanFunction n at parameter n.

noncomputable def Cslib.Crypto.booleanPRFRealGame (D : (n : ℕ) → PMF (BooleanFunction n)) (adversary : OracleDistinguisher) (n : ℕ) :

Real security game for a Boolean PRF ensemble D : ∀ n, PMF (BooleanFunction n).

noncomputable def Cslib.Crypto.booleanPRFIdealGame (adversary : OracleDistinguisher) (n : ℕ) :

Ideal security game for a Boolean PRF: sample f uniformly from BooleanFunction n.

A Boolean-output PRF ensemble [FanLiYang2022, Definitions 4.4–4.5, pp. 26–27]. Every uniform strict oracle-PPT adversary on unary parameter n has negligible distinguishing advantage between a single function drawn from D n and a uniform Boolean function on n bits. The source takes n ≥ 1. Here n = 0 is immaterial to negligibility, and both word oracles return [] on queries of other lengths. The distribution and its functions may be inefficient to sample and evaluate. In particular, the uniform function ensemble satisfies this condition.

noncomputable def Cslib.Crypto.prfFirstBitEnsemble (family : List Bool → List Bool → List Bool) (n : ℕ) :

The Boolean function ensemble obtained from a keyed word family by sampling a uniform n-bit key and reading the first output bit on n-bit inputs.

Convert an adversary expecting 1-bit oracle replies into an adversary against an n-bit PRF oracle by truncating every oracle reply to its first bit.

Truncating every oracle reply to 1 bit preserves uniform strict oracle-PPT admissibility.

theorem Cslib.Crypto.booleanPRFRealGame_prfFirstBitEnsemble_eq {family : List Bool → List Bool → List Bool} (hlen : ∀ (key query : List Bool), query.length = key.length → (family key query).length = key.length) (adversary : OracleDistinguisher) {n : ℕ} (hn : 0 < n) :

For 0 < n, the real BooleanPRF game on prfFirstBitEnsemble family agrees with the real PseudorandomFunction game of firstBitDistinguisher adversary.

For 0 < n, the ideal BooleanPRF game agrees with the ideal PseudorandomFunction game of firstBitDistinguisher adversary.

First-bit projection of a PRF is a BooleanPRF: any PseudorandomFunction induces a BooleanPRF via its first output bit on n-bit inputs.

Bit-splicing and deterministic distinct restrictions #

Polynomial-time certificates and uniform finite-probability helpers #

Lemma 7.3: Distinguishing isolated variables #

Fan–Li–Yang Lemma 7.3 distinguisher: query 2 * n ^ 2 deterministic restrictions via KabanetsCai.queryTable and accept if some coordinate x is insensitive on all n restrictions.

Fan–Li–Yang Lemma 7.3 (completeness): if C computes single f (1 ≤ n) and has an isolated variable, isolatedVarDistinguisher accepts f with probability 1.

Fan–Li–Yang Lemma 7.3 (soundness against random functions): for 2 ≤ n, isolatedVarDistinguisher accepts a uniformly random Boolean function with probability at most n * (1 / 2) ^ n.

Lemma 7.2: Distinguishing intersecting critical paths #

Fan–Li–Yang Lemma 7.2 distinguisher: query 4 * n ^ 3 deterministic restrictions via KabanetsCai.queryTable and accept if some coordinate pair x < y either never induces an AND-type 2-bit subfunction or never induces an XOR-type 2-bit subfunction.

Fan–Li–Yang Lemma 7.2 (completeness): if C is a single-output B₂ circuit with NoDeadGates (normalized in [FLY22]) computing single f (2 ≤ n) whose critical paths are not pairwise disjoint, then criticalPathDistinguisher accepts f with probability 1.

Fan–Li–Yang Lemma 7.2 (soundness against random functions): for 5 ≤ n, criticalPathDistinguisher accepts a uniformly random Boolean function with probability at most n ^ 2 * ((1 / 2) ^ n + (7 / 8) ^ n).

Theorem 7.5: 2n - 2 B₂-circuit lower bound for PRFs #

Distributional strengthening of [FanLiYang2022, Theorem 7.5]. For every Boolean PRF ensemble, the probability of sampling a function with B₂-circuit complexity strictly below 2 * n - 2 is negligible in n.

The worst-case lower bound of [FanLiYang2022, §7.1, Theorem 7.5, p. 41]. For every BooleanPRF D and all sufficiently large n, a function in the support of D n needs at least 2 * n - 2 gates. Inputs and output wires are free. Each binary Boolean gate and each nullary constant costs one gate. For n ≥ 2, a constant binary gate on two input wires realizes the same constant at the same cost in the source’s B₂ basis.

For a uniform key of a word-valued PRF, the probability that its first output bit is computable with fewer than 2 * n - 2 gates is negligible.

Under a uniform n-bit PRF key, the probability that the full n-output function has B₂-circuit complexity below 2 * n - 2 is negligible. A circuit for all outputs also computes the first bit by selecting that output wire.

For every PseudorandomFunction family and all sufficiently large n, there exists an n-bit key whose first-output-bit function has B₂-circuit complexity at least 2 * n - 2.