Two-channel BCS random-oracle protocol, completeness, and RBR knowledge soundness #
Defines the two-channel random-oracle interface BCSROMSpec Stmt Chal := MerkleHashSpec ⊕ₒ BCSFSSpec Stmt Chal, the transcript-chained Fiat–Shamir bridge chainedFS, the oracle-program BCS
prover and verifier (bcsProveROM, bcsVerifyROM), perfect completeness in the lazy two-channel
random-oracle model (bcsHonestROMGame_eq_pure_true), per-channel query cost functions
(bcsMTCost, bcsFSCost), and the round-by-round IOP knowledge-soundness predicate
IOPRoundByRoundKnowledgeSoundness ([BSCS16]; compare [CY24],
Construction 25.1.1, Remark 25.1.3, Chapter 26, and Chapter 31, Definition 31.1.6 and Theorem
31.3.1).
Main definitions #
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 specification 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 lazy-ROM completeness game.Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness: round-by-round knowledge soundness of aPublicCoinIOPwith a straight-line IOP extractor.Cslib.Crypto.Protocols.BCS.bcsMTCost,Cslib.Crypto.Protocols.BCS.bcsFSCost: per-call query costs on the Merkle and Fiat–Shamir channels.
Main results #
Cslib.Crypto.Protocols.BCS.evalPure_bcsChallengesProg,Cslib.Crypto.Protocols.BCS.evalPure_bcsProveROM,Cslib.Crypto.Protocols.BCS.evalPure_bcsVerifyOpeningsProg,Cslib.Crypto.Protocols.BCS.evalPure_bcsVerifyROM,Cslib.Crypto.Protocols.BCS.bcsVerifyROM_bcsProveROM_eq_true,Cslib.Crypto.Protocols.BCS.bcsHonestROMGame_eq_pure_true: deterministicOracleComp.evalPuresimulation againstchainedFSand perfect completeness in the lazy two-channel ROM.Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness.toRoundByRoundSoundness,Cslib.Crypto.Protocols.BCS.IOPRoundByRoundKnowledgeSoundness.rel_iopExtract_of_goodSteps: reduction from round-by-round knowledge soundness to round-by-round soundness for the induced language and witness recovery along good challenge steps.
References #
- E. Ben-Sasson, A. Chiesa, N. Spooner, Interactive Oracle Proofs
- A. Chiesa, E. Yogev, Building Cryptographic Proofs from Hash Functions, Chapter 25 (Construction 25.1.1 and Remark 25.1.3) and Chapter 31 (Definition 31.1.6 and Theorem 31.3.1).
Query input to the transcript-chained BCS Fiat–Shamir oracle: statement x, root prefix rts
through the current round, and challenges prevChals from earlier rounds.
Oracle specification for the transcript-chained BCS Fiat–Shamir challenge oracle.
Combined two-channel random-oracle specification for the BCS transform: a Merkle hash oracle on
the left (Sum.inl) and a transcript-chained Fiat–Shamir challenge oracle on the right (Sum.inr).
Combine a deterministic Merkle hash hTree and a deterministic transcript-chained Fiat–Shamir
function f into a deterministic oracle for BCSROMSpec Stmt Chal.
Sequentially compute the transcript-chained Fiat–Shamir challenge list [c_0, ..., c_{k-1}]
associated with a Merkle root list rts = [rt_0, ..., rt_{k-1}] under f.
Deterministic bridge turning a transcript-chained Fiat–Shamir function
f : Stmt × List (List Bool) × List Chal → Chal into the root-prefix Fiat–Shamir interface
Stmt → List (List Bool) → Chal of CslibFrontier/Crypto/Protocols/BCS/Basic.lean.
The BCS prover in the two-channel random-oracle model (bcsProveROM): runs all r
commit-and-challenge rounds via bcsProveRoundsProg and opens every queried entry under
merklePathProg ([BSCS16]; compare [CY24], Construction 25.1.1,
printed pp. 274–275).
Verify all Merkle openings and the IOP decision predicate for a BCSProof given already
derived challenges chals.
The BCS verifier in the two-channel random-oracle model (bcsVerifyROM): re-derives all r
round challenges on the Fiat–Shamir channel via bcsChallengesProg and checks all Merkle openings
and iop.decide on the Merkle channel via bcsVerifyOpeningsProg ([BSCS16];
compare [CY24], Construction 25.1.1, printed pp. 274–275).
Perfect completeness of the BCS ROM programs (OracleComp simulation form): under any
deterministic Merkle hash hTree whose digests all have one length and any transcript-chained
Fiat–Shamir function f, bcsVerifyROM accepts bcsProveROM on every (x, w) satisfying
rel x w.
Per-query distribution of the two-channel BCS random oracle with σ-bit Merkle digests and
uniform challenges over Chal: Merkle hash queries (Sum.inl) sample BitString.uniformList σ,
and Fiat–Shamir queries (Sum.inr) sample PMF.uniformOfFintype Chal.
The honest BCS execution as a two-channel OracleComp program: generate a proof via
bcsProveROM and verify it via bcsVerifyROM against the same oracle.
The honest BCS random-oracle experiment with σ-bit Merkle digests: runs bcsHonestROMProg
against the shared lazy random oracle RandomOracle.answer (bcsOracleDist Stmt Chal σ) from an
empty cache.
Perfect completeness of the BCS transform in the lazy two-channel random-oracle model: if
iop satisfies IOPCompleteness iop rel and rel x w holds, then for every digest length σ,
bcsHonestROMGame outputs true with probability 1 ([BSCS16]; compare
[CY24], Construction 25.1.1, printed pp. 274–275).
Round-by-round knowledge soundness of a PublicCoinIOP for relation rel with
straight-line IOP extractor iopExtract, doomed-prefix predicate doomed, and non-escaping round
transitions goodStep (compare IOPRoundByRoundSoundness and [CY24], Chapter 31,
Definition 31.1.6 and Theorem 31.3.1, as well as state-restoration knowledge soundness in
[BSCS16] and [CY24], Chapter 26, Theorem 26.1.1; note that
extract_of_doomed here is deterministic on complete doomed transcripts):
- Every statement
xstarts indoomed x []on the empty transcript prefix. - Every non-escaping challenge
goodStep x pref π cpreservesdoomed. - On any complete transcript
List.ofFn (fun j => (oracles j, chals j))that remainsdoomed, ifiopVerifyacceptsoraclesatchals, theniopExtract x oraclessatisfiesrel x.
Every statement starts in
doomedon 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
doomed. - extract_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 = true → rel x (iopExtract x oracles)
On any doomed complete transcript accepted by
iopVerify,iopExtractrecovers a valid witness forx.
IOPRoundByRoundKnowledgeSoundness for rel implies IOPRoundByRoundSoundness for the
associated language {x | ∃ w, rel x w} with the same goodStep relation.
If every round's challenge satisfies goodStep under IOPRoundByRoundKnowledgeSoundness and
iopVerify accepts, then iopExtract recovers a valid witness for x.
Cost of a BCS oracle call on the Merkle hash channel (Sum.inl).
Cost of a BCS oracle call on the Fiat–Shamir challenge channel (Sum.inr).