Repository navigation
Conversation
…equests The leanXMSS bound q / 2^127 counts in q every hash call of the worst run, the signer's included. This change restates it in the exact-security form, with the adversary's own hash queries qH and its signing requests qS apart. An adversary with at most qH hash queries and qS signing requests forges with probability at most (qH + 8,630,239,199 * qS + 13,435,265) / 2^127. The coefficient of qS is the most hash calls of one signing request, up to 2^32 randomizer trials on each layer included. The constant is the calls of key generation and of a verification. The proof bounds the hash calls of EthLib's signer, verifier and key generation on every path, then applies the existing bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tcoratger
force-pushed
the
xmss-query-bound
branch
from
November 4, 2026 22:43
e99e611 to
0eab71a
Compare
Collaborator
Author
|
XMSS was removed from EthLib in #5461; the formalization of leanVM, including its hash-based signatures, now lives in https://github.com/leanEthereum/leanVM. Closing this pull request here. |
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.
This research pull request restates the leanXMSS unforgeability bound in the exact-security form, with the adversary's own hash queries
qHand its signing requestsqSas separate terms.The new theorem follows from the existing one, so it makes the cost of a signing request visible but does not make the bound stronger.
It is not meant to be merged before the maintainer has reviewed it.
The problem
Unforgeability.unforgeablebounds a forgery byq / 2^127.Its
qcounts every hash call of the worst run of the game: key generation, the signer, the adversary and the final verification.A reader who sees "127 bits" expects
qto count only the adversary's queries.That is the convention of the exact-security definitions of Bellare and Rogaway (EUROCRYPT 1996, section 2.2).
Their forger makes
q_sigsigning queries andq_hashhash queries of its own.With the signer's calls inside
q, the cost of each signing request is hidden in the hypothesis.The idea
Count the calls of each part of the game, then apply the existing bound.
MakesAtMost adversary qH qSsays that, whatever the public key and the oracle answers, the adversary makes at mostqHhash queries and at mostqSsigning requests.It is a VCVio
IsQueryBoundPbound on the adversary's own computation.signWith,verifyWithandkeyGenWithon every path.The result is
unforgeable_queries:The constant
13,435,265is key generation's13,434,881calls plus verification's384.The coefficient
8,630,239,199, about2^33.007, is the most calls one signing request can make:SandP;2^32randomizer trials, 29 chain starts, at most 174 chain steps, and a path that rebuilds every sibling subtree;Both numbers are proved (
signQueries_eq,verifyQueries_eq).Example
An adversary that makes
2^40hash queries and requests one signature at each of the2^32leaf indices:qH / 2^127 = 2^-87;8,630,239,199 * 2^32 / 2^127is about2^-61.99;2^-62, as the audit of the current statement found.An adversary with
2^40hash queries and no signing request gets about2^-87.For reviewers
qSis the signer's worst case, not what the adversary learns from a signature.The underlying proof charges two units of
2^-128for every hash call after key generation, the signer's included, and it bounds the number of calls in the worst run.So no restatement on top of it can give
qSa coefficient much below the signer's worst case.Its classical random-oracle bound for the message hash is
(q' + 1)/|H| + q' * p * K / |R|withq' = q + p * K, wherepis the number of signing queries andKthe hash calls of each one (Drake, Khovratovich, Kudinov and Wagner, IACR CiC 2(1), 2025, Table 1 in section 3.1, applied withp = qsin Corollary 2 of section 5.2).Its main theorem (Theorem 1, section 4.2) is in the standard model, so only this heuristic table is comparable.
(q + 1) p / 2^n + q p / 2^kforptargets, the signed messages.There too the number of signatures multiplies a term.
MakesAtMostquantifies over every oracle answer, not only the answers the game can give.That is the usual query-bound convention, and it is stronger than the game needs.
Checks
lake build --wfail EthLib.Cryptography.Proofs.Xmss EthLib.Cryptography.Proofs: success.lake env lean EthLib/Cryptography/Proofs/Xmss/Unforgeability/Queries.lean: 4.0 s, 2.2 GB peak.LEAN_NUM_THREADS=1 lake env leanchecker EthLib.Cryptography.Proofs.Xmss.Unforgeability.Queries: no error, 3.5 GB peak.#print axiomsofunforgeable_queriesunder#guard_msgs:propext,Classical.choice,Quot.sound.lake exe check-decls: 0 findings.scripts/soundness_facts.py --check,scripts/check_layers.py,scripts/check_lean_layout.pyon the changed files: pass.Open questions
A bound in which
qShas a small coefficient needs the two lanes of the proof to count only the adversary's and the verifier's calls.The proof's own outline suggests that the signer's trials raise no bad event of their own.
A signer trial that lands on a digest the adversary computed is charged to the adversary's query.
The remaining partner term is quadratic in the number of digest calls, over
2^256.That change reaches the trace and hazard machinery of lane 1 and the expected-count bound of lane 2, thousands of lines.
2^20per layer, instead of2^32.Lane 2 already works with expected counts, but lane 1 bounds hazard queries in the worst run.
🤖 Generated with Claude Code