Documentation

CslibFrontier.Crypto.Protocols.AnonymousToken.IssuerBridge

Draft issuer bridge and carry-bit boundary for single-issuer VOLE-ACT #

Cslib.Crypto.AnonymousToken.Conservation analyzes a permissive extracted game in which the adversary supplies the initial balance T and the spend refund x' directly, and range checks (V4, plus T ≥ 1) are omitted. In the draft specification ([ZPS26], Protocol Specification), T is agreed out of band via the issuer's issuance policy (T ∈ [1..2^(8*L)]), x' is chosen by the issuer in SpendResponse, and range checks are enforced (T_init ≠ 0 at issuance; t', x, d < 2^(8*L) in SpendRelation (V4), t < 2^(8*L) from witness size, and d, x' < 2^(8*L) in SpendResponse) with rejection replies.

This module formalizes that stateful, probabilistic draft-style issuer within the extracted-witness model and proves an exact, zero-loss simulation reduction (bridgeAdversary, eval_extractedDraftConservationExperiment_eq) into Conservation.extractedConservationExperiment. Because Conservation's bound already holds for the permissive issuer and the conservation win predicate depends only on the log of accepted requests, the range checks, T ≥ 1 guard, and ticket single-use serve faithfulness to the draft rather than tightening the inequality; composing with Conservation directly transfers the concrete EUF-CMA and target/keyless-commitment binding bounds to extractedDraftConservationExperiment, while bridgeAdversary_queryBound preserves query budgets.

This draft-style game, the ticket-allocation device (agreeIssue/consumed), and the simulation reduction are original to this library. Modeling choices relative to the draft pseudocode:

This bridge stays in the extracted-witness model and bounds oracle queries rather than runtime: VOLEitH proof extraction, zero-knowledge, random-oracle or ideal-permutation arguments for Com and Tag, and multi-issuer selection remain tracked under #7068; the certified uniform strict oracle-PPT realization bridgeAdversaryWord and its word-level game theorem live in IssuerBridgePolyTime.

It also establishes the standalone arithmetic carry-bit boundary explaining why (V3) uses full integer equality rather than equality modulo 2 ^ w: for w-bit sums < 2 ^ (w + 1) (as implied by (V4) < 2 ^ w), equality holds if and only if modular equality modulo 2 ^ w holds together with matching top carry bit Nat.testBit · w (eq_iff_mod_eq_and_testBit_eq), and any modular collision between sums under 2 * bound forces an exact bound-credit wraparound discrepancy (wraparound_gap_of_mod_eq_ne).

Main definitions #

Main results #

References #

Issuer policy, draft-style requests, and range checks #

structure Cslib.Crypto.AnonymousToken.IssuerBridge.IssuerPolicy (PolicyState Context Nullifier Commitment IssueHint : Type) :

Stateful, probabilistic policy driving a draft-style issuer: fixed independently of the certification keys (pk, sk), agreeIssue chooses (or declines) the initial credit balance T during out-of-band issuance agreement, and chooseRefund chooses (or declines) the spend refund x' from public spend metadata (ctx, nf, d, c') without seeing private witnesses.

  • init : ProbComp PolicyState

    Initial private state of the issuer policy.

  • agreeIssue : Context → IssueHint → StateT PolicyState ProbComp (Option ℕ)

    Stateful, probabilistic initial-balance agreement (T_init) for context and hint.

  • chooseRefund : Context → Nullifier → ℕ → Commitment → StateT PolicyState ProbComp (Option ℕ)

    Stateful, probabilistic refund selection (x') given public spend request data.

structure Cslib.Crypto.AnonymousToken.IssuerBridge.DraftIssueRequest (Nullifier Opening Commitment : Type) :

An extracted draft-style issuance submission referencing an agreed ticket (a library-specific representation of out-of-band T_init agreement). Neither ctx nor amount is chosen in this message; both come from the issuer's ticket.

  • ticket : ℕ

    Identifier returned by an earlier .agreeIssue query.

  • commitment : Commitment

    Commitment c to (nullifier, ctx, T) under opening.

  • nullifier : Nullifier

    Extracted nullifier nf.

  • opening : Opening

    Extracted opening randomness r.

structure Cslib.Crypto.AnonymousToken.IssuerBridge.DraftSpendRequest (Nullifier Context Opening Commitment Sig : Type) :

An extracted draft-style spend submission: identical to Conservation.SpendRequest except that the refund x' is omitted because the issuer chooses it in SpendResponse.

  • ctx : Context

    Issuance context ctx shared by input and change tokens.

  • nullifier : Nullifier

    Revealed nullifier nf of the spent token.

  • debit : ℕ

    Amount d debited by this spend.

  • changeCommitment : Commitment

    Commitment c' to the change token.

  • oldCredit : ℕ

    Extracted committed balance t of the input token.

  • oldOpening : Opening

    Extracted opening randomness r of the input token.

  • oldRefund : ℕ

    Extracted prior refund x carried by the input token.

  • signature : Sig

    Extracted certification signature s on the input state.

  • newNullifier : Nullifier

    Extracted nullifier nf' of the change token.

  • newCredit : ℕ

    Extracted committed balance t' of the change token.

  • newOpening : Opening

    Extracted opening randomness r' of the change token.

def Cslib.Crypto.AnonymousToken.IssuerBridge.DraftSpendRequest.toSpendRequest {Nullifier Context Opening Commitment Sig : Type} (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) (refund : ℕ) :
Conservation.SpendRequest Nullifier Context Opening Commitment Sig

Promote a DraftSpendRequest to Conservation.SpendRequest using issuer-chosen refund.

def Cslib.Crypto.AnonymousToken.IssuerBridge.DraftSpendRequest.withinRange {Nullifier Context Opening Commitment Sig : Type} (bound : ℕ) (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) :

Check upper bounds < bound on the client-supplied debit d, extracted witness balance t (bounded implicitly by the draft's witness field 2^(8*L)), and (V4) fields x, t' ([ZPS26], SpendRelation V4 and SpendResponse step 2).

inductive Cslib.Crypto.AnonymousToken.IssuerBridge.DraftQuery (Nullifier Context Opening Commitment Sig IssueHint : Type) :

Queries admitted by the draft-style extracted issuer oracle: out-of-band issuance agreement, issuance submission, and spend submission.

  • agreeIssue {Nullifier Context Opening Commitment Sig IssueHint : Type} (ctx : Context) (hint : IssueHint) : DraftQuery Nullifier Context Opening Commitment Sig IssueHint

    Negotiate an initial balance T under ctx with policy hint hint.

  • issue {Nullifier Context Opening Commitment Sig IssueHint : Type} (req : DraftIssueRequest Nullifier Opening Commitment) : DraftQuery Nullifier Context Opening Commitment Sig IssueHint

    Submit an issuance commitment and extracted opening for an agreed ticket.

  • spend {Nullifier Context Opening Commitment Sig IssueHint : Type} (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) : DraftQuery Nullifier Context Opening Commitment Sig IssueHint

    Submit a spend request and extracted witness; the issuer supplies any refund x'.

Out-of-band issuance agreement reply returning the sequential ticket index and agreed balance T.

  • ticket : ℕ

    Sequential index of the allocated agreement ticket.

  • amount : ℕ

    Initial credit balance T agreed by the issuer policy.

Spend reply returning the issuer-chosen refund x' and certification signature on Tag(c', x').

  • refund : ℕ

    Refund x' chosen by the issuer policy.

  • signature : Sig

    Issuer certification signature on the change token.

Server-side record of an agreed issuance ticket under ctx for initial balance T.

  • ctx : Context

    Issuance context negotiated for this ticket.

  • amount : ℕ

    Initial credit balance T agreed for this ticket.

def Cslib.Crypto.AnonymousToken.IssuerBridge.instDecidableEqAgreedTicket.decEq {Context✝ : Type} [DecidableEq Context✝] (x✝ x✝¹ : AgreedTicket Context✝) :
Decidable (x✝ = x✝¹)
@[instance_reducible]
def Cslib.Crypto.AnonymousToken.IssuerBridge.draftReply {Nullifier Context Opening Commitment IssueHint : Type} (Sig : Type) :
DraftQuery Nullifier Context Opening Commitment Sig IssueHint → Type

Reply type of each DraftQuery: Option IssueAgreement for .agreeIssue, Option Sig for .issue, and Option (SpendReply Sig) for .spend.

structure Cslib.Crypto.AnonymousToken.IssuerBridge.IssuerState (Nullifier Context Opening Commitment Sig PolicyState : Type) :

Private state of the draft-style issuer: policy state, issued agreement tickets, consumed ticket indices, and accepted Conservation.Request log (oldest first).

  • policyState : PolicyState

    Current private state of the issuer policy.

  • pending : List (AgreedTicket Context)

    Agreed issuance tickets indexed by allocation order.

  • consumed : List ℕ

    Ticket indices already redeemed by an accepted .issue call.

  • accepted : List (Conservation.Request Nullifier Context Opening Commitment Sig)

    Accepted requests recorded in Conservation.Request format, oldest first.

def Cslib.Crypto.AnonymousToken.IssuerBridge.acceptDraftIssue {PolicyState Nullifier Context Opening Commitment Sig : Type} [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (bound : ℕ) (req : DraftIssueRequest Nullifier Opening Commitment) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
Option (Conservation.Request Nullifier Context Opening Commitment Sig)

Validate a .issue submission for draftIssuerOracle and bridgeAdversary (via internal bridgeHandler) against st.pending, single-use st.consumed, 1 ≤ amt (T_init ≠ 0 in IssueResponse), amt < bound (the draft's [1..2^(8*L)] input domain), and the IssueRelation commitment check. Returns none on rejection without modifying state.

def Cslib.Crypto.AnonymousToken.IssuerBridge.acceptDraftSpendPre {PolicyState Nullifier Context Opening Commitment Target PK SK Sig : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (bound : ℕ) (pk : PK) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) :

Pre-refund validity check for .spend, called by draftIssuerOracle and bridgeAdversary (via internal bridgeHandler) before policy.chooseRefund: enforces (V4) < bound on d, t, x, t', (V1)–(V3), and spent-nullifier uniqueness against st.accepted.

def Cslib.Crypto.AnonymousToken.IssuerBridge.agreeIssueTransition {PolicyState Nullifier Context Opening Commitment Sig : Type} (ctx : Context) (amt? : Option ℕ) (pst' : PolicyState) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
Option IssueAgreement × IssuerState Nullifier Context Opening Commitment Sig PolicyState

Apply an agreeIssue policy decision amt? under ctx, returning none when declined or a sequential ticket IssueAgreement appended to st.pending while updating st.policyState.

def Cslib.Crypto.AnonymousToken.IssuerBridge.commitDraftIssue {PolicyState Nullifier Context Opening Commitment Sig : Type} (ticket : ℕ) (creq : Conservation.Request Nullifier Context Opening Commitment Sig) (σ : Sig) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
Option Sig × IssuerState Nullifier Context Opening Commitment Sig PolicyState

Commit an accepted .issue request creq with signature σ, marking ticket consumed and appending creq to st.accepted.

Filter a policy-chosen spend refund refund? by the SpendResponse range bound < bound (representing x' < 2^(8*L)), returning none when declined or out of range.

def Cslib.Crypto.AnonymousToken.IssuerBridge.commitDraftSpend {PolicyState Nullifier Context Opening Commitment Sig : Type} (refund : ℕ) (creq : Conservation.Request Nullifier Context Opening Commitment Sig) (σ : Sig) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
Option (SpendReply Sig) × IssuerState Nullifier Context Opening Commitment Sig PolicyState

Commit an accepted .spend request creq with refund refund and signature σ, appending creq to st.accepted.

def Cslib.Crypto.AnonymousToken.IssuerBridge.draftIssuerOracle {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (keys : PK × SK) (q : DraftQuery Nullifier Context Opening Commitment Sig IssueHint) :
StateT (IssuerState Nullifier Context Opening Commitment Sig PolicyState) ProbComp (draftReply Sig q)

Draft-style stateful issuer oracle implementing out-of-band T agreement, issuer-chosen x', T ≥ 1 and < bound (V4) range checks, (V1)–(V3), and nullifier-uniqueness rejections. Rejected .issue calls leave st.consumed and st.policyState unchanged; .spend calls failing acceptDraftSpendPre return none without calling policy.chooseRefund, whereas chooseRefund returning none or refund ≥ bound updates policyState before returning none.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.run_draftIssuerOracle_agreeIssue {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (keys : PK × SK) (ctx : Context) (hint : IssueHint) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
(draftIssuerOracle com tag S policy bound keys (DraftQuery.agreeIssue ctx hint)).run st = do let __x ← (policy.agreeIssue ctx hint).run st.policyState match __x with | (amt?, pst') => pure (match amt? with | none => (none, { policyState := pst', pending := st.pending, consumed := st.consumed, accepted := st.accepted }) | some amt => (some { ticket := st.pending.length, amount := amt }, { policyState := pst', pending := st.pending ++ [{ ctx := ctx, amount := amt }], consumed := st.consumed, accepted := st.accepted }))

Transition law of draftIssuerOracle on .agreeIssue: samples policy.agreeIssue and, on some amt, allocates the next sequential ticket under ctx.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.run_draftIssuerOracle_issue {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (keys : PK × SK) (req : DraftIssueRequest Nullifier Opening Commitment) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
(draftIssuerOracle com tag S policy bound keys (DraftQuery.issue req)).run st = match acceptDraftIssue com bound req st with | none => pure (none, st) | some creq => do let σ ← S.sign keys.2 (Conservation.Request.signedMessage tag creq) pure (some σ, { policyState := st.policyState, pending := st.pending, consumed := req.ticket :: st.consumed, accepted := st.accepted ++ [creq] })

Transition law of draftIssuerOracle on .issue: validates via acceptDraftIssue, signs the accepted request, marks the ticket consumed, and appends to st.accepted.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.run_draftIssuerOracle_spend {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (keys : PK × SK) (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) :
(draftIssuerOracle com tag S policy bound keys (DraftQuery.spend req)).run st = if acceptDraftSpendPre com tag S bound keys.1 st req = true then do let __x ← (policy.chooseRefund req.ctx req.nullifier req.debit req.changeCommitment).run st.policyState match __x with | (refund?, pst') => have st' := { policyState := pst', pending := st.pending, consumed := st.consumed, accepted := st.accepted }; match refund? with | none => pure (none, st') | some refund => if refund < bound then have creq := Conservation.Request.spend (req.toSpendRequest refund); do let σ ← S.sign keys.2 (Conservation.Request.signedMessage tag creq) pure (some { refund := refund, signature := σ }, { policyState := st'.policyState, pending := st'.pending, consumed := st'.consumed, accepted := st'.accepted ++ [creq] }) else pure (none, st') else pure (none, st)

Transition law of draftIssuerOracle on .spend: skips policy.chooseRefund when acceptDraftSpendPre fails, otherwise samples the policy, rejects none or refund ≥ bound retaining the updated policyState, and otherwise signs and logs the spend request.

@[reducible, inline]
abbrev Cslib.Crypto.AnonymousToken.IssuerBridge.DraftAdversary (Nullifier Context Opening Commitment PK Sig IssueHint : Type) :

An adaptive adversary interacting with the draft-style issuer oracle and returning a target context ctx*.

structure Cslib.Crypto.AnonymousToken.IssuerBridge.ExtractedDraftConservationExecution (Nullifier Context Opening Commitment PK Sig : Type) :

The public key, target context, and accepted request log of an extracted draft conservation execution.

  • publicKey : PK

    Public verification key sampled by the experiment.

  • targetCtx : Context

    Target context ctx* output by the adversary.

  • accepted : List (Conservation.Request Nullifier Context Opening Commitment Sig)

    Accepted requests recorded in Conservation.Request format, oldest first.

def Cslib.Crypto.AnonymousToken.IssuerBridge.runExtractedDraftConservation {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :
ProbComp (ExtractedDraftConservationExecution Nullifier Context Opening Commitment PK Sig)

Execute A against the draft-style stateful issuer in the extracted-witness model.

def Cslib.Crypto.AnonymousToken.IssuerBridge.extractedDraftConservationAccept {Nullifier Context Opening Commitment PK Sig : Type} [DecidableEq Context] (run : ExtractedDraftConservationExecution Nullifier Context Opening Commitment PK Sig) :

Acceptance predicate of the extracted draft conservation game, delegating directly to Conservation.extractedConservationAccept.

def Cslib.Crypto.AnonymousToken.IssuerBridge.extractedDraftConservationExperiment {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :

Extracted draft-style VOLE-ACT credit-conservation experiment ([ZPS26], Protocol Specification). Unlike Conservation.extractedConservationExperiment, initial amounts T are agreed via policy.agreeIssue, spend refunds x' are chosen by policy.chooseRefund, and (V4) plus 1 ≤ T < bound range checks are enforced with none rejection replies. Because this game is still in the extracted-witness model, extraction from VOLEitH proofs, zero-knowledge, RO/ideal- permutation arguments, and runtime efficiency certificates remain outside this model (#7068).

Simulation reduction to Conservation #

def Cslib.Crypto.AnonymousToken.IssuerBridge.bridgeAdversary {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :
Conservation.ExtractedAdversary Nullifier Context Opening Commitment PK Sig

Explicit simulation reduction from DraftAdversary to Conservation.ExtractedAdversary. Encapsulates policy, ticket tracking, and (V4) range rejections while forwarding only accepted issuances and spends to Conservation.extractedIssuerOracle. Query bounds are proved in bridgeAdversary_queryBound; the certified uniform strict oracle-PPT bit-string realization bridgeAdversaryWord and its PMF law equality live in IssuerBridgePolyTime (#7068).

def Cslib.Crypto.AnonymousToken.IssuerBridge.draftVerifyCost {Nullifier Context Opening Commitment Sig IssueHint : Type} :
DraftQuery Nullifier Context Opening Commitment Sig IssueHint → ℕ

Query cost charging 0 to .agreeIssue (which makes no Conservation oracle call) and 1 to .issue and .spend.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.bridgeAdversary_verifyCostBounded {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) (pk : PK) {q : ℕ} (hA : OracleComp.IsCostBounded (Sum.elim (fun (x : ℕ) => 0) draftVerifyCost) (A pk) q) :
(bridgeAdversary com tag S policy bound A pk).IsQueryBounded q

bridgeAdversary makes at most q Conservation queries whenever A has draftVerifyCost budget q, charging 0 to .agreeIssue calls.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.bridgeAdversary_queryBound {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) (pk : PK) {q : ℕ} (hA : (A pk).IsQueryBounded q) :
(bridgeAdversary com tag S policy bound A pk).IsQueryBounded q

bridgeAdversary makes at most q queries to the Conservation oracle whenever A makes at most q draft-oracle queries (no runtime or polynomial-time certificate is claimed here; #7068).

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.simulate_bridgeAdversary_eq_of_forall {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) (pk : PK) (P : Conservation.Request Nullifier Context Opening Commitment Sig → Bool) (hIssue : ∀ (req : DraftIssueRequest Nullifier Opening Commitment) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) (creq : Conservation.Request Nullifier Context Opening Commitment Sig), acceptDraftIssue com bound req st = some creq → P creq = true) (hSpend : ∀ (req : DraftSpendRequest Nullifier Context Opening Commitment Sig) (st : IssuerState Nullifier Context Opening Commitment Sig PolicyState) (refund : ℕ), acceptDraftSpendPre com tag S bound pk st req = true → refund < bound → P (Conservation.Request.spend (req.toSpendRequest refund)) = true) :
ProbOracleComp.simulate (fun (creq : Conservation.Request Nullifier Context Opening Commitment Sig) => if P creq = true then ProbOracleComp.query creq else pure none) (bridgeAdversary com tag S policy bound A pk) = bridgeAdversary com tag S policy bound A pk

Filtering bridgeAdversary's Conservation oracle calls through a decidable predicate P is a no-op whenever every request emitted by acceptDraftIssue or acceptDraftSpendPre + acceptedSpendRefund satisfies P.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.acceptRequest_of_acceptDraftIssue {PolicyState Nullifier Context Opening Commitment Target PK SK Sig : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] {com : Nullifier → Context → ℕ → Opening → Commitment} {tag : Commitment → ℕ → Target} {S : Signature.Scheme PK SK Target Sig} {bound : ℕ} {pk : PK} {req : DraftIssueRequest Nullifier Opening Commitment} {st : IssuerState Nullifier Context Opening Commitment Sig PolicyState} {creq : Conservation.Request Nullifier Context Opening Commitment Sig} (h : acceptDraftIssue com bound req st = some creq) :

Every request produced by acceptDraftIssue passes Conservation.acceptRequest.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.acceptRequest_of_acceptDraftSpendPre {PolicyState Nullifier Context Opening Commitment Target PK SK Sig : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] {com : Nullifier → Context → ℕ → Opening → Commitment} {tag : Commitment → ℕ → Target} {S : Signature.Scheme PK SK Target Sig} {bound : ℕ} {pk : PK} {st : IssuerState Nullifier Context Opening Commitment Sig PolicyState} {req : DraftSpendRequest Nullifier Context Opening Commitment Sig} (h : acceptDraftSpendPre com tag S bound pk st req = true) (refund : ℕ) :

Any request satisfying acceptDraftSpendPre passes Conservation.acceptRequest for every refund.

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.eval_extractedDraftConservationExperiment_eq {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :

Exact simulation equality in the extracted-witness model: the draft-style conservation experiment has the exact same Boolean distribution as Conservation.extractedConservationExperiment on bridgeAdversary, with zero probability loss. This bridges Conservation.extractedConservationExperiment's permissive game to the draft's stateful issuer within the extracted-witness model (extraction, zero-knowledge, RO/ideal-permutation realization, and PPT runtime certificates remain outside this model, #7068).

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.extractedDraftConservationExperiment_succProbability_le {PolicyState Nullifier Context Opening Commitment Target PK SK Sig IssueHint : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] [DecidableEq Target] [Inhabited Nullifier] [Inhabited Context] [Inhabited Opening] [Inhabited Sig] (com : Nullifier → Context → ℕ → Opening → Commitment) (tag : Commitment → ℕ → Target) (S : Signature.Scheme PK SK Target Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :

Concrete extracted-model bound for the draft-style issuer: winning extractedDraftConservationExperiment yields either a targetForger existential forgery against S or a target collision in noteForger's run, each with coefficient one. Not a credit-conservation theorem for the unextracted protocol; VOLEitH extraction, zero-knowledge, RO/ideal-permutation realization, and PPT machine witnesses remain outside this model (#7068).

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.extractedDraftConservationExperiment_succProbability_le_prod_mk {PolicyState Nullifier Context Opening Commitment PK SK Sig IssueHint K : Type} [DecidableEq Nullifier] [DecidableEq Context] [DecidableEq Commitment] [Inhabited Nullifier] [Inhabited Context] [Inhabited Opening] [Inhabited Sig] (com : Nullifier → Context → ℕ → Opening → Commitment) (CS : Crypto.Commitment.Scheme K (Nullifier × Context × ℕ) Commitment Opening) (hverify : ∀ (k : K) (nf : Nullifier) (ctx : Context) (t : ℕ) (c : Commitment) (o : Opening), CS.verify k (nf, ctx, t) c o = decide (com nf ctx t o = c)) (S : Signature.Scheme PK SK (Commitment × ℕ) Sig) (policy : IssuerPolicy PolicyState Context Nullifier Commitment IssueHint) (bound : ℕ) (A : DraftAdversary Nullifier Context Opening Commitment PK Sig IssueHint) :

Concrete extracted-model keyless-commitment specialization at tag = Prod.mk: winning extractedDraftConservationExperiment yields either a targetForger EUF-CMA forgery against S or a binding collision for a keyless commitment scheme CS whose verifier accepts exactly when com nf ctx t o = c under every key (hverify), via Conservation.commitmentBindingReduction, each with coefficient one. VOLEitH extraction, zero-knowledge, RO/ideal-permutation realization, and PPT machine witnesses remain outside this model (#7068).

Carry-bit vs modular arithmetic boundary under (V4) #

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.eq_iff_mod_eq_and_testBit_eq {a b w : ℕ} (ha : a < 2 ^ (w + 1)) (hb : b < 2 ^ (w + 1)) :
a = b ↔ a % 2 ^ w = b % 2 ^ w ∧ a.testBit w = b.testBit w

Arithmetic carry-bit boundary for sums < 2 ^ (w + 1) (in particular t + x and t' + d under w-bit (V4) bounds < 2 ^ w, where the draft sets w = 8 * L): integer equality a = b holds if and only if modular equality modulo 2 ^ w holds together with equality of the (w + 1)-st carry bit Nat.testBit · w ([ZPS26], Spending V3 and V4).

theorem Cslib.Crypto.AnonymousToken.IssuerBridge.wraparound_gap_of_mod_eq_ne {t x t' d bound : ℕ} (ht : t < bound) (hx : x < bound) (ht' : t' < bound) (hd : d < bound) (hmod : (t + x) % bound = (t' + d) % bound) (hne : t + x ≠ t' + d) :
t' + d = t + x + bound ∨ t + x = t' + d + bound

Under (V4) bounds < bound, any pair of sums (t + x) and (t' + d) that agree modulo bound yet violate integer (V3) (t + x ≠ t' + d) differs by an exact bound-credit wraparound (t' + d = t + x + bound ∨ t + x = t' + d + bound).