Documentation

Complexity.Crypto.Computational.OneWay.MCSP

MCSP in BPP rules out one-way functions #

If the Minimum Circuit Size Problem is decidable in probabilistic polynomial time, then one-way functions do not exist Kabanets and Cai. One-way functions give pseudorandom functions (Cslib.Crypto.OneWay.exists_pseudorandomFunction), and an MCSP decider distinguishes a pseudorandom function from a random one:

The distinguisher (Cslib.Crypto.KabanetsCai.mcspDistinguisher) takes m = d ⌈log₂ n⌉ for d = c + 2, queries the oracle on the 2 ^ m ≤ (2 n) ^ d words above, assembles the first bits of the replies into a truth table, and runs the bounded-error MCSP decider at threshold ⌊2 ^ m / (5 m)⌋. For large n this threshold is at least the circuit size of every restriction of the family, so the decider accepts the pseudorandom table with probability at least 2 / 3, and a random table with probability at most 1 / 3 + 2 ^ (2 ^ m / 4) / 2 ^ (2 ^ m). The distinguisher is a uniform strict oracle PPT adversary in the model of Cslib.Crypto.PseudorandomFunction (Cslib.Crypto.KabanetsCai.isOraclePPT_mcspDistinguisher), and its advantage is at least 1 / 4 for all large n, which is not negligible.

MCSP is the language Cslib.MCSP of instances (T, s) whose truth table T of 2 ^ m bits has a De Morgan circuit with at most s gates (all gates counted), encoded by the table followed by s in binary (Cslib.MCSP.encInstance); BPP is Cslib.Complexity.BPP for this encoding. The hypothesis is that MCSP is in BPP at all thresholds; the distinguisher only runs the decider at thresholds ⌊2 ^ m / (5 m)⌋. The parts of the distinguisher live in the namespace Cslib.Crypto.KabanetsCai.

Main definitions #

Main results #

References #

Few random restrictions have small circuits #

theorem Cslib.Crypto.KabanetsCai.toReal_map_restrictTable_mem_le {n m : ℕ} (hn : 0 < n) (hm : m ≤ n) (hm16 : 16 ≤ m) :
((PMF.map (fun (table : BitString n → BitString n) => decide ({ arity := m, table := (MCSP.truthTable m) ((restrictTable n m hn) table), threshold := 2 ^ m / (5 * m) } ∈ MCSP)) (Probability.PMF.uniformOfFintype (BitString n → BitString n))) true).toReal ≤ 2 ^ (2 ^ m / 4) / 2 ^ 2 ^ m

Few restrictions of a random function have small circuits. For 16 ≤ m ≤ n, the restriction of a uniformly random function from n bits to n bits to m inputs has a circuit with at most ⌊2 ^ m / (5 m)⌋ gates with probability at most 2 ^ (2 ^ m / 4) / 2 ^ (2 ^ m).

Running a bounded-error decider for MCSP #

Run a decider with random coins for MCSP on one instance, with fresh uniform coins of the length the bounded-error condition prescribes.

Instances For

    The acceptance probability of mcspRun is the fraction of accepting coin strings.

    A bounded-error decider accepts a member of MCSP with probability at least 2 / 3.

    A bounded-error decider accepts a non-member of MCSP with probability at most 1 / 3.

    The distinguisher #

    The number of inputs of the truth tables read at parameter n: d ⌈log₂ n⌉.

    Instances For

      The MCSP instance read from a list of answers at arity m, with threshold 2 ^ m / (5 m).

      Instances For

        The Kabanets–Cai distinguisher. At parameter n, ask the oracle for the truth table of its restriction to m = d ⌈log₂ n⌉ inputs and run the bounded-error decider V for MCSP at threshold 2 ^ m / (5 m).

        Instances For
          theorem Cslib.Crypto.KabanetsCai.tableInstance_map_tableQueries (oracle : List Bool → List Bool) (n m : ℕ) :
          tableInstance m (List.map (fun (word : List Bool) => (oracle word).headD false) (tableQueries n m)) = { arity := m, table := (MCSP.truthTable m) (restriction oracle n m), threshold := 2 ^ m / (5 * m) }

          The answers of a deterministic oracle to the queries form the truth table of its restriction.

          theorem Cslib.Crypto.KabanetsCai.interpret_mcspDistinguisher {p : Polynomial ℕ} {V : MCSP.Instance × List Bool → Bool} (d : ℕ) (oracle : List Bool → List Bool) (n : ℕ) :
          OracleComp.interpret (ProbOracleComp.handler ProbComp.unifFin fun (request : Unit × List Bool) => pure (oracle request.2)) (mcspDistinguisher p V d n []) = mcspRun p V { arity := tableArity d n, table := (MCSP.truthTable (tableArity d n)) (restriction oracle n (tableArity d n)), threshold := 2 ^ tableArity d n / (5 * tableArity d n) }

          Against a deterministic oracle, the distinguisher runs the decider on the truth table of the oracle's restriction.

          The distinguisher is uniform strict oracle PPT #

          The Kabanets–Cai distinguisher is uniform strict oracle PPT, for a polynomial-time decider V: it makes 2 ^ m ≤ (2 (n + 1)) ^ d queries of length n and runs V on a truth table of 2 ^ m bits.

          The advantage of the distinguisher #

          theorem Cslib.Crypto.KabanetsCai.eval_prfRealGame_mcspDistinguisher {p : Polynomial ℕ} {V : MCSP.Instance × List Bool → Bool} (family : List Bool → List Bool → List Bool) {d n : ℕ} (hm : tableArity d n ≤ n) :
          (prfRealGame family (mcspDistinguisher p V d) n).eval = (BitString.uniformList n).bind fun (key : List Bool) => (mcspRun p V { arity := tableArity d n, table := (MCSP.truthTable (tableArity d n)) (restriction (family key) n (tableArity d n)), threshold := 2 ^ tableArity d n / (5 * tableArity d n) }).eval

          In the real game, the decider runs on the truth table of the restriction of the family with a uniform key.

          theorem Cslib.Crypto.KabanetsCai.eval_prfIdealGame_mcspDistinguisher {p : Polynomial ℕ} {V : MCSP.Instance × List Bool → Bool} {d n : ℕ} (hn : 0 < n) (hm : tableArity d n ≤ n) :
          (prfIdealGame (mcspDistinguisher p V d) n).eval = (Probability.PMF.uniformOfFintype (BitString n → BitString n)).bind fun (table : BitString n → BitString n) => (mcspRun p V { arity := tableArity d n, table := (MCSP.truthTable (tableArity d n)) ((restrictTable n (tableArity d n) hn) table), threshold := 2 ^ tableArity d n / (5 * tableArity d n) }).eval

          In the ideal game, the decider runs on the truth table of the restriction of a uniformly random function.

          theorem Cslib.Crypto.KabanetsCai.eventually_tableArity (c : ℕ) :
          ∀ᶠ (n : ℕ) in Filter.atTop, 0 < n ∧ 16 ≤ tableArity (c + 2) n ∧ tableArity (c + 2) n ≤ n ∧ c * (3 * n + 2) ^ c + 2 ≤ 2 ^ tableArity (c + 2) n / (5 * tableArity (c + 2) n)

          For large n, the arity m = d ⌈log₂ n⌉ with d = c + 2 satisfies 16 ≤ m ≤ n, and the threshold 2 ^ m / (5 m) is at least c (3 n + 2) ^ c + 2.

          MCSP in BPP rules out pseudorandom functions. If a bounded-error polynomial-time decider for MCSP exists, then every keyed family computable in polynomial time is distinguished from a random function by a uniform strict oracle PPT adversary (mcspDistinguisher) with advantage at least 1 / 4 for all large n.

          Kabanets–Cai Kabanets and Cai: if MCSP is in BPP, with instances encoded by their truth table and threshold, then no function is one-way.

          Kabanets–Cai for deterministic deciders: if MCSP is in P, no function is one-way.