Documentation

CslibFrontier.Crypto.Protocols.BCS.Basic

The BCS transform: public-coin interactive oracle proofs to non-interactive arguments #

The Ben-Sasson–Chiesa–Spooner (BCS) transformation ([BSCS16]; compare [CY24], Construction 25.1.1 and Remark 25.1.3, printed pp. 274–277) compiles a multi-round public-coin Interactive Oracle Proof (PublicCoinIOP) into a non-interactive argument (BCSProof, bcsProve, bcsVerify; round-by-round ROM soundness and knowledge soundness are Cslib.Crypto.Protocols.BCS.bcsROMSoundness_bound and Cslib.Crypto.Protocols.BCS.bcsROMKnowledgeSoundness_bound in CslibFrontier.Crypto.Protocols.BCS.ROM, while state-restoration BCS knowledge soundness as in [CY24], Theorem 26.1.1, is open in #6042), by combining two primitives:

  1. Merkle-tree oracle commitments (merkleRoot, merklePath, merkleVerify from CslibFrontier.Crypto.Computational.MerkleTree and CslibFrontier.Crypto.Computational.MerkleTree.Binding): in each round j : Fin r, the prover commits to its oracle table π_j : Fin (2 ^ d) → Sym as the root of a depth-d Merkle tree over the encoded symbols oracleLeaves encSym d π_j.
  2. Fiat–Shamir challenge derivation (bcsChallenge): the verifier's j-th public-coin challenge c_j is derived deterministically by hashing the statement x and the prefix of Merkle roots [rt_0, ..., rt_j] through round j with a Fiat–Shamir oracle hFS : Stmt → List (List Bool) → Chal.
  3. Query openings: after all r rounds, the prover evaluates the IOP verifier's query list iop.queries x chals on the derived challenges chals and opens every queried entry (j, idx) together with its Merkle authentication path against rt_j.

Main definitions #

Main results #

References #

Oracle tables and Merkle leaf encodings #

@[reducible, inline]

An oracle table of depth d over alphabet Sym, with 2 ^ d entries indexed by Fin (2 ^ d).

def Cslib.Crypto.Protocols.BCS.oracleLeaves {Sym : Type} (encSym : Sym → List Bool) (d : ℕ) (π : OracleTable d Sym) :

Encode an oracle table π : OracleTable d Sym as a list of 2 ^ d bit-string leaves for a Merkle tree.

@[simp]
theorem Cslib.Crypto.Protocols.BCS.length_oracleLeaves {Sym : Type} (encSym : Sym → List Bool) (d : ℕ) (π : OracleTable d Sym) :
(oracleLeaves encSym d π).length = 2 ^ d
theorem Cslib.Crypto.Protocols.BCS.clog_length_oracleLeaves {Sym : Type} (encSym : Sym → List Bool) (d : ℕ) (π : OracleTable d Sym) :
Nat.clog 2 (oracleLeaves encSym d π).length = d
theorem Cslib.Crypto.Protocols.BCS.getD_oracleLeaves {Sym : Type} (encSym : Sym → List Bool) (d : ℕ) (π : OracleTable d Sym) (idx : Fin (2 ^ d)) :
(oracleLeaves encSym d π).getD ↑idx [] = encSym (π idx)
theorem Cslib.Crypto.Protocols.BCS.merkleVerify_oracleLeaves (H : List Bool → List Bool → List Bool) (k : List Bool) {ℓ : ℕ} (hlen : ∀ (y : List Bool), (H k y).length = ℓ) {Sym : Type} (encSym : Sym → List Bool) (d : ℕ) (π : OracleTable d Sym) (idx : Fin (2 ^ d)) :
merkleVerify H k d (merkleRoot H k (oracleLeaves encSym d π)) (↑idx) (encSym (π idx)) (merklePath H k (oracleLeaves encSym d π) ↑idx) = true

Honest openings of an oracle table pass merkleVerify: when all digests of H k have one length, for every index idx : Fin (2 ^ d), opening oracleLeaves encSym d π at idx.val with merklePath is accepted by merkleVerify at depth d.

Public-coin Interactive Oracle Proofs (PublicCoinIOP) #

def Cslib.Crypto.Protocols.BCS.prefixChallenges {r : ℕ} {Chal : Type} (chals : Fin r → Chal) (j : Fin r) :
Fin ↑j → Chal

Restrict a full r-round challenge vector chals : Fin r → Chal to the first j challenges (c_0, ..., c_{j-1}) visible before round j.

structure Cslib.Crypto.Protocols.BCS.PublicCoinIOP (r d : ℕ) (Stmt Wit Sym Chal : Type) :

An r-round public-coin Interactive Oracle Proof (PublicCoinIOP) with oracle table depth d, statement type Stmt, witness type Wit, oracle alphabet Sym, and verifier challenge type Chal ([BSCS16]).

  • proveRound (j : Fin r) : Stmt → Wit → (Fin ↑j → Chal) → OracleTable d Sym

    In round j : Fin r, given the statement x, witness w, and previous challenges Fin j.val → Chal, the honest IOP prover produces an oracle table Fin (2 ^ d) → Sym.

  • queries : Stmt → (Fin r → Chal) → List (Fin r × Fin (2 ^ d))

    After all r rounds of challenges, the IOP verifier deterministically selects a list of (round, position) oracle queries.

  • decide : Stmt → (Fin r → Chal) → List Sym → Bool

    Given the statement, challenges, and the list of symbols read at queries x chals, the IOP verifier decides whether to accept.

def Cslib.Crypto.Protocols.BCS.iopProverOracles {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (x : Stmt) (w : Wit) (chals : Fin r → Chal) :
Fin r → OracleTable d Sym

The r oracle tables produced by the honest IOP prover on statement x, witness w, and challenges chals : Fin r → Chal.

def Cslib.Crypto.Protocols.BCS.iopAnswers {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (x : Stmt) (chals : Fin r → Chal) (oracles : Fin r → OracleTable d Sym) :
List Sym

The list of oracle answers read by iop.queries x chals from the oracle tables oracles.

@[simp]
theorem Cslib.Crypto.Protocols.BCS.length_iopAnswers {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (x : Stmt) (chals : Fin r → Chal) (oracles : Fin r → OracleTable d Sym) :
(iopAnswers iop x chals oracles).length = (iop.queries x chals).length
def Cslib.Crypto.Protocols.BCS.iopVerify {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (x : Stmt) (chals : Fin r → Chal) (oracles : Fin r → OracleTable d Sym) :

Evaluate the IOP verifier on statement x, challenge vector chals, and oracle tables oracles.

def Cslib.Crypto.Protocols.BCS.IOPCompleteness {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (rel : Stmt → Wit → Prop) :

Perfect completeness of a PublicCoinIOP for relation rel: for every (x, w) satisfying rel x w and every challenge vector chals, the IOP verifier accepts the honest prover's oracle tables.

def Cslib.Crypto.Protocols.BCS.IOPSoundness {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (lang : Set Stmt) (goodChallenges : Stmt → (Fin r → OracleTable d Sym) → Set (Fin r → Chal)) :

Soundness of a PublicCoinIOP on a set of non-bad challenge vectors goodChallenges: for every statement x ∉ lang, every family of oracle tables oracles, and every challenge vector chals ∈ goodChallenges x oracles, the IOP verifier rejects. goodChallenges is an arbitrary parameter and the predicate bounds no probability; in particular it says nothing about how likely a challenge vector is to lie outside goodChallenges x oracles.

structure Cslib.Crypto.Protocols.BCS.IOPRoundByRoundSoundness {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (lang : Set Stmt) (doomed : Stmt → List (OracleTable d Sym × Chal) → Prop) (goodStep : Stmt → List (OracleTable d Sym × Chal) → OracleTable d Sym → Chal → Prop) :

Round-by-round soundness of a PublicCoinIOP with respect to a doomed-prefix predicate doomed : Stmt → List (OracleTable d Sym × Chal) → Prop and non-escaping round transitions goodStep : Stmt → List (OracleTable d Sym × Chal) → OracleTable d Sym → Chal → Prop:

  1. The empty prefix is doomed for every x ∉ lang.
  2. Whenever a prefix pref is doomed and the round challenge c satisfies goodStep x pref π c, the extended prefix pref ++ [(π, c)] remains doomed.
  3. On any full transcript List.ofFn (fun j => (oracles j, chals j)) that is doomed, the IOP verifier rejects.
  • init_doomed (x : Stmt) : x ∉ lang → doomed x []

    Every false statement starts in a doomed state on the empty transcript prefix.

  • step_doomed (x : Stmt) (pref : List (OracleTable d Sym × Chal)) (π : OracleTable d Sym) (c : Chal) : doomed x pref → goodStep x pref π c → doomed x (pref ++ [(π, c)])

    Every non-escaping challenge preserves the doomed state.

  • reject_of_doomed (x : Stmt) (oracles : Fin r → OracleTable d Sym) (chals : Fin r → Chal) : doomed x (List.ofFn fun (j : Fin r) => (oracles j, chals j)) → iopVerify iop x chals oracles = false

    A doomed complete transcript is rejected by the IOP verifier.

theorem Cslib.Crypto.Protocols.BCS.doomed_ofFn_of_goodSteps {r d : ℕ} {Stmt Sym Chal : Type} {doomed : Stmt → List (OracleTable d Sym × Chal) → Prop} {goodStep : Stmt → List (OracleTable d Sym × Chal) → OracleTable d Sym → Chal → Prop} {x : Stmt} (hinit : doomed x []) (hstep : ∀ (pref : List (OracleTable d Sym × Chal)) (π : OracleTable d Sym) (c : Chal), doomed x pref → goodStep x pref π c → doomed x (pref ++ [(π, c)])) (oracles : Fin r → OracleTable d Sym) (chals : Fin r → Chal) (hsteps : ∀ (j : Fin r), goodStep x (List.take (↑j) (List.ofFn fun (i : Fin r) => (oracles i, chals i))) (oracles j) (chals j)) :
doomed x (List.ofFn fun (j : Fin r) => (oracles j, chals j))

A prefix predicate doomed x that holds on the empty prefix and survives every round satisfying goodStep holds on the complete transcript when every round satisfies goodStep.

theorem Cslib.Crypto.Protocols.BCS.IOPRoundByRoundSoundness.iopVerify_eq_false {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {lang : Set Stmt} {doomed : Stmt → List (OracleTable d Sym × Chal) → Prop} {goodStep : Stmt → List (OracleTable d Sym × Chal) → OracleTable d Sym → Chal → Prop} (hrbr : IOPRoundByRoundSoundness iop lang doomed goodStep) {x : Stmt} (hx : x ∉ lang) (oracles : Fin r → OracleTable d Sym) (chals : Fin r → Chal) (hsteps : ∀ (j : Fin r), goodStep x (List.take (↑j) (List.ofFn fun (i : Fin r) => (oracles i, chals i))) (oracles j) (chals j)) :
iopVerify iop x chals oracles = false

If every round's challenge satisfies goodStep under IOPRoundByRoundSoundness, then the IOP verifier rejects x ∉ lang.

def Cslib.Crypto.Protocols.BCS.IOPKnowledgeSoundnessAt {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (rel : Stmt → Wit → Prop) (iopExtract : Stmt → (Fin r → OracleTable d Sym) → Wit) (x : Stmt) (chals : Fin r → Chal) (oracles : Fin r → OracleTable d Sym) :

Knowledge soundness at a challenge vector (x, chals, oracles): if the IOP verifier accepts oracles at challenge chals, the straight-line IOP knowledge extractor iopExtract recovers a valid witness for x.

The BCS Transform (BCSProof, bcsProve, bcsVerify) #

A non-interactive BCS proof for an r-round PublicCoinIOP: one Merkle root per round and one MerkleOpening per verifier query ([BSCS16]; compare [CY24], Construction 25.1.1).

  • roots : Fin r → List Bool

    The Merkle root committed in each round j : Fin r.

  • openings : List (MerkleOpening Sym)

    The opened symbol and authentication path for each query in iop.queries x chals.

def Cslib.Crypto.Protocols.BCS.rootPrefix {r : ℕ} (roots : Fin r → List Bool) (j : Fin r) :

The prefix of Merkle roots [rt_0, ..., rt_j] through round j : Fin r.

@[simp]
theorem Cslib.Crypto.Protocols.BCS.length_rootPrefix {r : ℕ} (roots : Fin r → List Bool) (j : Fin r) :
(rootPrefix roots j).length = ↑j + 1
theorem Cslib.Crypto.Protocols.BCS.rootPrefix_eq_take_ofFn {r : ℕ} (roots : Fin r → List Bool) (j : Fin r) :
rootPrefix roots j = List.take (↑j + 1) (List.ofFn roots)

rootPrefix roots j is the length-(j + 1) prefix of the full root list List.ofFn roots.

def Cslib.Crypto.Protocols.BCS.bcsChallenge {r : ℕ} {Stmt Chal : Type} (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (roots : Fin r → List Bool) (j : Fin r) :
Chal

The Fiat–Shamir challenge for round j : Fin r, obtained by applying the Fiat–Shamir oracle hFS to the statement x and the prefix of Merkle roots [rt_0, ..., rt_j].

def Cslib.Crypto.Protocols.BCS.bcsHonestTablesAux {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) (fuel : ℕ) (j : Fin r) :
↑j ≤ fuel → OracleTable d Sym

Structural helper for bcsHonestTables: given fuel ≥ j.val, computes the round-j oracle table by structural recursion on fuel so that concrete instances reduce in the kernel.

def Cslib.Crypto.Protocols.BCS.bcsHonestTables {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) (j : Fin r) :

The honest IOP oracle tables computed sequentially during the BCS transform: in round j, each earlier challenge c_i (i < j) is derived via hFS from the Merkle roots of rounds 0, ..., i, and the IOP prover computes the round-j oracle table from (c_0, ..., c_{j-1}).

def Cslib.Crypto.Protocols.BCS.bcsHonestRoots {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) :
Fin r → List Bool

The Merkle roots committed by the honest BCS prover in each round j : Fin r.

def Cslib.Crypto.Protocols.BCS.bcsHonestChallenges {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) :
Fin r → Chal

The Fiat–Shamir challenges derived from the honest BCS prover's Merkle roots.

def Cslib.Crypto.Protocols.BCS.bcsHonestOpenings {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) :

The Merkle openings produced by the honest BCS prover for all queries in iop.queries.

def Cslib.Crypto.Protocols.BCS.bcsProve {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) :
BCSProof r Sym

The BCS prover (bcsProve): sequentially computes each round's IOP oracle table, commits to it with merkleRoot, derives the Fiat–Shamir challenges via hFS, and opens every queried entry with merklePath ([BSCS16]; compare [CY24], Construction 25.1.1 and Remark 25.1.3).

def Cslib.Crypto.Protocols.BCS.bcsVerify {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (prf : BCSProof r Sym) :

The BCS verifier (bcsVerify): recomputes the Fiat–Shamir challenges c_j from the Merkle roots in prf, checks that every queried entry (j, idx) has a valid depth-d Merkle opening against prf.roots j, and runs iop.decide on the opened symbols ([BSCS16]; compare [CY24], Construction 25.1.1 and Remark 25.1.3).

theorem Cslib.Crypto.Protocols.BCS.verify_of_bcsVerify {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {prf : BCSProof r Sym} (hver : bcsVerify iop H k encSym hFS x prf = true) {j : Fin r} {idx : Fin (2 ^ d)} {o : MerkleOpening Sym} (hmem : ((j, idx), o) ∈ (iop.queries x (bcsChallenge hFS x prf.roots)).zip prf.openings) :
MerkleOpening.verify H k encSym d (prf.roots j) (↑idx) o = true

Every queried opening of a proof accepted by bcsVerify is accepted against its root.

Perfect completeness #

theorem Cslib.Crypto.Protocols.BCS.bcsHonestTables_eq_iopProverOracles {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) :
bcsHonestTables iop H k encSym hFS x w = iopProverOracles iop x w (bcsHonestChallenges iop H k encSym hFS x w)

Causal consistency of bcsHonestTables: the oracle tables produced sequentially in the BCS transform equal the IOP prover's oracle tables evaluated on the full Fiat–Shamir challenge vector bcsHonestChallenges.

theorem Cslib.Crypto.Protocols.BCS.bcsVerify_bcsProve_of_iopVerify {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) {ℓ : ℕ} (hlen : ∀ (y : List Bool), (H k y).length = ℓ) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (w : Wit) (hiop : iopVerify iop x (bcsHonestChallenges iop H k encSym hFS x w) (iopProverOracles iop x w (bcsHonestChallenges iop H k encSym hFS x w)) = true) :
bcsVerify iop H k encSym hFS x (bcsProve iop H k encSym hFS x w) = true

If the IOP verifier accepts the honest prover's tables at the Fiat–Shamir challenge vector bcsHonestChallenges, then bcsVerify accepts bcsProve, when all digests of H k have one length.

theorem Cslib.Crypto.Protocols.BCS.bcsVerify_bcsProve_eq_true {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {rel : Stmt → Wit → Prop} (hcomp : IOPCompleteness iop rel) (H : List Bool → List Bool → List Bool) (k : List Bool) {ℓ : ℕ} (hlen : ∀ (y : List Bool), (H k y).length = ℓ) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) {x : Stmt} {w : Wit} (hrel : rel x w) :
bcsVerify iop H k encSym hFS x (bcsProve iop H k encSym hFS x w) = true

Perfect completeness of the BCS transform: if iop satisfies IOPCompleteness iop rel and rel x w holds, then for every Merkle hash H and key k such that all digests of H k have one length, every symbol encoding encSym, and every Fiat–Shamir function hFS, bcsVerify accepts bcsProve ([BSCS16]; compare [CY24], Construction 25.1.1).

Binding extraction and soundness / knowledge reductions #

def Cslib.Crypto.Protocols.BCS.bcsFindConflict {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (oracles : Fin r → OracleTable d Sym) (prf : BCSProof r Sym) :
Option ((Fin r × Fin (2 ^ d)) × MerkleOpening Sym)

Find the first query-opening pair ((j, idx), ⟨val, path⟩) in a BCS proof whose encoded symbol encSym val disagrees with the committed oracle table entry encSym (oracles j idx).

def Cslib.Crypto.Protocols.BCS.bcsExtractTableCollision {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (x : Stmt) (oracles : Fin r → OracleTable d Sym) (prf : BCSProof r Sym) :

Deterministic Merkle collision extractor for the BCS transform: given committed oracle tables oracles and a BCS proof prf, find the first query position where prf opens a symbol whose encoding differs from oracles and run extractMerkleCollision against the honest Merkle path of oracles.

theorem Cslib.Crypto.Protocols.BCS.iopVerify_eq_true_of_bcsVerify_of_openings_eq {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hver : bcsVerify iop H k encSym hFS x prf = true) (hagree : ∀ (j : Fin r) (idx : Fin (2 ^ d)) (val : Sym) (path : List (List Bool)), ((j, idx), { leaf := val, path := path }) ∈ (iop.queries x (bcsChallenge hFS x prf.roots)).zip prf.openings → val = oracles j idx) :
iopVerify iop x (bcsChallenge hFS x prf.roots) oracles = true

If bcsVerify accepts prf and every opened symbol in prf agrees with the oracle tables oracles, then the IOP verifier accepts oracles at the Fiat–Shamir challenge vector bcsChallenge hFS x prf.roots.

theorem Cslib.Crypto.Protocols.BCS.bcs_sound_or_merkleCollision {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} (hinj : Function.Injective encSym) {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hroots : ∀ (j : Fin r), prf.roots j = merkleRoot H k (oracleLeaves encSym d (oracles j))) (hver : bcsVerify iop H k encSym hFS x prf = true) (n : ℕ) :
iopVerify iop x (bcsChallenge hFS x prf.roots) oracles = true ∨ have col := bcsExtractTableCollision iop H k encSym hFS x oracles prf; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

Committed-table binding extraction (bcs_sound_or_merkleCollision): if bcsVerify accepts prf against the Merkle roots of oracles : Fin r → OracleTable d Sym and encSym is injective, then either the IOP verifier accepts oracles on the Fiat–Shamir challenges bcsChallenge hFS x prf.roots, or bcsExtractTableCollision deterministically extracts a hash collision for H k ([BSCS16]; compare [CY24], Theorem 25.2.1).

theorem Cslib.Crypto.Protocols.BCS.isCollision_of_bcsVerify_of_iopVerify_eq_false {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} (hinj : Function.Injective encSym) {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hroots : ∀ (j : Fin r), prf.roots j = merkleRoot H k (oracleLeaves encSym d (oracles j))) (hver : bcsVerify iop H k encSym hFS x prf = true) (hrej : iopVerify iop x (bcsChallenge hFS x prf.roots) oracles = false) (n : ℕ) :
have col := bcsExtractTableCollision iop H k encSym hFS x oracles prf; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

If the IOP verifier rejects oracles at the Fiat–Shamir challenge vector bcsChallenge hFS x prf.roots while bcsVerify accepts prf, then bcsExtractTableCollision deterministically extracts a hash collision for H k.

theorem Cslib.Crypto.Protocols.BCS.isCollision_of_bcsVerify_conflict {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} {hFS : Stmt → List (List Bool) → Chal} {x₁ x₂ : Stmt} {prf₁ prf₂ : BCSProof r Sym} (hver₁ : bcsVerify iop H k encSym hFS x₁ prf₁ = true) (hver₂ : bcsVerify iop H k encSym hFS x₂ prf₂ = true) {j : Fin r} (hroot : prf₁.roots j = prf₂.roots j) {idx : Fin (2 ^ d)} {val₁ val₂ : Sym} {path₁ path₂ : List (List Bool)} (ho₁ : ((j, idx), { leaf := val₁, path := path₁ }) ∈ (iop.queries x₁ (bcsChallenge hFS x₁ prf₁.roots)).zip prf₁.openings) (ho₂ : ((j, idx), { leaf := val₂, path := path₂ }) ∈ (iop.queries x₂ (bcsChallenge hFS x₂ prf₂.roots)).zip prf₂.openings) (hne : encSym val₁ ≠ encSym val₂) (n : ℕ) :
have col := extractMerkleCollision H k (encSym val₁) (encSym val₂) (↑idx) path₁ path₂; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

Two-opening binding extraction (isCollision_of_bcsVerify_conflict): if two accepted BCS proofs prf₁ and prf₂ share the same round-j Merkle root and open the same position (j, idx) to symbols val₁, val₂ with distinct encodings encSym val₁ ≠ encSym val₂, then extractMerkleCollision finds a hash collision for H k.

theorem Cslib.Crypto.Protocols.BCS.rel_iopExtract_of_bcsVerify_of_openings_eq {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {rel : Stmt → Wit → Prop} {iopExtract : Stmt → (Fin r → OracleTable d Sym) → Wit} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hver : bcsVerify iop H k encSym hFS x prf = true) (hagree : ∀ (j : Fin r) (idx : Fin (2 ^ d)) (val : Sym) (path : List (List Bool)), ((j, idx), { leaf := val, path := path }) ∈ (iop.queries x (bcsChallenge hFS x prf.roots)).zip prf.openings → val = oracles j idx) (hks : IOPKnowledgeSoundnessAt iop rel iopExtract x (bcsChallenge hFS x prf.roots) oracles) :
rel x (iopExtract x oracles)

Knowledge extraction when openings match the committed tables: if bcsVerify accepts prf and every opened symbol in prf agrees with oracles, then under IOPKnowledgeSoundnessAt at the Fiat–Shamir challenge vector bcsChallenge hFS x prf.roots, the straight-line IOP extractor iopExtract x oracles produces a valid witness for x.

theorem Cslib.Crypto.Protocols.BCS.bcs_knowledge_or_soundness_violation_or_collision {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} (rel : Stmt → Wit → Prop) (iopExtract : Stmt → (Fin r → OracleTable d Sym) → Wit) {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} (hinj : Function.Injective encSym) {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hroots : ∀ (j : Fin r), prf.roots j = merkleRoot H k (oracleLeaves encSym d (oracles j))) (hver : bcsVerify iop H k encSym hFS x prf = true) (n : ℕ) :
rel x (iopExtract x oracles) ∨ iopVerify iop x (bcsChallenge hFS x prf.roots) oracles = true ∧ ¬rel x (iopExtract x oracles) ∨ have col := bcsExtractTableCollision iop H k encSym hFS x oracles prf; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

Three-way case split of committed-table binding: for an arbitrary relation rel and any iopExtract : Stmt → (Fin r → OracleTable d Sym) → Wit, any accepting BCS proof prf against committed oracle tables oracles (with encSym injective) satisfies at least one of:

  1. rel x (iopExtract x oracles) (the IOP extractor recovers a valid witness for x),
  2. iopVerify iop x (bcsChallenge hFS x prf.roots) oracles = true ∧ ¬ rel x (iopExtract x oracles) (oracles violates IOP knowledge soundness at the Fiat–Shamir challenge), or
  3. bcsExtractTableCollision extracts an explicit hash collision for H k ([BSCS16]; compare [CY24], Theorem 26.1.1).

This is bcs_sound_or_merkleCollision with its accepting case split on whether rel x (iopExtract x oracles) holds.

theorem Cslib.Crypto.Protocols.BCS.bcs_knowledge_or_merkleCollision {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {rel : Stmt → Wit → Prop} {iopExtract : Stmt → (Fin r → OracleTable d Sym) → Wit} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} (hinj : Function.Injective encSym) {hFS : Stmt → List (List Bool) → Chal} {x : Stmt} {oracles : Fin r → OracleTable d Sym} {prf : BCSProof r Sym} (hroots : ∀ (j : Fin r), prf.roots j = merkleRoot H k (oracleLeaves encSym d (oracles j))) (hver : bcsVerify iop H k encSym hFS x prf = true) (hks : IOPKnowledgeSoundnessAt iop rel iopExtract x (bcsChallenge hFS x prf.roots) oracles) (n : ℕ) :
rel x (iopExtract x oracles) ∨ have col := bcsExtractTableCollision iop H k encSym hFS x oracles prf; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

BCS knowledge extraction under IOP knowledge soundness (bcs_knowledge_or_merkleCollision): if IOPKnowledgeSoundnessAt holds at the Fiat–Shamir challenge bcsChallenge hFS x prf.roots, then any accepting BCS proof against oracles either yields a valid witness rel x (iopExtract x oracles) or yields an explicit hash collision via bcsExtractTableCollision.

Polynomial-time certificates and standard-model reduction to collision resistance #

@[reducible, inline]

Encoding of a depth-d oracle table OracleTable d Sym as a framed list of 2 ^ d encoded symbols.

@[reducible, inline]

Encoding of a Fiat–Shamir transcript prefix (statement, rootPrefix).

@[reducible, inline]

Encoding of an IOP query coordinate (round, index) : Fin r × Fin (2 ^ d).

@[reducible, inline]

Encoding of a list of IOP query coordinates List (Fin r × Fin (2 ^ d)).

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.BCS.encIOPTranscript (r : ℕ) {Stmt Chal : Type} (encStmt : Stmt ↪ List Bool) (encChal : Chal ↪ List Bool) :
Stmt × (Fin r → Chal) ↪ List Bool

Encoding of an IOP public-coin challenge transcript (statement, challenges).

Encoding an oracle table into its Merkle leaf list oracleLeaves takes polynomial time.

theorem Cslib.Crypto.Protocols.BCS.computableInPolyTime_oracleLeaves_apply {r d : ℕ} {Sym γ : Type} {encSym : Sym ↪ List Bool} {encIn : γ ↪ List Bool} {oracles : γ → Fin r → OracleTable d Sym} {j : γ → Fin r} (horacles : Turing.MultiTapeTM.ComputableInPolyTime oracles encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))) (hj : Turing.MultiTapeTM.ComputableInPolyTime j encIn (Turing.MultiTapeTM.encFinEnum (Fin r))) :

Selecting the j-th round's encoded Merkle leaf list from oracles takes polynomial time.

theorem Cslib.Crypto.Protocols.BCS.computableInPolyTime_encode_oracles_apply {r d : ℕ} {Sym γ : Type} {encSym : Sym ↪ List Bool} {encIn : γ ↪ List Bool} {oracles : γ → Fin r → OracleTable d Sym} {j : γ → Fin r} {idx : γ → Fin (2 ^ d)} (horacles : Turing.MultiTapeTM.ComputableInPolyTime oracles encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))) (hj : Turing.MultiTapeTM.ComputableInPolyTime j encIn (Turing.MultiTapeTM.encFinEnum (Fin r))) (hidx : Turing.MultiTapeTM.ComputableInPolyTime idx encIn (Turing.MultiTapeTM.encFinEnum (Fin (2 ^ d)))) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (a : γ) => encSym (oracles a (j a) (idx a))) encIn Turing.MultiTapeTM.encBits

Reading the encoded symbol encSym (oracles a (j a) (idx a)) at a computed (round, index) pair takes polynomial time without requiring Inhabited Sym.

theorem Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsChallenge {r : ℕ} {Stmt Chal γ : Type} {encStmt : Stmt ↪ List Bool} {encChal : Chal ↪ List Bool} {encIn : γ ↪ List Bool} {hFS : Stmt → List (List Bool) → Chal} (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {x : γ → Stmt} {roots : γ → Fin r → List Bool} (hx : Turing.MultiTapeTM.ComputableInPolyTime x encIn encStmt) (hroots : Turing.MultiTapeTM.ComputableInPolyTime roots encIn (Turing.MultiTapeTM.encFinFn r Turing.MultiTapeTM.encBits)) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (a : γ) => bcsChallenge hFS (x a) (roots a)) encIn (Turing.MultiTapeTM.encFinFn r encChal)

Deriving the Fiat–Shamir challenge vector bcsChallenge takes polynomial time when hFS is polynomial-time.

theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_mk_deg (Sym : Type) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (p : Sym × List (List Bool)) => { leaf := p.1, path := p.2 }) (encMerkleOpeningOfFields Sym encSym) (encMerkleOpeningOf Sym encSym) 1 1
theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_mk_inO (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Sym} {T0 S0 : γ → ℕ} {x1 : γ → List (List Bool)} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn encSym T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits) T1 S1) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { leaf := x0 x, path := x1 x }) encIn (encMerkleOpeningOf Sym encSym) (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x

Encoding of a MerkleOpening Sym with symbol encoding encSym.

theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_leaf_budget (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MerkleOpening Sym} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encMerkleOpeningOf Sym encSym) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).leaf) encIn✝ encSym S✝
theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_mk_polyTime (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Sym} {x1 : γ → List (List Bool)} (h0 : Turing.MultiTapeTM.ComputableInPolyTime x0 encIn encSym) (h1 : Turing.MultiTapeTM.ComputableInPolyTime x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : γ) => { leaf := x0 x, path := x1 x }) encIn (encMerkleOpeningOf Sym encSym)
theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_mk_budget (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Sym} {x1 : γ → List (List Bool)} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn encSym budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits) budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { leaf := x0 x, path := x1 x }) encIn (encMerkleOpeningOf Sym encSym) budget
@[reducible, inline]

The tuple of the fields of encMerkleOpeningOf.

theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_leaf_polyTime (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → MerkleOpening Sym} :
Turing.MultiTapeTM.ComputableInPolyTime g✝ encIn✝ (encMerkleOpeningOf Sym encSym) → Turing.MultiTapeTM.ComputableInPolyTime (fun (c : γ✝) => (g✝ c).leaf) encIn✝ encSym
theorem Cslib.Crypto.Protocols.BCS.encMerkleOpeningOf_path_budget (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MerkleOpening Sym} :
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_openings_budget (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → BCSProof r Sym} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encBCSProof r Sym encSym) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).openings) encIn✝ (Turing.MultiTapeTM.encList (encMerkleOpeningOf Sym encSym)) S✝
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_roots_polyTime (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → BCSProof r Sym} :
@[reducible, inline]

The tuple of the fields of encBCSProof.

theorem Cslib.Crypto.Protocols.BCS.encBCSProof_mk_inO (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Fin r → List Bool} {T0 S0 : γ → ℕ} {x1 : γ → List (MerkleOpening Sym)} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encFinFn r Turing.MultiTapeTM.encBits) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList (encMerkleOpeningOf Sym encSym)) T1 S1) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { roots := x0 x, openings := x1 x }) encIn (encBCSProof r Sym encSym) (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
@[simp]
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_apply (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) (a : BCSProof r Sym) :
(encBCSProof r Sym encSym) a = (encBCSProofFields r Sym encSym) (a.roots, a.openings)
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_openings_inO (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInO BCSProof.openings (encBCSProof r Sym encSym) (Turing.MultiTapeTM.encList (encMerkleOpeningOf Sym encSym)) (fun (a : BCSProof r Sym) => ((encBCSProof r Sym encSym) a).length) fun (a : BCSProof r Sym) => ((encBCSProof r Sym encSym) a).length
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_mk_deg (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (p : (Fin r → List Bool) × List (MerkleOpening Sym)) => { roots := p.1, openings := p.2 }) (encBCSProofFields r Sym encSym) (encBCSProof r Sym encSym) 1 1

Encoding of a BCSProof r Sym with symbol encoding encSym.

theorem Cslib.Crypto.Protocols.BCS.encBCSProof_fields_deg (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (a : BCSProof r Sym) => (a.roots, a.openings)) (encBCSProof r Sym encSym) (encBCSProofFields r Sym encSym) 1 1
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_roots_budget (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → BCSProof r Sym} :
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_mk_polyTime (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Fin r → List Bool} {x1 : γ → List (MerkleOpening Sym)} (h0 : Turing.MultiTapeTM.ComputableInPolyTime x0 encIn (Turing.MultiTapeTM.encFinFn r Turing.MultiTapeTM.encBits)) (h1 : Turing.MultiTapeTM.ComputableInPolyTime x1 encIn (Turing.MultiTapeTM.encList (encMerkleOpeningOf Sym encSym))) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : γ) => { roots := x0 x, openings := x1 x }) encIn (encBCSProof r Sym encSym)
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_openings_polyTime (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → BCSProof r Sym} :
theorem Cslib.Crypto.Protocols.BCS.encBCSProof_mk_budget (r : ℕ) (Sym : Type) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Fin r → List Bool} {x1 : γ → List (MerkleOpening Sym)} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encFinFn r Turing.MultiTapeTM.encBits) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn (Turing.MultiTapeTM.encList (encMerkleOpeningOf Sym encSym)) budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { roots := x0 x, openings := x1 x }) encIn (encBCSProof r Sym encSym) budget
theorem Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsFindConflict {r d : ℕ} {Stmt Wit Sym Chal γ : Type} {encStmt : Stmt ↪ List Bool} {encSym : Sym ↪ List Bool} {encChal : Chal ↪ List Bool} {encIn : γ ↪ List Bool} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {hFS : Stmt → List (List Bool) → Chal} (hqueries : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × (Fin r → Chal)) => iop.queries p.1 p.2) (encIOPTranscript r encStmt encChal) (encIOPQueryList r d)) (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {x : γ → Stmt} {oracles : γ → Fin r → OracleTable d Sym} {prf : γ → BCSProof r Sym} (hx : Turing.MultiTapeTM.ComputableInPolyTime x encIn encStmt) (horacles : Turing.MultiTapeTM.ComputableInPolyTime oracles encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))) (hprf : Turing.MultiTapeTM.ComputableInPolyTime prf encIn (encBCSProof r Sym encSym)) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (a : γ) => bcsFindConflict iop (⇑encSym) hFS (x a) (oracles a) (prf a)) encIn (Turing.MultiTapeTM.encOption (Turing.MultiTapeTM.encPair (encIOPQuery r d) (encMerkleOpeningOf Sym encSym)))

Finding the first conflicting opening in a BCS proof against committed oracle tables takes polynomial time.

theorem Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsExtractTableCollision {r d : ℕ} {Stmt Wit Sym Chal γ : Type} {encStmt : Stmt ↪ List Bool} {encSym : Sym ↪ List Bool} {encChal : Chal ↪ List Bool} {encIn : γ ↪ List Bool} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {hFS : Stmt → List (List Bool) → Chal} (hH : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × List Bool) => H p.1 p.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hlen : ∀ (k x : List Bool), (H k x).length = k.length) (hqueries : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × (Fin r → Chal)) => iop.queries p.1 p.2) (encIOPTranscript r encStmt encChal) (encIOPQueryList r d)) (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {k : γ → List Bool} {x : γ → Stmt} {oracles : γ → Fin r → OracleTable d Sym} {prf : γ → BCSProof r Sym} (hk : Turing.MultiTapeTM.ComputableInPolyTime k encIn Turing.MultiTapeTM.encBits) (hx : Turing.MultiTapeTM.ComputableInPolyTime x encIn encStmt) (horacles : Turing.MultiTapeTM.ComputableInPolyTime oracles encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))) (hprf : Turing.MultiTapeTM.ComputableInPolyTime prf encIn (encBCSProof r Sym encSym)) :

Deterministic Merkle collision extraction for the BCS transform (bcsExtractTableCollision) runs in polynomial time.

Output of a committed-table BCS adversary: a statement stmt, committed round oracle tables oracles, and a non-interactive BCS proof proof.

  • stmt : Stmt

    The statement chosen by the adversary.

  • oracles : Fin r → OracleTable d Sym

    The committed round oracle tables.

  • proof : BCSProof r Sym

    The BCS proof.

theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_oracles_length_le (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) (a : BCSTableCommitOutput r d Stmt Sym) :
((Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym)) a.oracles).length ≤ ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
def Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :

Encoding of BCSTableCommitOutput r d Stmt Sym.

theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_mk_polyTime (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Stmt} {x1 : γ → Fin r → OracleTable d Sym} {x2 : γ → BCSProof r Sym} (h0 : Turing.MultiTapeTM.ComputableInPolyTime x0 encIn encStmt) (h1 : Turing.MultiTapeTM.ComputableInPolyTime x1 encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))) (h2 : Turing.MultiTapeTM.ComputableInPolyTime x2 encIn (encBCSProof r Sym encSym)) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : γ) => { stmt := x0 x, oracles := x1 x, proof := x2 x }) encIn (encBCSTableCommitOutput r d Stmt Sym encStmt encSym)
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_stmt_length_le (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) (a : BCSTableCommitOutput r d Stmt Sym) :
(encStmt a.stmt).length ≤ ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_mk_deg (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (p : Stmt × (Fin r → OracleTable d Sym) × BCSProof r Sym) => { stmt := p.1, oracles := p.2.1, proof := p.2.2 }) (encBCSTableCommitOutputFields r d Stmt Sym encStmt encSym) (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) 1 1
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_mk_budget (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Stmt} {x1 : γ → Fin r → OracleTable d Sym} {x2 : γ → BCSProof r Sym} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn encStmt budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym)) budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn (encBCSProof r Sym encSym) budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { stmt := x0 x, oracles := x1 x, proof := x2 x }) encIn (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) budget
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_mk_inO (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Stmt} {T0 S0 : γ → ℕ} {x1 : γ → Fin r → OracleTable d Sym} {T1 S1 : γ → ℕ} {x2 : γ → BCSProof r Sym} {T2 S2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn encStmt T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym)) T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn (encBCSProof r Sym encSym) T2 S2) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { stmt := x0 x, oracles := x1 x, proof := x2 x }) encIn (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_stmt_polyTime (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInPolyTime g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) → Turing.MultiTapeTM.ComputableInPolyTime (fun (c : γ✝) => (g✝ c).stmt) encIn✝ encStmt
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_stmt_inO (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInO BCSTableCommitOutput.stmt (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) encStmt (fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length) fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_fields_deg (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (a : BCSTableCommitOutput r d Stmt Sym) => (a.stmt, a.oracles, a.proof)) (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) (encBCSTableCommitOutputFields r d Stmt Sym encStmt encSym) 1 1
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_proof_budget (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).proof) encIn✝ (encBCSProof r Sym encSym) S✝
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_oracles_inO (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInO BCSTableCommitOutput.oracles (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym)) (fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length) fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_oracles_polyTime (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInPolyTime g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) → Turing.MultiTapeTM.ComputableInPolyTime (fun (c : γ✝) => (g✝ c).oracles) encIn✝ (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym))
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_proof_polyTime (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInPolyTime g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) → Turing.MultiTapeTM.ComputableInPolyTime (fun (c : γ✝) => (g✝ c).proof) encIn✝ (encBCSProof r Sym encSym)
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_proof_length_le (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) (a : BCSTableCommitOutput r d Stmt Sym) :
((encBCSProof r Sym encSym) a.proof).length ≤ ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_stmt_budget (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).stmt) encIn✝ encStmt S✝
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_oracles_budget (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → BCSTableCommitOutput r d Stmt Sym} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).oracles) encIn✝ (Turing.MultiTapeTM.encFinFn r (encOracleTable d encSym)) S✝
@[reducible, inline]
abbrev Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutputFields (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Stmt × (Fin r → OracleTable d Sym) × BCSProof r Sym ↪ List Bool

The tuple of the fields of encBCSTableCommitOutput.

@[simp]
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_apply (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) (a : BCSTableCommitOutput r d Stmt Sym) :
(encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a = (encBCSTableCommitOutputFields r d Stmt Sym encStmt encSym) (a.stmt, a.oracles, a.proof)
theorem Cslib.Crypto.Protocols.BCS.encBCSTableCommitOutput_proof_inO (r d : ℕ) (Stmt Sym : Type) (encStmt : Stmt ↪ List Bool) (encSym : Sym ↪ List Bool) :
Turing.MultiTapeTM.ComputableInO BCSTableCommitOutput.proof (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) (encBCSProof r Sym encSym) (fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length) fun (a : BCSTableCommitOutput r d Stmt Sym) => ((encBCSTableCommitOutput r d Stmt Sym encStmt encSym) a).length
@[reducible, inline]

A committed-table BCS adversary receives the unary security parameter n and the Merkle hash key k, and outputs a statement, committed oracle tables, and a BCS proof.

def Cslib.Crypto.Protocols.BCS.bcsTableCollisionFinder {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (adversary : BCSTableCommitAdversary r d Stmt Sym) :

The collision finder built from a committed-table BCS adversary: run the adversary and extract a Merkle collision with bcsExtractTableCollision.

def Cslib.Crypto.Protocols.BCS.bcsBreaksTableBinding {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (k : List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (out : BCSTableCommitOutput r d Stmt Sym) :

Boolean predicate recording that out breaks committed-table BCS binding under k: the proof's round roots match the Merkle roots of out.oracles, bcsVerify accepts out.proof, and iopVerify rejects out.oracles at the Fiat–Shamir challenge vector.

noncomputable def Cslib.Crypto.Protocols.BCS.bcsTableBindingGame {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) (encSym : Sym → List Bool) (hFS : Stmt → List (List Bool) → Chal) (adversary : BCSTableCommitAdversary r d Stmt Sym) (n : ℕ) :

The committed-table BCS binding experiment at security parameter n: sample a uniform n-bit hash key k, run adversary n k, and accept when bcsBreaksTableBinding holds.

theorem Cslib.Crypto.Protocols.BCS.isCollision_of_bcsBreaksTableBinding {r d : ℕ} {Stmt Wit Sym Chal : Type} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {k : List Bool} {encSym : Sym → List Bool} (hinj : Function.Injective encSym) {hFS : Stmt → List (List Bool) → Chal} {out : BCSTableCommitOutput r d Stmt Sym} (hbreak : bcsBreaksTableBinding iop H k encSym hFS out = true) (n : ℕ) :
have col := bcsExtractTableCollision iop H k encSym hFS out.stmt out.oracles out.proof; isCollision H (fun (x : ℕ) (x_1 : List Bool) => true) n k col.1 col.2 = true

A committed-table BCS binding break yields a hash collision: if bcsBreaksTableBinding holds and encSym is injective, then bcsExtractTableCollision outputs a valid collision for H k.

theorem Cslib.Crypto.Protocols.BCS.succProbability_bcsTableBindingGame_le {r d : ℕ} {Stmt Wit Sym Chal : Type} (iop : PublicCoinIOP r d Stmt Wit Sym Chal) (H : List Bool → List Bool → List Bool) {encSym : Sym → List Bool} (hinj : Function.Injective encSym) (hFS : Stmt → List (List Bool) → Chal) (adversary : BCSTableCommitAdversary r d Stmt Sym) (n : ℕ) :
Game.succProbability (bcsTableBindingGame iop H encSym hFS adversary n).eval ≤ Game.succProbability (collisionGame H (fun (x : ℕ) (x_1 : List Bool) => true) (bcsTableCollisionFinder iop H encSym hFS adversary) n).eval

Tight reduction from committed-table BCS binding to collision finding: at every security parameter n, a committed-table BCS adversary succeeds at most as often as its collision finder bcsTableCollisionFinder.

theorem Cslib.Crypto.Protocols.BCS.isPPT_bcsTableCollisionFinder {r d : ℕ} {Stmt Wit Sym Chal : Type} {encStmt : Stmt ↪ List Bool} {encSym : Sym ↪ List Bool} {encChal : Chal ↪ List Bool} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {hFS : Stmt → List (List Bool) → Chal} (hH : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × List Bool) => H p.1 p.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hlen : ∀ (k x : List Bool), (H k x).length = k.length) (hqueries : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × (Fin r → Chal)) => iop.queries p.1 p.2) (encIOPTranscript r encStmt encChal) (encIOPQueryList r d)) (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {adversary : BCSTableCommitAdversary r d Stmt Sym} (hadversary : Probability.IsPPT (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) adversary) :

Efficiency of bcsTableCollisionFinder: for a polynomial-time hash H with k.length-bit digests, polynomial-time iop.queries, and polynomial-time hFS, the collision finder of any uniform strict PPT committed-table BCS adversary is uniform strict PPT.

theorem Cslib.Crypto.Protocols.BCS.CollisionResistant.bcsTableBinding_negligible {r d : ℕ} {Stmt Wit Sym Chal : Type} {encStmt : Stmt ↪ List Bool} {encSym : Sym ↪ List Bool} {encChal : Chal ↪ List Bool} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {hFS : Stmt → List (List Bool) → Chal} (hcr : CollisionResistant H) (hH : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × List Bool) => H p.1 p.2) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hlen : ∀ (k x : List Bool), (H k x).length = k.length) (hqueries : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × (Fin r → Chal)) => iop.queries p.1 p.2) (encIOPTranscript r encStmt encChal) (encIOPQueryList r d)) (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {adversary : BCSTableCommitAdversary r d Stmt Sym} (hadversary : Probability.IsPPT (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) adversary) :
Negligible fun (n : ℕ) => Game.succProbability (bcsTableBindingGame iop H (⇑encSym) hFS adversary n).eval

Standard-model committed-table BCS binding from collision resistance: if H is collision-resistant (CollisionResistant H), every uniform strict PPT committed-table BCS adversary breaks binding with negligible probability.

theorem Cslib.Crypto.Protocols.BCS.HashFamily.bcsTableBinding_negligible {r d : ℕ} {Stmt Wit Sym Chal : Type} {encStmt : Stmt ↪ List Bool} {encSym : Sym ↪ List Bool} {encChal : Chal ↪ List Bool} {iop : PublicCoinIOP r d Stmt Wit Sym Chal} {H : List Bool → List Bool → List Bool} {hFS : Stmt → List (List Bool) → Chal} (hH : HashFamily H) (hqueries : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × (Fin r → Chal)) => iop.queries p.1 p.2) (encIOPTranscript r encStmt encChal) (encIOPQueryList r d)) (hhFS : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Stmt × List (List Bool)) => hFS p.1 p.2) (encFSTranscript encStmt) encChal) {adversary : BCSTableCommitAdversary r d Stmt Sym} (hadversary : Probability.IsPPT (encBCSTableCommitOutput r d Stmt Sym encStmt encSym) adversary) :
Negligible fun (n : ℕ) => Game.succProbability (bcsTableBindingGame iop H (⇑encSym) hFS adversary n).eval

Collision-resistant HashFamily corollary for committed-table BCS binding.