Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.PrefixHybrid.Independent

Independent short and parent labels in the real prefix hybrid #

A query ending at the cut can read a label directly. A strict extension of that query would use the same label as its parent key, so prefix-free admissibility excludes both uses on a single run. The real hybrid can therefore draw its short labels and parent labels independently, including when queries depend on earlier answers.

This is the independence step for the real side of the cascade hybrid in [BS23], v0.6, Sections 4.6.1 (printed pp. 152–154) and 6.4.2 (printed pp. 229–230). The later reduction uses the parent labels as keys for the next-block PRF calls.

def Cslib.Crypto.prefixHybridIndependentLabelOracle {n cut : ℕ} (valid : List Bool → Bool) (family : List Bool → List Bool → List Bool) (short parents : { word : List Bool // word.length ≤ cut } → BitString n) (query : List Bool) :

Use the short table at or before the cut and the parent table beyond it. Invalid queries receive the empty word. The parent table is indexed by bounded prefixes for convenience. Only its entries at the full cut length can be read.

theorem Cslib.Crypto.eval_prefixHybridGame_eq_independentLabels (valid : ℕ → List Bool → Bool) (family : List Bool → List Bool → List Bool) (adversary : OracleDistinguisher) (n cut : ℕ) [Fintype { word : List Bool // word.length ≤ cut }] (hlen : ∀ (seed suffix : List Bool), seed.length = n → (family seed suffix).length = n) (hpf : IsPrefixFreeOn (valid n) n (adversary n [])) :
let Table := { word : List Bool // word.length ≤ cut } → BitString n; (prefixHybridGame valid family adversary n cut).eval = (Probability.PMF.uniformOfFintype (Table × Table)).bind fun (tables : Table × Table) => OracleComp.interpret (OracleComp.sumHandler ProbComp.unifOracle fun (request : Unit × List Bool) => PMF.pure (prefixHybridIndependentLabelOracle (valid n) family tables.1 tables.2 request.2)) (adversary n [])

For an adaptive prefix-free client, the hybrid at the old cut has the same law with independent short-label and parent-label tables. Correctly sized replies let the prefix-free condition apply to every fixed table.