Skip to content

proof(xmss): bound the probability that a signing request fails - #1588

Merged
tcoratger merged 1 commit into
ethereum:masterfrom
tcoratger:xmss-ideal-failure
Nov 8, 2026
Merged

tcoratger merged 1 commit into
ethereum:masterfrom
tcoratger:xmss-ideal-failure

Conversation

@tcoratger

@tcoratger tcoratger commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

The probability that some leanXMSS signing request fails in the unforgeability game is now bounded, and the bound completes the theorem for a signer that tells why signing failed.
This is step 3 of route B on #1385, approved by the maintainer on #1385, and it closes EXT-23 part 2.

The problem

#910 proved that an adversary who sees why signing failed forges with probability at most q / 2^127 + signingFailure.
signingFailure is the probability that some signing request fails, and it had no bound.
#1586 moved it, at a cost of 2 Q / 2^256, to an ideal game where every derivation from the seed is drawn from a lazy table on first use.
What remained is the failure in that ideal game.

The idea

A request runs two codeword searches, one per layer, each of at most 2^32 trials.
A search reads its randomizer base from the table at the parameter, its key's address and the message.

  • A new search draws its base when it runs.
    A cached input at the key's message address is a trial input for at most 2^32 of the 2^128 bases.
    With at most Q cached inputs, some trial is already cached with probability at most Q / 2^96.
    Otherwise every trial is fresh, and all fail with probability at most exp(-4000) (proof(xmss): bound forgery when the signer tells why signing failed #910's prEvent_findCodeword_none_le).
  • A repeated search reads the same base.
    If its first run succeeded, the cache holds a trial with a codeword digest, so the repeat succeeds too.

So a request fails, or leaves a search without a codeword, with probability at most Q / 2^95 + 2 exp(-4000), as long as every earlier search found one (prEvent_requestD_le).
An induction on the adversary sums this over its r requests (failsAtMost_run_failSignerOf).
Each step's bound is a FailsAtMost statement.
It says: from a state where every search found a codeword, the step fails, or leaves a search without one, with probability at most a given term.
Only runs whose cache ends with at most Q entries count, and every run does, because the game makes at most Q hash calls.

Example

The statements, with Q = gameQueries qH r = 205 * 2^16 + 1 + qH + r (2^33 + 615 * 2^16) + 384:

prEvent_prfGame_ideal_le:        Pr[fail, ideal game] <= r (Q / 2^95 + 2 exp(-4000))
signingFailure_le:               signingFailure A <= 2 Q / 2^256 + r (Q / 2^95 + 2 exp(-4000))
reasonForgeAdvantage_le_bounded: forge advantage <= q / 2^127 + 2 Q / 2^256 + r (Q / 2^95 + 2 exp(-4000))

For qH = 2^40 and r = 2^10, Q is about 2^43, and the failure term is about 2^-42.
The term is at least r^2 / 2^62, so it exceeds 1 from about 2^31 requests, half a key's lifetime, and also once qH >= 2^95.

For reviewers

  • The quadratic loss comes from the proof, not from leanXMSS.
    The proof charges each new search the whole cache as possible hits on its trials.
    Only the adversary's queries can hold a trial input of a new search: other keys' trials have other addresses, and messages have fixed length.
    Counting only those, or bounding how many trials are cached rather than whether one is, would give a bound linear in r.
    That sharper bound is left as follow-up on proofs: leanXMSS unforgeability follow-ups #1385; this pull request proves the bound the route approved.
  • SearchesFound is the invariant: every table entry at a randomizer-base address has a cached trial with a codeword digest.
    Key generation draws no randomizer base, so it holds after key generation.
  • The adversary's budgets are on every run (IsQueryBoundP), as in proof(xmss): move the signer's secrets behind two hidden-seed hops #1586; the main theorem's budget q is the support-based one of proof(xmss): bound forgery when the signer tells why signing failed #910.
  • Generic lemmas: three about the search under a random oracle in Proofs/Wots.lean, and the growth of the ideal game's state in IdealBase.lean.

Checks

  • lake build --wfail EthLib.Cryptography.Proofs.Xmss EthLib.Cryptography.Proofs.Wots EthLib.Consensus.Proofs.PqKeys.Possession EthLib.Consensus.Proofs.PqKeys.PossessionBinding: passes.
  • lake env leanchecker on Proofs.Wots, IdealBase, IdealSearch, IdealFailure and Proofs.Xmss.Unforgeability: passes, peak 3.5 GB; each new file elaborates in about 2 s at about 2 GB.
  • #print axioms of reasonForgeAdvantage_le_bounded: propext, Classical.choice, Quot.sound only, pinned by #guard_msgs.
  • scripts/check_lean_layout.py --base upstream/master: no finding.

Part of #1385: EXT-24 and EXT-25 stay blocked on draft pull requests.

🤖 Generated with Claude Code

In the ideal game of the derivations, a new codeword search meets a
cached trial with probability at most Q / 2^96 and otherwise fails with
probability at most exp(-4000); a repeated search succeeds once its first
run did. A union bound over the requests, with the two hidden-seed hops,
bounds the signing failure by 2 Q / 2^256 + r (Q / 2^95 + 2 exp(-4000)),
and completes the bound of the signer that tells why signing failed.

Part of ethereum#1385.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tcoratger
tcoratger merged commit 28ceef6 into ethereum:master Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant