Repository navigation
feat(xmss): add delayed layer signing callbacks - #785
Closed
alexanderlhicks wants to merge 2 commits into
Closed
alexanderlhicks wants to merge 2 commits into
alexanderlhicks wants to merge 2 commits into
Conversation
Expose one-time signing and its dependent path as delayed callbacks. The actual defaults give signLayer by rfl for any monad. Failed search preserves the natural-number key in its error and skips the path. Generic branch and joint trace properties distinguish normal signing errors from outer monad errors. Existing signer bodies and generated equations remain unchanged.
The callback form of the layer signer moves from the specification file to the proof file that uses it. The specification of leanXMSS stays as it is on master, and the callback form is a view of the layer signer for proofs only. The doc comments now cite no implementation and no history. The definition's type and every theorem statement are unchanged; only the implicit monad is now bound on the definition itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tcoratger
force-pushed
the
codex/xmss-ots-callbacks
branch
from
November 6, 2026 09:43
df37081 to
7bb68b0
Compare
tcoratger
force-pushed
the
codex/xmss-layer-callbacks
branch
from
November 6, 2026 09:43
711d847 to
bc5fde2
Compare
Collaborator
|
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.
The layer signer gains delayed callbacks for its one-time signature and authentication path.
The default callbacks give exactly the existing signer for any monad.
Stacked on #777.
The problem
Reduction proofs need to interpret the one-time signer while retaining the actual path algorithm and failure order.
A failed one-time signature must return before the path computation starts.
The idea
signLayerWithCallbacksassembles the signature from two functions that takeUnit.The default identity is proved by
rfl, without assuming monad laws.Success packs the exact randomizer, chain values and path returned by the callbacks.
Example
At bottom-layer key 7, let the one-time callback record
otsand returnnone.The result is
noAdmissibleEncoding bottom 7, and the path callback never runs.On success the path follows the one-time callback:
An outer exception from the path keeps both recorded effects.
The proved trace law distinguishes this exception from the normal signing-error value.
It quantifies over every initial trace and both callback replies.
For reviewers
The original natural-number key remains in the error.
The default one-time callback still uses
UInt32.ofNat e, and the path still receives the originale.Existing
signLayerand its generated equation remain unchanged.The whole signer retains its full bottom-tree computation.
The VCVio pin, package version, exports and bindings are unchanged.
This interface is a prerequisite for reduction proofs and adds no security bound.
Checks
Validation uses parent
df37081cover master59d8233e, with VCVio pinned tobbf05eee.lake build --wfail: passed, 6,015 jobs.lake exe check-decls: passed, 53,250 declarations and zero findings or baseline entries.The soundness and release-manifest Python unit tests also passed.
The binding and vector suites were skipped because their sources and interfaces are unchanged.
Prepared by OpenAI Codex, an AI coding agent.