Documentation

CslibFrontier.Crypto.Protocols.VOLE.ICMExtractor

Two-block VOLE leaf commitments in an ideal cipher #

A bounded step toward #7068 and #4987. The key is a query argument to a mathematical oracle for independent random permutations. Keys are not inferred from ciphertexts alone. The two counter blocks are public and fixed before the experiment. This models neither concrete AES nor a multi-tree protocol with grinding.

Main definitions #

Main results #

icmTable projects the ordered list used by the extractor to the per-key tables of IdealCipher.answer; icmMemoizeProg_perKey proves these transitions agree. A cache hit adds no edge. On a fresh forward probe, charge old ciphertexts and both coordinates of prior FS targets; on an inverse probe the ciphertext is adversary-selected, so charge the two counter inputs instead. Off these events a first-counter match identifies at most one seen key, and rows at every prior FS request are frozen. A fabricated hidden commitment gets a zero candidate row: only the fixed-row relation challenge error, not IC guessing, protects this case. A transcript search does not solve key recovery in a concrete cipher.

References #

Kim, Lee and Son [KLS25] use ideal-cipher query lists for a different, one-block vector semi-commitment (Section 3.1, Lemma 1; Section 5.1, Lemma 3).

@[reducible, inline]

Newest first, in input-output orientation irrespective of query direction.

def Cslib.Crypto.Protocols.VOLE.icmTable {Key Block : Type} [DecidableEq Key] (t : ICMState Key Block) (k : Key) :

One key's partial permutation. Other keys' entries do not constrain it.

def Cslib.Crypto.Protocols.VOLE.icmStateInv {Key Block : Type} (t : ICMState Key Block) [DecidableEq Key] :

Each per-key table is a partial bijection.

The empty trace consists of empty, consistent per-key permutation tables.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmMemoizeProg {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] (q : IdealCipher.Query Key Block) :
StateT (ICMState Key Block) PMF Block

Exact lazy bidirectional ICM kernel. A hit leaves the trace alone; a fresh edge is prepended. The imported permutation kernel samples uniformly without replacement on reachable states.

theorem Cslib.Crypto.Protocols.VOLE.icmMemoizeProg_preserves {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] {q : IdealCipher.Query Key Block} {t t' : ICMState Key Block} {a : Block} (h : icmStateInv t) (ha : (a, t') ∈ (icmMemoizeProg q t).support) :

Consistency step: starting from partial bijections, a sample preserves them.

theorem Cslib.Crypto.Protocols.VOLE.icmMemoizeProg_fresh_targets_le {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] (t : ICMState Key Block) (q : IdealCipher.Query Key Block) (targets : List Block) {Q : ℕ} (hQ : Q < Fintype.card Block) (hlen : List.length (icmTable t q.1) ≤ Q) (hf : RandomPermutation.cachedAnswer (icmTable t q.1) q.2 = none) :
(icmMemoizeProg q t).toOuterMeasure {r : Block × ICMState Key Block | r.1 ∈ targets} ≤ ↑targets.length * (↑(Fintype.card Block - Q))⁻¹

Counting step: for either query direction, only the unsampled endpoint is random. The set of targets may depend on the old transcript but not on the answer to this query.

theorem Cslib.Crypto.Protocols.VOLE.icmMemoizeProg_fresh_answer_le {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] (t : ICMState Key Block) (q : IdealCipher.Query Key Block) (target : Block) {Q : ℕ} (hQ : Q < Fintype.card Block) (hlen : List.length (icmTable t q.1) ≤ Q) (hf : RandomPermutation.cachedAnswer (icmTable t q.1) q.2 = none) :
(icmMemoizeProg q t).toOuterMeasure {r : Block × ICMState Key Block | r.1 = target} ≤ (↑(Fintype.card Block - Q))⁻¹

A singleton specialization for the first fresh verifier block of a committed opening.

theorem Cslib.Crypto.Protocols.VOLE.icmMemoizeProg_perKey {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] (q : IdealCipher.Query Key Block) (t : ICMState Key Block) (ht : icmStateInv t) :
PMF.map (fun (x : Block × ICMState Key Block) => match x with | (b, u) => (b, icmTable u)) (icmMemoizeProg q t) = IdealCipher.answer q (icmTable t)

The chronological sampler projects to the library's exact ideal-cipher kernel on per-key partial bijections (not to the forgetful random-function approximation).

def Cslib.Crypto.Protocols.VOLE.icmCommitLeaf {Key Block : Type} (iv0 iv1 : Block) (k : Key) :
OracleComp (IdealCipher.Spec Key Block) (Block × Block)

Two forward queries under the same key. CTR applications choose distinct counter inputs.

theorem Cslib.Crypto.Protocols.VOLE.icmCommitLeaf_guess_le {Key Block : Type} [DecidableEq Key] [DecidableEq Block] [Fintype Block] [Nonempty Block] (t : ICMState Key Block) (k : Key) (x₀ x₁ : Block) (c : Block × Block) {Q : ℕ} (hQ : Q < Fintype.card Block) (ht : List.length (icmTable t k) ≤ Q) (hmiss : List.lookup x₀ (icmTable t k) = none ∨ List.lookup x₁ (icmTable t k) = none) :
(OracleComp.runWith icmMemoizeProg (icmCommitLeaf x₀ x₁ k) t).toOuterMeasure {r : (Block × Block) × ICMState Key Block | r.1 = c} ≤ (↑(Fintype.card Block - Q))⁻¹

Fixed-opening step for the actual two-query commitment. If at least one counter input is unexposed for this key, hitting a prescribed ordered pair costs at most one fresh target hit. An already cached coordinate need not be random. No independence between the two outputs is used.

theorem Cslib.Crypto.Protocols.VOLE.icmCommitLeaf_cost {Key Block : Type} (iv0 iv1 : Block) (k : Key) (c : ℕ) :
OracleComp.IsCostBounded (fun (x : IdealCipher.Query Key Block) => c) (icmCommitLeaf iv0 iv1 k) (c + c)

The two queries of a commitment are both charged, even if they hit.

def Cslib.Crypto.Protocols.VOLE.extractKeyFromICMTrace {Key Block : Type} [DecidableEq Key] [DecidableEq Block] (t : ICMState Key Block) (x₀ x₁ : Block) (c : Block × Block) :
Option Key

Search first-counter records with a matching second-counter record under the same key. No search over the (potentially exponentially large) key space is involved.

structure Cslib.Crypto.Protocols.VOLE.ICMRequest (d n : ℕ) (Stmt Block Msg : Type) :

Live pre-challenge data; all commitments and both correction messages enter the FS query.

  • stmt : Stmt

    Public statement.

  • coms : Fin (2 ^ d) → Block × Block

    Ordered vector of two-block commitments.

  • dCorr : BitString n

    Witness correction.

  • corrMsg : Msg

    Remaining pre-challenge check data.

@[instance_reducible]
instance Cslib.Crypto.Protocols.VOLE.instDecidableEqICMRequest {d✝ n✝ : ℕ} {Stmt✝ Block✝ Msg✝ : Type} [DecidableEq Stmt✝] [DecidableEq Block✝] [DecidableEq Msg✝] :
DecidableEq (ICMRequest d✝ n✝ Stmt✝ Block✝ Msg✝)
def Cslib.Crypto.Protocols.VOLE.instDecidableEqICMRequest.decEq {d✝ n✝ : ℕ} {Stmt✝ Block✝ Msg✝ : Type} [DecidableEq Stmt✝] [DecidableEq Block✝] [DecidableEq Msg✝] (x✝ x✝¹ : ICMRequest d✝ n✝ Stmt✝ Block✝ Msg✝) :
Decidable (x✝ = x✝¹)
structure Cslib.Crypto.Protocols.VOLE.ICMProof (d n : ℕ) (Stmt Key Block Msg : Type) :

Flat one-repetition proof: the key at the hidden index is a dummy.

  • request : ICMRequest d n Stmt Block Msg

    Data fixed at the hash query.

  • openKeys : Fin (2 ^ d) → Key

    All but one of these keys are disclosed.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.VOLE.VOLEITHICMSpec (d n : ℕ) (Stmt Key Block Msg Chal : Type) :
OracleSpec (IdealCipher.Query Key Block ⊕ ICMRequest d n Stmt Block Msg)

Keyed bidirectional ideal cipher on the left, Fiat–Shamir hash on the right.

def Cslib.Crypto.Protocols.VOLE.icmRows {Key Block : Type} {d n : ℕ} {Stmt Msg : Type} [DecidableEq Key] [DecidableEq Block] (expand : Key → BitString n) (t : ICMState Key Block) (x₀ x₁ : Block) (r : ICMRequest d n Stmt Block Msg) :
Fin (2 ^ d) → BitString n

Use zero only as a candidate row when neither trace orientation identifies a full key. This is not a claim that a missing leaf has an opening.

def Cslib.Crypto.Protocols.VOLE.extractWitnessFromICMTrace {Key Block : Type} {d n : ℕ} {Stmt Msg Wit : Type} [DecidableEq Key] [DecidableEq Block] (expand : Key → BitString n) (decode : BitString n → Wit) (t : ICMState Key Block) (x₀ x₁ : Block) (r : ICMRequest d n Stmt Block Msg) :
Wit

Straight-line reconstruction of the full conversion and corrected candidate witness.

structure Cslib.Crypto.Protocols.VOLE.ICMParameters (d n : ℕ) (Stmt Key Block Msg Chal Wit : Type) :

Public parameters of the flat experiment. In particular, neither counter can be chosen in response to an inverse query. Seed expansion is a fixed function, not another IC channel.

  • x₀ : Block

    First counter input.

  • x₁ : Block

    Second counter input.

  • expand : Key → BitString n

    Expand a leaf key into a VOLE row.

  • decode : BitString n → Wit

    Decode the corrected row sum.

  • hide : Chal → Fin (2 ^ d)

    Challenge-to-hidden-index decoding.

  • check : Stmt → (Fin d → BitString n) → BitString n → Msg → Chal → Bool

    Underlying VOLE check, including all pre-challenge data.

  • rel : Stmt → Wit → Bool

    Witness relation.

def Cslib.Crypto.Protocols.VOLE.icmRowCheck {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) (r : ICMRequest d n Stmt Block Msg) (rows : Fin (2 ^ d) → BitString n) (z : Chal) :

Check the relation on verifier columns, with the hidden row omitted and indices XOR-shifted.

def Cslib.Crypto.Protocols.VOLE.icmProveLeafFS {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) (encode : Wit → BitString n) (pre : (Fin d → BitString n) → BitString n → BitString n → Msg) (dummy : Key) (keys : Fin (2 ^ d) → Key) (stmt : Stmt) (w : Wit) :
OracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) (ICMProof d n Stmt Key Block Msg)

The honest prover binds the entire ordered vector, correction and pre-message before hashing.

theorem Cslib.Crypto.Protocols.VOLE.icmProveLeafFS_cost {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) (encode : Wit → BitString n) (pre : (Fin d → BitString n) → BitString n → BitString n → Msg) (dummy : Key) (keys : Fin (2 ^ d) → Key) (stmt : Stmt) (w : Wit) (c f : ℕ) :
OracleComp.IsCostBounded (Sum.elim (fun (x : IdealCipher.Query Key Block) => c) fun (x : ICMRequest d n Stmt Block Msg) => f) (icmProveLeafFS P encode pre dummy keys stmt w) (2 ^ d * (c + c) + f)

The honest prover makes both counter probes per key before its sole challenge probe.

def Cslib.Crypto.Protocols.VOLE.icmVerify {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] (p : ICMProof d n Stmt Key Block Msg) :
OracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) Bool

Query the shared FS hash, check each disclosed pair under its opening, and check the relation. The hidden key is never queried.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmHonestGame {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] (encode : Wit → BitString n) (pre : (Fin d → BitString n) → BitString n → BitString n → Msg) (dummy : Key) (keys : Fin (2 ^ d) → Key) (stmt : Stmt) (w : Wit) (law : PMF ((Key → Equiv.Perm Block) × (ICMRequest d n Stmt Block Msg → Chal))) :

Honest game against a shared, fixed permutation family and FS function, averaged over any joint law for these tables (in particular the independent uniform ideal tables).

theorem Cslib.Crypto.Protocols.VOLE.icmHonestGame_eq_pure_true {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] (encode : Wit → BitString n) (pre : (Fin d → BitString n) → BitString n → BitString n → Msg) (dummy : Key) (keys : Fin (2 ^ d) → Key) (stmt : Stmt) (w : Wit) (law : PMF ((Key → Equiv.Perm Block) × (ICMRequest d n Stmt Block Msg → Chal))) (hc : ∀ (z : Chal), have rows := P.expand ∘ keys; have v := FAEST.convertExpandedRows d rows; P.check stmt (FAEST.convertExpandedRows d (FAEST.verifierRows rows (P.hide z))).columns (encode w + v.u) (pre v.columns v.u (encode w + v.u)) z = true) :
icmHonestGame P encode pre dummy keys stmt w law = PMF.pure true

Completeness step: if honest VOLE rows pass the underlying check for every challenge, verification accepts with probability one, even when keys repeat.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.VOLE.ICMWorld (d n : ℕ) (Stmt Key Block Msg Chal : Type) :

State of both ideal oracles. Only fresh FS requests and fresh cipher edges are stored.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmHandler {Key Block : Type} {d n : ℕ} {Stmt Msg Chal : Type} [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] (q : IdealCipher.Query Key Block ⊕ ICMRequest d n Stmt Block Msg) :
StateT (ICMWorld d n Stmt Key Block Msg Chal) PMF (VOLEITHICMSpec d n Stmt Key Block Msg Chal q)

Memoized shared FS channel and the actual bidirectional cipher kernel.

def Cslib.Crypto.Protocols.VOLE.icmTranscriptVerify {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] (s : ICMWorld d n Stmt Key Block Msg Chal) (p : ICMProof d n Stmt Key Block Msg) :

The application gate checks only an already queried FS challenge and already queried opened edges. To implement an ordinary verification call, evaluate icmVerify first.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmKSBound (d N Q F : ℕ) (ε : NNReal) :

Coarse but adaptive loss: Q IC probes, F FS probes, including verifier calls. The Q inside the parentheses charges collisions with old queried edges, not unseen keys.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.VOLE.ICMGateSpec (d n : ℕ) (Stmt Key Block Msg Chal Req Resp : Type) :
OracleSpec (Req ⊕ IdealCipher.Query Key Block ⊕ ICMRequest d n Stmt Block Msg)

Direct cipher/FS access together with an application gate.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmVerifyGatedHandler {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] {Req Resp Log : Type} (parse : Req → ICMProof d n Stmt Key Block Msg) (reject : Req → Log → Resp × Log) (accept : Wit → Req → Log → Resp × Log) (q : Req ⊕ IdealCipher.Query Key Block ⊕ ICMRequest d n Stmt Block Msg) :
StateT (ICMWorld d n Stmt Key Block Msg Chal × Log) PMF (ICMGateSpec d n Stmt Key Block Msg Chal Req Resp q)

Generic application handler. Reject uses only the request and log. On acceptance the callback receives the straight-line witness fixed at the first FS query (before fresh verifier edges).

def Cslib.Crypto.Protocols.VOLE.icmCipherCost {ι ρ κ φ : Type} :
ι ⊕ ρ ⊕ κ ⊕ φ → ℕ

Charge a raw cipher probe, not private randomness, FS or a cache-only gate.

def Cslib.Crypto.Protocols.VOLE.icmHashCost {ι ρ κ φ : Type} :
ι ⊕ ρ ⊕ κ ⊕ φ → ℕ

Charge an FS probe, not private randomness, the cipher or a cache-only gate.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_runWith_icmVerifyGatedHandler_le {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] {Req Resp Log α : Type} (ε : NNReal) (hs : VOLEITHSoundnessError P.decode P.hide P.rel P.check ε) (parse : Req → ICMProof d n Stmt Key Block Msg) (reject : Req → Log → Resp × Log) (a b : Wit → Req → Log → Resp × Log) (hab : ∀ (w : Wit) (req : Req) (l : Log), P.rel (parse req).request.stmt w = true → a w req l = b w req l) (prog : ProbOracleComp (ICMGateSpec d n Stmt Key Block Msg Chal Req Resp) α) {Q F : ℕ} (hQ : Q < Fintype.card Block) (hc : OracleComp.IsCostBounded icmCipherCost prog Q) (hf : OracleComp.IsCostBounded icmHashCost prog F) (log : Log) (event : Set (α × ICMWorld d n Stmt Key Block Msg Chal × Log)) :

Two-cost, bounded conditional step toward #7068 and #4987. Queries may depend on all earlier answers. The callbacks need agree only for actual relation witnesses. Cipher and FS budgets include all verifier queries; a cache-only checkpoint neither samples nor incurs another loss.

def Cslib.Crypto.Protocols.VOLE.icmVerifyCall {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] {Req Resp : Type} (parse : Req → ICMProof d n Stmt Key Block Msg) (req : Req) :
OracleComp (ICMGateSpec d n Stmt Key Block Msg Chal Req Resp) Resp

Warm the real FS and cipher tables for this proof, then ask the application gate. All randomness-consuming verifier actions remain visible in the client's two budgets.

noncomputable def Cslib.Crypto.Protocols.VOLE.icmAuditHandler {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] (q : ICMProof d n Stmt Key Block Msg ⊕ IdealCipher.Query Key Block ⊕ ICMRequest d n Stmt Block Msg) :
StateT (ICMWorld d n Stmt Key Block Msg Chal × Bool) PMF (ICMGateSpec d n Stmt Key Block Msg Chal (ICMProof d n Stmt Key Block Msg) Bool q)

A gate flag recording whether any accepted proof failed extraction.

theorem Cslib.Crypto.Protocols.VOLE.icmMultiVerify_sound_bound {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] {α : Type} (ε : NNReal) (hs : VOLEITHSoundnessError P.decode P.hide P.rel P.check ε) (prog : ProbOracleComp (ICMGateSpec d n Stmt Key Block Msg Chal (ICMProof d n Stmt Key Block Msg) Bool) α) {Q F : ℕ} (hQ : Q < Fintype.card Block) (hc : OracleComp.IsCostBounded icmCipherCost prog Q) (hf : OracleComp.IsCostBounded icmHashCost prog F) :
(ProbOracleComp.runWith (icmAuditHandler P) prog (([], []), false)).toOuterMeasure {(fst, fst_1, bad) : α × ICMWorld d n Stmt Key Block Msg Chal × Bool | bad = true} ≤ icmKSBound d (Fintype.card Block) Q F ε

Adaptive multi-verify step toward #7068 and #4987: even if previous verification answers are used to choose future queries, the audit flag records any gate-accepted proof whose first-FS snapshot witness fails the relation. The probability that this flag is set is at most icmKSBound. Counts include the verifier's forward probes and rehashes.

def Cslib.Crypto.Protocols.VOLE.icmSingleGame {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] (A : ProbOracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) (ICMProof d n Stmt Key Block Msg)) :
ProbOracleComp (ICMGateSpec d n Stmt Key Block Msg Chal (ICMProof d n Stmt Key Block Msg) Bool) Bool

Single-proof game: after adaptive private, cipher and FS queries, a proof is fixed and verification warms both oracle channels before checking its openings.

theorem Cslib.Crypto.Protocols.VOLE.icmKnowledgeSoundness_bound {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] (ε : NNReal) (hs : VOLEITHSoundnessError P.decode P.hide P.rel P.check ε) (A : ProbOracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) (ICMProof d n Stmt Key Block Msg)) {Q F : ℕ} (hQ : Q < Fintype.card Block) (hc : OracleComp.IsCostBounded icmCipherCost (icmSingleGame P A) Q) (hf : OracleComp.IsCostBounded icmHashCost (icmSingleGame P A) F) :
(ProbOracleComp.runWith (icmAuditHandler P) (icmSingleGame P A) (([], []), false)).toOuterMeasure {(fst, fst_1, bad) : Bool × ICMWorld d n Stmt Key Block Msg Chal × Bool | bad = true} ≤ icmKSBound d (Fintype.card Block) Q F ε

Single-proof conditional step toward #7068 and #4987. An unopened leaf need not exist: its zero candidate row is handled by the VOLE relation challenge premise, not by claiming a cipher preimage was sampled. The audit flag records an accepted proof whose witness from the first-FS snapshot fails the relation.

theorem Cslib.Crypto.Protocols.VOLE.icmHandler_reachable_inv {Key Block : Type} {d n : ℕ} {Stmt Msg Chal : Type} [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] {α : Type} (A : ProbOracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) α) (v : α) (s : ICMWorld d n Stmt Key Block Msg Chal) (h : (v, s) ∈ (ProbOracleComp.runWith icmHandler A ([], [])).support) :

Reachable shared-oracle worlds have per-key partial bijections, regardless of query direction or adversarial scheduling. The FS query never modifies the cipher trace.

def Cslib.Crypto.Protocols.VOLE.icmEntrySnapshot {Key Block : Type} {d n : ℕ} {Stmt Msg Chal : Type} [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] (s : ICMWorld d n Stmt Key Block Msg Chal) (r : ICMRequest d n Stmt Block Msg) :
ICMState Key Block

The extraction transcript available before verification: use the previously cached FS snapshot, or the current cipher transcript if the verifier will hash this request first.

theorem Cslib.Crypto.Protocols.VOLE.icmVerify_agrees_with_gate {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Key] [DecidableEq Block] [DecidableEq Stmt] [DecidableEq Msg] [Fintype Block] [Nonempty Block] [Fintype Chal] [Nonempty Chal] (s u : ICMWorld d n Stmt Key Block Msg Chal) (p : ICMProof d n Stmt Key Block Msg) (hs : icmStateInv s.1) (result : Bool) (hr : (result, u) ∈ (OracleComp.runWith icmHandler (icmVerify P p) s).support) :
result = icmTranscriptVerify P u p ∧ ∃ (z : Chal), List.lookup p.request u.2 = some (z, icmEntrySnapshot s p.request)

Verifier-to-gate step: on every supported ordinary verification from a consistent cipher trace, its Boolean is exactly the post-query gate check. This includes a first-ever FS query.

theorem Cslib.Crypto.Protocols.VOLE.icmVerifyCall_cost {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] {Req Resp : Type} (parse : Req → ICMProof d n Stmt Key Block Msg) (req : Req) (c f : ℕ) :
OracleComp.IsCostBounded (Sum.elim (fun (x : Req) => 0) (Sum.elim (fun (x : IdealCipher.Query Key Block) => c) fun (x : ICMRequest d n Stmt Block Msg) => f)) (icmVerifyCall P parse req) (f + 2 ^ d * (c + c))

A warmed verification costs at most 2 * 2^d IC probes and one FS probe. The coarser cipher bound charges even the skipped hidden index. Gate checkpoints are deterministic.

theorem Cslib.Crypto.Protocols.VOLE.icmSingleGame_cost {Key Block : Type} {d n : ℕ} {Stmt Msg Chal Wit : Type} (P : ICMParameters d n Stmt Key Block Msg Chal Wit) [DecidableEq Block] (A : ProbOracleComp (VOLEITHICMSpec d n Stmt Key Block Msg Chal) (ICMProof d n Stmt Key Block Msg)) (c f : ℕ) {k : ℕ} (hA : OracleComp.IsCostBounded (Sum.elim (fun (x : ℕ) => 0) (Sum.elim (fun (x : IdealCipher.Query Key Block) => c) fun (x : ICMRequest d n Stmt Block Msg) => f)) A k) :
OracleComp.IsCostBounded (Sum.elim (fun (x : ℕ) => 0) (Sum.elim (fun (x : ICMProof d n Stmt Key Block Msg) => 0) (Sum.elim (fun (x : IdealCipher.Query Key Block) => c) fun (x : ICMRequest d n Stmt Block Msg) => f))) (icmSingleGame P A) (k + (f + 2 ^ d * (c + c)))

Lift the prover's own weighted budget into the single-proof game: private coins and the cache-only gate are free, and one verification adds at most f + 2^d * (c + c).