Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.Cascade.AdjacentPRF

The single-key PRF game for adjacent cascade hybrids #

The cascade reduction routes the client at a chosen depth and forwards one sampled child channel to the external PRF game. For an aligned prefix-free client, the resulting single-key advantage, multiplied by the size of the sampled range, is exactly the gap between two adjacent cascade hybrids.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.cascadeChildDistinguisher (valid : ℕ → List Bool → Bool) (inLen depth count indexBits : ℕ → ℕ) (family : List Bool → List Bool → List Bool) (adversary : OracleDistinguisher) :

Route the client at depth n and use one external PRF challenge among count n child channels. The selection uses indexBits n fair bits and rejects unused indices.

The adjacent-step reduction runs in strict oracle polynomial time in the security parameter and auxiliary word. It uses a polynomial-time validity test and base family evaluation, and polynomial-time unary block widths, cut depths, channel counts and sampling widths.

theorem Cslib.Crypto.advantage_cascadePrefixHybridGame_succ_eq (valid : ℕ → List Bool → Bool) (inLen depth count indexBits : ℕ → ℕ) (family : List Bool → List Bool → List Bool) (adversary : OracleDistinguisher) (n : ℕ) (hwidth : 0 < inLen n) (halign : ∀ (query : List Bool), valid n query = true → inLen n ∣ query.length) (hlength : ∀ (key block : List Bool), block.length = inLen key.length → (family key block).length = key.length) (hpf : IsPrefixFreeOn (valid n) n (adversary n [])) (hbudget : ProbOracleComp.IsQueryBounded (adversary n []) (count n)) (hcapacity : count n ≤ 2 ^ indexBits n) :
have reduction := cascadeChildDistinguisher valid inLen depth count indexBits family adversary; Game.advantage (cascadePrefixHybridGame valid inLen family adversary n (depth n)).eval (cascadePrefixHybridGame valid inLen family adversary n (depth n + 1)).eval = ↑(2 ^ indexBits n) * Game.advantage (prfRealGame inLen family reduction n).eval (prfIdealGame inLen id reduction n).eval

The adjacent cascade advantage equals the single-key advantage times the sampled channel range, for an aligned prefix-free client whose query bound fits in that range.

noncomputable def Cslib.Crypto.cascadeDistinguisher (valid : ℕ → List Bool → Bool) (inLen hops count : ℕ → ℕ) (family : List Bool → List Bool → List Bool) (adversary : OracleDistinguisher) :

Sample a depth with fair bits, then run the sampled child challenge at that depth. An unused depth or child index rejects.

theorem Cslib.Crypto.isQueryBounded_cascadeDistinguisher {valid : ℕ → List Bool → Bool} {inLen hops count : ℕ → ℕ} {family : List Bool → List Bool → List Bool} {adversary : OracleDistinguisher} {n : ℕ} {aux : List Bool} {budget : ℕ} (hbudget : ProbOracleComp.IsQueryBounded (adversary n aux) budget) :
ProbOracleComp.IsQueryBounded (cascadeDistinguisher valid inLen hops count family adversary n aux) budget

Sampling the depth and child channel preserves the client's external query budget.

theorem Cslib.Crypto.advantage_cascade_eq_dyadic {valid : ℕ → List Bool → Bool} {inLen hops count : ℕ → ℕ} {family : List Bool → List Bool → List Bool} {adversary : OracleDistinguisher} (n : ℕ) (hwidth : 0 < inLen n) (halign : ∀ (query : List Bool), valid n query = true → inLen n ∣ query.length) (hcut : ∀ (query : List Bool), valid n query = true → query.length ≤ hops n * inLen n) (hlength : ∀ (key block : List Bool), block.length = inLen key.length → (family key block).length = key.length) (hpf : IsPrefixFreeOn (valid n) n (adversary n [])) (hbudget : ProbOracleComp.IsQueryBounded (adversary n []) (count n)) :
have reduction := cascadeDistinguisher valid inLen hops count family adversary; Game.advantage (prfRealGameOn valid (cascadeFamily inLen family) adversary n).eval (prfIdealGameOn valid id adversary n).eval = ↑(Probability.dyadicSize (hops n) * Probability.dyadicSize (count n)) * Game.advantage (prfRealGame inLen family reduction n).eval (prfIdealGame inLen id reduction n).eval

The uniform reduction has exact loss equal to the product of its two fair-bit sampling ranges. Every rejected index contributes the same result on both sides.

Boneh–Shoup's prefix-free cascade security, [BS23], v0.6, Theorem 6.4 (printed p. 229), on a polynomial-time decidable domain of aligned words with a unary polynomial-time block cap. The base PRF's key and output widths are both n bits. A single strict fair-coin reduction samples both indices from dyadic ranges whose product is polynomially bounded. Block width need only be positive eventually.

theorem Cslib.Crypto.advantage_cascade_le_pointwise {valid : ℕ → List Bool → Bool} {inLen : ℕ → ℕ} {family : List Bool → List Bool → List Bool} {adversary : OracleDistinguisher} (n hops count : ℕ) (hvalid : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × List Bool) => valid p.1 p.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool) (hIn : Turing.MultiTapeTM.ComputableInPolyTime inLen Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hwidth : 0 < inLen n) (halign : ∀ (query : List Bool), valid n query = true → inLen n ∣ query.length) (hcut : ∀ (query : List Bool), valid n query = true → query.length ≤ hops * inLen n) (hlength : ∀ (key block : List Bool), block.length = inLen key.length → (family key block).length = key.length) (hEval : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × List Bool) => family p.1 p.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hA : Probability.IsOraclePPT Turing.MultiTapeTM.encBool adversary) (hpf : IsPrefixFreeOn (valid n) n (adversary n [])) (hbudget : ProbOracleComp.IsQueryBounded (adversary n []) count) :
∃ (reduction : OracleDistinguisher), Probability.IsOraclePPT Turing.MultiTapeTM.encBool reduction ∧ ProbOracleComp.IsQueryBounded (reduction n []) count ∧ Game.advantage (prfRealGameOn valid (cascadeFamily inLen family) adversary n).eval (prfIdealGameOn valid id adversary n).eval ≤ ↑(hops * count) * Game.advantage (prfRealGame inLen family reduction n).eval (prfIdealGame inLen id reduction n).eval

Pointwise concrete bound of [BS23], v0.6, Theorem 6.4, equation (6.15) (printed p. 229). A prefix-free client with at most count queries on aligned words of at most hops blocks has advantage at most hops * count times that of some strict oracle-PPT reduction. The query predicate specifies the domain on bit words. The witness is instantiated at a maximizing depth and channel for the given parameter.