Polynomial-time random-target reduction witnesses for anonymous tokens #
This module provides uniform strict oracle-PPT realizations, an original extracted-model
word-level security theorem, and a query-bounded transfer lemma for
Cslib.Crypto.AnonymousToken.reduceRedemptions
(CslibFrontier/Crypto/Protocols/AnonymousToken/RandomTarget.lean).
Word-level adversaries operate on uniform List Bool encodings over a typed message family
Message n and challenge count N n varying with the security parameter n : ℕ:
- Adversaries receive
encWordTargetsInput ⟨pk, List.ofFn targets⟩, whose length is at leastN n. BecauseIsOraclePPTclocks every adversary in time polynomial inn + input.length, bothWordRedemptionAdversaryandWordOneMoreAdversary(as well asreduceRedemptionsWord) run in time polynomial inn + N n. ComputationaloneMoreWordGame/WordOneMoreUnforgeabletherefore models polynomial-time one-more hardness whenN nis polynomially bounded inn, whereas super-polynomialN nallows2^{O(n)}-time adversaries. slotWord : ℕ → List Bool → ℕrealizesslot n : Message n ↪ Fin (N n)in binary (encNat) polynomial time so individual(index, preimage)claim words stay logarithmic inN n(this keeps claim slots short without compressing theN n-element target vector input).- Total decoding and out-of-range claim rejection:
WordRedemptionAdversary.toTypedandWordOneMoreAdversary.toTypedprocess every output word as the typed value returned by its total decoder (dec nfor redemption messages;wordClaimListDecoderviaDecoder.list (Decoder.pair Decoder.nat Decoder.bits)for claim lists), rather than rejecting malformed non-codewords under aPartialDecoder. BecauseDecoder.listsplits arbitrary bit strings viaframesand decodes each frame pair with(Decoder.nat, Decoder.bits), malformed claim-list words still yield typed claim lists depending on the input.wordClaimListDecoderthen rejects the entire claim list (none, mapping to[], failingSignature.oneMoreAccept) if any decoded claim index satisfiesi ≥ N n, with no modular wraparound or element filtering. reduceRedemptionsWordpreserves bothIsOraclePPT(isOraclePPT_reduceRedemptionsWord) and input-uniform query bounds (withinWordQueries_reduceRedemptionsWord), and matchesRandomTarget.reduceRedemptionsin exactPMFlaw insideoneMoreWordGame(eval_oneMoreWordGame_reduceRedemptionsWord_eq).
Main definitions #
Cslib.Crypto.AnonymousToken.encRedemptionPayload,Cslib.Crypto.AnonymousToken.encRedemptionToken,Cslib.Crypto.AnonymousToken.encRedemptionTokenList: encodings for unit-opening redemption tokens.Cslib.Crypto.AnonymousToken.WordClaim,Cslib.Crypto.AnonymousToken.encWordClaim,Cslib.Crypto.AnonymousToken.encWordClaimList,Cslib.Crypto.AnonymousToken.WordTargetsInput,Cslib.Crypto.AnonymousToken.encWordTargetsInput,Cslib.Crypto.AnonymousToken.wordTargetsInputDecoder: named-field structures, encodings, and total input decoder for(index, preimage)claims and(pk, targets)inputs (keeping the pair word layouts unchanged).Cslib.Crypto.AnonymousToken.wordClaimListDecoder: checked claim-list decoder rejecting any out-of-range indexi ≥ N.Cslib.Crypto.AnonymousToken.WordRedemptionAdversary,Cslib.Crypto.AnonymousToken.WordOneMoreAdversary,Cslib.Crypto.AnonymousToken.reduceRedemptionsWord: word-level adversary types and uniform word realization ofRandomTarget.reduceRedemptions.Cslib.Crypto.AnonymousToken.extractedRedemptionWordGame,Cslib.Crypto.AnonymousToken.oneMoreWordGame,Cslib.Crypto.AnonymousToken.WordOneMoreUnforgeable: word-level extracted redemption and fixed-budget one-more games and thenovelword-level one-more unforgeability premise.Cslib.Crypto.AnonymousToken.WithinWordQueries: input-uniform signing-query bound predicate.
Main results #
Cslib.Crypto.AnonymousToken.isOraclePPT_reduceRedemptionsWord: uniform strictIsOraclePPTruntime certificate forreduceRedemptionsWord.Cslib.Crypto.AnonymousToken.eval_oneMoreWordGame_reduceRedemptionsWord_eq: exactPMFlaw equality againstSignature.oneMoreExperiment.Cslib.Crypto.AnonymousToken.extractedRedemptionWordGame_succProbability_le: finite success-probability bound againstoneMoreWordGame.Cslib.Crypto.AnonymousToken.negligible_extractedRedemptionWordGame_of_wordOneMoreUnforgeable: original asymptotic word-level redemption theorem assumingWordOneMoreUnforgeableagainst uniform strictIsOraclePPTadversaries.
Query-bounded transfer lemma #
Cslib.Crypto.AnonymousToken.withinWordQueries_reduceRedemptionsWord,Cslib.Crypto.AnonymousToken.succWithin_extractedRedemptionWordGame_withinQueries: query-only transfer (WithinWordQueriesbounds signing-oracle calls across inputs without bounding computational runtime).
Encodings and checked claim-list decoders #
The tuple of the fields of encWordClaim.
Encode a WordTargetsInput (pk with encBits, targets with encList encBits; identical
word layout to encPair encBits (encList encBits)).
Checked claim-list decoder at challenge size N: processes any bit string w through the
total decoder Decoder.list (Decoder.pair Decoder.nat Decoder.bits) (so malformed non-codewords
still yield decoded pairs depending on w), and rejects the entire claim list (none) whenever
any decoded pair has out-of-range index i ≥ N.
Whenever the underlying raw pair parse of w consists of pairs (i, sig) with i < N
(including when w is a malformed non-codeword), wordClaimListDecoder N w accepts and produces
the corresponding Fin N claims.
wordClaimListDecoder round-trips identically on every encoded list of valid Fin N claims.
Any out-of-range claim c with c.index ≥ N causes wordClaimListDecoder N to reject the
entire encoded claim list (none).
Word adversaries, games, and reduceRedemptionsWord #
A word-level extracted redemption adversary receives (n, encWordTargetsInput ⟨pk, ys⟩),
queries Unit × List Bool for bit-string signatures, and outputs unit-opening word tokens.
A word-level chosen-target one-more adversary receives (n, encWordTargetsInput ⟨pk, ys⟩),
queries Unit × List Bool for bit-string signatures, and outputs an encoded encWordClaimList.
Convert a word-level redemption adversary to a typed adversary at security parameter n by
processing every output token message through the total decoder dec : Decoder encM (so
malformed message words yield whatever typed message dec.decode returns rather than being
rejected as parse errors under a PartialDecoder).
Convert a word-level one-more adversary to a typed one-more adversary at security parameter n
via wordClaimListDecoder N. Every non-codeword output is processed as the claim list returned by
the underlying total decoder Decoder.list (Decoder.pair Decoder.nat Decoder.bits), and any
decoded claim with an out-of-range index i ≥ N causes wordClaimListDecoder N to return none,
which maps to [] (failing Signature.oneMoreAccept since budget + 1 ≥ 1).
Word-level extracted redemption experiment at security parameter n. Adversaries receive the
full encWordTargetsInput ⟨pk, List.ofFn targets⟩ vector of length ≥ N n, and token messages are
processed through dec n : Decoder (encM n).
Word-level chosen-target one-more experiment at security parameter n. Adversaries receive the
full encWordTargetsInput ⟨pk, List.ofFn targets⟩ vector of length ≥ N n (so IsOraclePPT
runtime is polynomial in n + N n, corresponding to PPT security when N n is polynomially
bounded), and output words are processed through wordClaimListDecoder (N n).
Word-level chosen-target one-more unforgeability (novel to this library; closest source
[BBB+26a], Definition 3.1, printed p. 7). Differs from [BBB+26a] Definition 3.1 in four
respects: (1) adversaries run in the uniform strict oracle-PPT class IsOraclePPT encBits rather
than non-uniform PPT; (2) targets is an explicit caller sampler rather than independent uniform
target words (so colliding targets violate this premise); (3) oneMoreWordGame hands the full
encoded target vector List.ofFn targets (length ≥ N n) in the input word, so adversary clocks
are polynomial in n + N n (representing PPT one-more unforgeability when N n is polynomially
bounded, whereas super-polynomial N n allows 2^{O(n)}-time adversaries); and (4) claim outputs
are processed via the lenient total decoder wordClaimListDecoder (rejecting any index i ≥ N n,
while decoding malformed bit words via Decoder.list (Decoder.pair Decoder.nat Decoder.bits)).
No implication to or from [BBB+26a] Definition 3.1 is established here; it holds
unconditionally at the pigeonhole boundary N n = 1 < budget n + 1
(wordOneMoreUnforgeable_one_slot), fails on colliding targets
(not_wordOneMoreUnforgeable_constTargets), and for N n ≥ budget n + 1 with efficient targets
proving it unconditionally would imply one-way functions.
Uniform word-level realization of RandomTarget.reduceRedemptions: runs A n input, keeps
the first budget n + 1 tokens, maps each token's message word via binary slotWord n into a
WordClaim, and encodes the claim list with encWordClaimList.
Efficiency and query certificates for reduceRedemptionsWord #
reduceRedemptionsWord is uniform strict IsOraclePPT encBits whenever n ↦ budget n + 1,
slotWord, and A are efficient.
Input-uniform signing-query admissibility for word adversaries: adversary n input makes at
most q signing-oracle queries on every input : List Bool. Unlike Game.WithinQueries (which
only constrains input = []) and unlike IsOraclePPT, this bounds signing-oracle calls across
all (pk, targets) inputs without bounding computational runtime.
reduceRedemptionsWord preserves WithinWordQueries with the exact same query budget.
oneMoreWordGame played by reduceRedemptionsWord budget slotWord A has the exact PMF
law of Signature.oneMoreExperiment played by RandomTarget.reduceRedemptions whenever
slotWord n w = (slot n ((dec n).decode w)).val.
Finite success-probability reduction for the word-level redemption game against
oneMoreWordGame.
Query-bounded transfer lemma (Game.SuccWithin over WithinWordQueries): any concrete
q-query bound ε n q for oneMoreWordGame transfers to extractedRedemptionWordGame with
loss 1, error 0, and identical signing-query budget q. This lemma bounds signing-oracle calls
only (not computational runtime), unlike
negligible_extractedRedemptionWordGame_of_wordOneMoreUnforgeable, which enforces uniform strict
IsOraclePPT encBits.
Original asymptotic word-level redemption step in the extracted random-target model:
assuming WordOneMoreUnforgeable S N targets budget against uniform strict IsOraclePPT encBits
adversaries (representing PPT one-more hardness when N n is polynomially bounded, since
oneMoreWordGame passes List.ofFn targets in the input word), and polynomial-time
n ↦ budget n + 1 and slotWord, every uniform strict IsOraclePPT adversary A has negligible
success probability in extractedRedemptionWordGame.