Soundness and straight-line knowledge soundness of the BCS transform in the random-oracle model #
This facade re-exports the multi-round Ben-Sasson–Chiesa–Spooner (BCS) random-oracle
development (split across ROM.Extract, ROM.PolyTime, ROM.Protocol, ROM.State,
ROM.StickyBad, ROM.VerifyBounds, ROM.Soundness, and ROM.KnowledgeSoundness), lifting
(CslibFrontier/Crypto/Protocols/BCS/Basic.lean) to an explicit two-channel random-oracle model
([BSCS16]; compare [CY24], Construction 25.1.1, Remark 25.1.3, and
Theorem 25.2.1, printed pp. 274–278, Theorem 26.1.1 and Construction 26.1.3, printed pp. 288–291,
Chapter 31, Definitions 31.1.1–31.1.2, Definition 31.1.6, Construction 31.1.8, Theorem 31.2.1, and
Theorem 31.3.1, composed with Merkle trace extraction from Chapter 18, Construction 18.5.3 and
Lemma 18.5.7, printed pp. 199 and 204–207), proving adaptive round-by-round ROM soundness and
straight-line knowledge-soundness bounds (bcsROMSoundness_bound,
bcsROMKnowledgeSoundness_bound; state-restoration BCS knowledge soundness as in
[CY24], Theorem 26.1.1, is open in #6042) alongside standard-model Merkle trace-binding
reductions:
- Straight-line multi-round oracle-table reconstruction (
bcsExtractTable,bcsExtractOracles,bcsExtractWitness). Given a symbol decoderdecSym : List Bool → SymwithFunction.LeftInverse decSym encSym, a default symboldefaultSym : Sym, and a recorded Merkle query-answer tracetr_MT : List (List Bool × List Bool),bcsExtractTablereconstructs the depth-doracle table committed under any Merkle rootrtviaextractLeafFromTracewithout rewinding, andbcsExtractOraclesreconstructs allrround tables of aBCSProof. Whentr_MTis collision-free and records every opened authentication path of an accepted proof,iopVerifyaccepts the extracted oracle tables (iopVerify_bcsExtractOracles_of_bcsVerify); conversely, ifiopVerifyrejects the extracted tables on a trace consistent withH k,tr_MTcontains an explicit hash collision (exists_collision_of_bcsVerify_of_iopVerify_eq_false). Prepending a fresh Merkle query-answer pair(q, ans)leavesbcsExtractTableandbcsExtractOraclesunchanged unlessanshits a target root or a child of an existing Merkle query (bcsExtractTable_cons_of_ne,bcsExtractOracles_cons_of_ne). - Two-channel BCS random-oracle model & completeness (
BCSROMSpec,chainedFS,bcsProveROM,bcsVerifyROM,bcsHonestROMGame_eq_pure_true). OverBCSROMSpec Stmt Chal := MerkleHashSpec ⊕ₒ BCSFSSpec Stmt Chal, the left channel (Sum.inl) answers Merkle hash queries lazily with uniformσ-bit digests (BitString.uniformList σ), while the right channel (Sum.inr) answers transcript-chained Fiat–Shamir queries(x, rts, prevChals) ↦ Challazily withPMF.uniformOfFintype Chal: in roundj, the prover and verifier query(x, rootPrefix roots j, [c_0, ..., c_{j-1}]) ↦ c_j. Under any deterministic oracle pair(hTree, f),bcsProveROMandbcsVerifyROMagree viaOracleComp.evalPurewithbcsProveandbcsVerifyinstantiated withchainedFS f, yielding perfect completeness in the lazy two-channel ROM (bcsHonestROMGame_eq_pure_true). - Adaptive two-channel ROM soundness (
bcsROMSoundness_bound,bcsROMSoundness_bound_of_prover_verifier). GivenIOPRoundByRoundSoundness iop lang doomed goodStepwith per-round escape probability≤ ε_rbrunderPMF.uniformOfFintype Chal, the combined state invariantBCSGoodStaterequiresTraceCollisionFree tr_MTtogether withBCSChainDoomed: every recorded Fiat–Shamir chain(rts, chals)of length≤ rforx ∉ langmaps underbcsExtractTranscriptto a doomed IOP transcript prefix. Restricting the Merkle forbidden-digest guard (bcsForbiddenDigests) to the firstrroots of each Fiat–Shamir query keeps the Merkle preimage/root-hit budget bounded by3 * |tr_MT| + r * |tr_FS|regardless of adversarial Fiat–Shamir input lengths, whilefsOutOfOrderTargetsbounds out-of-order Fiat–Shamir chain guessing by|tr_FS| / |Chal|per query. Accumulating both growing channel budgets viaOracleComp.toOuterMeasure_bad_le_two_budgetsbounds adaptive cheating provers witht_FSFiat–Shamir queries andQ_MTtotal Merkle queries by(t_FS + r) * (ε_rbr + (t_FS + r) * (1 / |Chal|)) +Q_MT * ((3 * Q_MT + r * (t_FS + r)) * (1 / 2 ^ σ)). - Adaptive straight-line ROM knowledge soundness (
IOPRoundByRoundKnowledgeSoundness,bcsROMKnowledgeSoundness_bound,bcsROMKnowledgeSoundness_bound_of_prover_verifier). FromIOPRoundByRoundKnowledgeSoundness iop rel iopExtract doomed goodStep(which also impliesIOPRoundByRoundSoundnessfor{x | ∃ w, rel x w}viaIOPRoundByRoundKnowledgeSoundness.toRoundByRoundSoundness),bcsKnowledgeSoundnessGamereconstructsbcsExtractWitness iopExtract decSym defaultSym tr_P x prf.rootsstraight-line from the prover's own Merkle query tracetr_Pbefore runningbcsVerifyROM, with zero rewinding, and bounds the probability thatbcsVerifyROMaccepts whilerel x wfails by the same explicit two-channel ROM error bound.
Source-to-Lean adaptation and scope notes:
- Oracle and transcript convention: [CY24], Construction 25.1.1 (printed pp. 274–275)
already uses
2 * rseparate domain-separated per-round Merkle and Fiat–Shamir random oracles (with zero-knowledge salt lengthss_MT,s_FS; see Remark 25.1.3 on root-prefix vs. hash-chain Fiat–Shamir queries). Here (s_MT = s_FS = 0),BCSROMSpec Stmt Chal := MerkleHashSpec ⊕ₒ BCSFSSpec Stmt Chaluses two unindexed typed channels: one shared Merkle hash channel onSum.inl(List Bool → List Bool, viamerkleRootProg/merklePathProg/merkleVerifyProgwithencPairnode framing) and one transcript-chained Fiat–Shamir channel onSum.inr(BCSFSQuery Stmt Chal := Stmt × List (List Bool) × List Chal ↦ Chal, querying(x, rootPrefix roots j, [c_0, ..., c_{j-1}]) ↦ c_jin roundj). - Round-by-round vs. state-restoration hypotheses: Both [BSCS16] and
[CY24], Theorem 25.2.1 and Theorem 26.1.1 (printed pp. 276–278 and 288–289) formulate
BCS ROM soundness and straight-line knowledge soundness via IOP state-restoration soundness and
state-restoration knowledge soundness, while [CY24], Chapter 31 (Definitions
31.1.1–31.1.2, Definition 31.1.6, Construction 31.1.8, Theorem 31.2.1, and Theorem 31.3.1)
reduces state-restoration soundness and knowledge soundness to round-by-round hypotheses. This
layer proves the ROM bounds directly from
IOPRoundByRoundSoundnessandIOPRoundByRoundKnowledgeSoundness(whose deterministicextract_of_doomedon completedoomedtranscripts is stronger than Definition 31.1.6's two-phase per-round experiment) with per-round uniform challenge escape probability≤ ε_rbr, bounding adaptive Fiat–Shamir grinding directly viaε_rbrand out-of-order chain-guessing targets (fsOutOfOrderTargets). - Explicit additive loss and query budgets: Accumulating growing budgets across both channels via
OracleComp.toOuterMeasure_bad_le_two_budgetsandCslibFrontier/Crypto/Computational/MerkleTree/ROMExtract.leanyields the explicit additive bound(t_FS + r) * (ε_rbr + (t_FS + r) * (1 / Fintype.card Chal)) + Q_MT * ((3 * Q_MT + r * (t_FS + r)) * (1 / 2 ^ σ))(rather than the book's state-restoration plus multi-instance Merkle extraction error expression). Query budgets count all Merkle and Fiat–Shamir oracle calls, including malformed opening paths; the separate-budget corollaries (bcsROMSoundness_bound_of_prover_verifier,bcsROMKnowledgeSoundness_bound_of_prover_verifier) bound verifier Merkle cost only on outputs inP.support. - Straight-line trace extraction and polynomial-time certificates:
bcsKnowledgeSoundnessGamereconstructsbcsExtractWitness iopExtract decSym defaultSym tr_P x prf.rootsdirectly from the prover's pre-verifier Merkle query tracetr_Pwith zero rewinding (compare [CY24], Construction 26.1.3). Part 5 provides machine-levelComputableInPolyTimecertificates forbcsExtractTable,bcsExtractOracles,bcsExtractWitness, andbcsExtractTraceCollisiontogether with a tight standard-modelCollisionResistant Hreduction (bcsTraceCollisionFinder,isPPT_bcsTraceCollisionFinder); digest truncation accounting, polynomial-time NP-witness-to-IOP encoding, and zero-knowledge simulation remain outside scope.
Main definitions #
Cslib.Crypto.Protocols.BCS.bcsExtractTable,Cslib.Crypto.Protocols.BCS.bcsExtractOracles,Cslib.Crypto.Protocols.BCS.bcsExtractWitness,Cslib.Crypto.Protocols.BCS.BCSOpeningsQueriedInTrace,Cslib.Crypto.Protocols.BCS.bcsFindTraceConflict,Cslib.Crypto.Protocols.BCS.bcsExtractTraceCollision: straight-line oracle-table, witness, and collision extraction from a Merkle trace and path-coverage predicate for BCS openings.Cslib.Crypto.Protocols.BCS.BCSTraceOutput,Cslib.Crypto.Protocols.BCS.encBCSTraceOutput,Cslib.Crypto.Protocols.BCS.BCSTraceAdversary,Cslib.Crypto.Protocols.BCS.bcsTraceCollisionFinder,Cslib.Crypto.Protocols.BCS.bcsBreaksTraceBinding,Cslib.Crypto.Protocols.BCS.bcsTraceBindingGame: standard-model trace-extraction collision reduction and binding experiment.Cslib.Crypto.Protocols.BCS.BCSFSQuery,Cslib.Crypto.Protocols.BCS.BCSFSSpec,Cslib.Crypto.Protocols.BCS.BCSROMSpec,Cslib.Crypto.Protocols.BCS.bcsOracle,Cslib.Crypto.Protocols.BCS.chainedFSChallenges,Cslib.Crypto.Protocols.BCS.chainedFS: two-channel BCS random-oracle interface and transcript-chained Fiat–Shamir bridge.Cslib.Crypto.Protocols.BCS.bcsChallengesProg,Cslib.Crypto.Protocols.BCS.bcsProveROM,Cslib.Crypto.Protocols.BCS.bcsVerifyOpeningsProg,Cslib.Crypto.Protocols.BCS.bcsVerifyROM,Cslib.Crypto.Protocols.BCS.bcsOracleDist,Cslib.Crypto.Protocols.BCS.bcsHonestROMProg,Cslib.Crypto.Protocols.BCS.bcsHonestROMGame: oracle-program BCS prover, verifier, and honest ROM completeness experiment.Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness: round-by-round knowledge soundness of aPublicCoinIOPwith a straight-line IOP extractor.Cslib.Crypto.Protocols.BCS.BCSTraceState,Cslib.Crypto.Protocols.BCS.bcsMemoize,Cslib.Crypto.Protocols.BCS.ValidFSChain,Cslib.Crypto.Protocols.BCS.bcsExtractTranscript,Cslib.Crypto.Protocols.BCS.BCSChainDoomed,Cslib.Crypto.Protocols.BCS.BCSGoodState,Cslib.Crypto.Protocols.BCS.bcsForbiddenDigests,Cslib.Crypto.Protocols.BCS.fsOutOfOrderTargets: list-trace ROM handler and adaptive soundness invariants.Cslib.Crypto.Protocols.BCS.bcsMTCost,Cslib.Crypto.Protocols.BCS.bcsFSCost,Cslib.Crypto.Protocols.BCS.bcsOpeningsMerkleQueries,Cslib.Crypto.Protocols.BCS.bcsSoundnessProg,Cslib.Crypto.Protocols.BCS.bcsSoundnessGame,Cslib.Crypto.Protocols.BCS.bcsExecROM,Cslib.Crypto.Protocols.BCS.bcsKnowledgeSoundnessGame,Cslib.Crypto.Protocols.BCS.BCSExtractionFails: per-channel query costs, ROM soundness and knowledge-soundness experiments, and the straight-line extraction-failure event.
Main results #
Cslib.Crypto.Protocols.BCS.iopVerify_bcsExtractOracles_of_bcsVerify,Cslib.Crypto.Protocols.BCS.exists_collision_of_bcsVerify_of_iopVerify_eq_false,Cslib.Crypto.Protocols.BCS.bcsExtractTable_cons_of_ne,Cslib.Crypto.Protocols.BCS.bcsExtractOracles_cons_of_ne: fixed-trace consistency, dual collision extraction, and non-inverting Merkle extension invariance forbcsExtractOracles.Cslib.Crypto.Protocols.BCS.evalPure_bcsChallengesProg,Cslib.Crypto.Protocols.BCS.evalPure_bcsProveROM,Cslib.Crypto.Protocols.BCS.evalPure_bcsVerifyROM,Cslib.Crypto.Protocols.BCS.bcsVerifyROM_bcsProveROM_eq_true,Cslib.Crypto.Protocols.BCS.bcsHonestROMGame_eq_pure_true: deterministic simulation and perfect completeness of the BCS transform in the two-channel random-oracle model.Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness.toRoundByRoundSoundness,Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness.rel_iopExtract_of_goodSteps: round-by-round knowledge soundness implies round-by-round soundness for{x | ∃ w, rel x w}and witness recovery along good challenge steps.Cslib.Crypto.Protocols.BCS.toOuterMeasure_bcsMemoize_not_goodState_step,Cslib.Crypto.Protocols.BCS.toOuterMeasure_run_bcsMemoize_not_goodState_le: single-step and accumulated bad-state bounds forbcsMemoize.Cslib.Crypto.Protocols.BCS.isCostBounded_bcsFSCost_bcsVerifyROM,Cslib.Crypto.Protocols.BCS.isCostBounded_bcsMTCost_bcsVerifyROM,Cslib.Crypto.Protocols.BCS.isCostBounded_bcsMTCost_bcsVerifyROM_of_queries_le: verifier query cost bounds on both channels.Cslib.Crypto.Protocols.BCS.bcsROMSoundness_bound,Cslib.Crypto.Protocols.BCS.bcsROMSoundness_bound_of_prover_verifier: adaptive two-channel ROM soundness bounds for the BCS transform.Cslib.Crypto.Protocols.BCS.bcsROMKnowledgeSoundness_trace_bound,Cslib.Crypto.Protocols.BCS.bcsROMKnowledgeSoundness_bound,Cslib.Crypto.Protocols.BCS.bcsROMKnowledgeSoundness_bound_of_prover_verifier: adaptive straight-line ROM knowledge soundness bounds without rewinding.Cslib.Crypto.Protocols.BCS.bcs_trace_sound_or_collision,Cslib.Crypto.Protocols.BCS.isCollision_bcsExtractTraceCollision: deterministic trace-extraction binding and collision extraction.Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsExtractTable,Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsExtractOracles,Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsExtractWitness,Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsFindTraceConflict,Cslib.Crypto.Protocols.BCS.computableInPolyTime_bcsExtractTraceCollision,Cslib.Crypto.Protocols.BCS.isPPT_bcsTraceCollisionFinder,Cslib.Crypto.Protocols.BCS.succProbability_bcsTraceBindingGame_le,Cslib.Crypto.Protocols.BCS.CollisionResistant.bcsTraceBinding_negligible,Cslib.Crypto.Protocols.BCS.HashFamily.bcsTraceBinding_negligible: polynomial-time certificates for straight-line trace extraction and standard-model trace-binding reductions toCollisionResistant H.
References #
- E. Ben-Sasson, A. Chiesa, N. Spooner, Interactive Oracle Proofs
- A. Chiesa, E. Yogev, Building Cryptographic Proofs from Hash Functions, Chapter 18 (Construction 18.5.3 and Lemma 18.5.7, printed pp. 199, 207), Chapter 25 (Construction 25.1.1, Remark 25.1.3, and Theorem 25.2.1, printed pp. 274–278), Chapter 26 (Theorem 26.1.1 and Construction 26.1.3, printed pp. 288–289), and Chapter 31 (Definitions 31.1.1–31.1.2, Definition 31.1.6, Construction 31.1.8, Theorem 31.2.1, and Theorem 31.3.1).