Repository navigation
proof(xmss): move the signer's secrets behind two hidden-seed hops - #1586
Merged
Merged
Conversation
The game of the signing-failure event now runs over a source of derivations. Two hidden-seed hops replace the scheme seed, then every derivation from it, by derivation queries, each at a cost of at most q / 2^256 for a game of q hash calls. Structural bounds count the hash calls of key generation, signing and verification. Part of ethereum#1385. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tcoratger
force-pushed
the
xmss-seed-hops
branch
from
November 8, 2026 13:42
f0cb91d to
d6ebe80
Compare
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The leanXMSS signing-failure event moves, in two hidden-seed game hops, to a game where the signer's derivations come from an independent lazy table.
Each hop costs at most
q / 2^256, whereqbounds the game's hash calls.This is step 2 of route B on #1385, approved by the maintainer on #1385.
The problem
signingFailureis the probability that some signing request of the game fails, and #910 left it unbounded.A request fails when one of its two codeword searches finds no codeword in
2^32trials.For fresh trials that has probability below
exp(-4000), but the adversary can query the hash too.It cannot aim at the trial inputs, because their randomizer base is a hash of the secret seed.
Making that argument formal needs the seed out of the game first.
The idea
A hidden-seed hop (the generic
prEvent_romImpl_deriveImpl_leinProofs/DerivationTable.lean, which the VRF proof uses) turns hashes of a secret into derivation queries.In the ideal game those queries read an independent table, and the secret appears nowhere.
The hop costs
q * ε, whereεbounds the chance that one hash input encodes a derivation of the drawn secret.leanXMSS derives in two levels, so there are two hops:
S = H("leanXMSS" | S_0): the scheme seed becomes a derivation query, read again at each request (seedGame).H(P | A | S | suffix): every derivation fromSbecomes a derivation query (prfGame), through the seed function of refactor(xmss): derive the signer's secrets through one seed function #1582.Each hash input fixes the seed it encodes, since the prefixes before the seed have fixed lengths.
So
ε = 2^-256for both hops.The game is written once, as
failGameOf, over a handler of hash queries and a source of derivations.The real game and both derivation games are instances, related by
simulateQ_failGameOf.That lemma rests on
MapMonad.lean: every leanXMSS algorithm commutes with a map of monads.Example
The statements, with
q = gameQueries qH r = 205 * 2^16 + 1 + qH + r (2^33 + 615 * 2^16) + 384:The last one takes the adversary's budgets: at most
qHhash queries andrsigning requests, on every path (IsQueryBoundP).For
qH = 2^64andr = 2^32,qis about1.5 * 2^65, and the two hops cost below2^-189.For reviewers
qcounts every hash call of the game: key generation, the signer's, the adversary's and the verification.QueryBound.leanproves the per-algorithm counts on every path, counting each seed-function call as one:publicKeyOfat most205 * 2^16,signDerivedat most2^33 + 615 * 2^16 - 3,verifyWithat most 384.IsQueryBoundP), not the support-basedHasHashQueryBoundof the main theorem.The structural form is what the hop lemma takes.
Sonce from a table of one entry; the second hop uses that table as its secret (prfEncoding).The lazy-to-eager step between them is
prEvent_idealImpl_eq_bind_fixDerivations.signDerived_map_monadneeds a third hypothesis, that the map commutes with<$>: the codeword test maps a digest.simulateQandliftMsatisfy it.prfGamefailure; this pull request leaves it as the right-hand side.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 leancheckeronProofs.Wots,Proofs.Xmss.MapMonad,Proofs.Xmss.QueryBound,Proofs.Xmss.Unforgeability.SeedHopsandProofs.Xmss.Unforgeability: passes; peak about 3.4 GB forSeedHops.#print axiomsofsigningFailure_le_prfGame:propext,Classical.choice,Quot.soundonly, pinned by#guard_msgs.scripts/check_lean_layout.py --base upstream/master: no finding.Part of #1385.
🤖 Generated with Claude Code