Skip to content

proof(xmss): equate signing with inline root reconstruction - #1091

Closed
alexanderlhicks wants to merge 1 commit into
codex/xmss-vcv-signing-supportfrom
codex/xmss-vcv-signing-rom
Closed

alexanderlhicks wants to merge 1 commit into
codex/xmss-vcv-signing-supportfrom
codex/xmss-vcv-signing-rom

Conversation

@alexanderlhicks

@alexanderlhicks alexanderlhicks commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

A local Merkle-root equality must also preserve the cache seen by the rest of signing.
The added theorem equates the complete interpreted signing results, including normal errors and every raw-cache entry.

The problem

After bottom-layer signing, the signer reconstructs the full bottom tree and signs its root at the top layer.
Replacing that reconstruction requires the top layer to receive the same root bytes and the same cache.
The cache stores complete 256-bit oracle replies, including unrelated warm entries.

The idea

The actual bottom signature supplies an authentication path whose sibling subtrees are already settled in that cache.
VCVio's settled-path law reconstructs the root from the selected leaf and that path.
The proof substitutes this joint root/cache equality inside the actual top-layer continuation.
The caller supplies no path-settlement or successful-signature premise.

Example

At leaf index 65537, the bottom tree index is 1.
Both computations pass the same root bytes and cache to top-layer signing:

bottom signature -> full bottom root -> top signing
bottom signature -> selected leaf + path fold -> top signing

A bottom normal error skips the root and top layer.
A top normal error retains the reached cache and returns the same error.

For reviewers

The theorem compares computations under the random-oracle model.
It preserves the whole reply and raw cache for arbitrary initial cache contents.
An ordinary consumer can use the result in a continuation that observes the entire returned cache.
Physical hash charges, capped execution and unforgeability remain separate obligations.
Warm hits still count as physical hash calls, so their cost needs a separate offset theorem.

The parent uses the shared HashSig.HashSpec oracle.
The addition keeps the parent's code, documentation and dependency pin.

Checks

The author and a fresh independent reviewer checked exact commit 42665dcd.
ROOT ran lake build --wfail: 6427 jobs passed.
lake exe check-decls inspected 67622 declarations with no findings.
The owner passed all 16 registered linters over 51 private and public declarations.
The axiom audit covered 25 declarations and found only the standard three axioms.
The initialization audit found no load-time values or unreadable values among its 51 constants.
The ordinary consumer, layout, layers, writing, soundness and release checks passed.
The soundness and release unit suites passed 14 and 9 tests.
The ROOT run skipped bindings, vectors and the unchanged checker self-tests.

GitHub completed the library, exports, bindings and vector suites.
Its build job then reached the inherited 60-minute limit during the proofs step.
The later memory and declaration checks were skipped after cancellation.
The full ROOT build and declaration audit above passed independently.

Stacked on #855.
Prepared by OpenAI Codex, an AI coding agent.

A settled path reconstructs the bottom root from its selected leaf.
Lift this equality through the actual top-layer continuation.
Normal errors and the complete raw cache stay in the result.
@github-actions github-actions Bot added crypto Cryptography: EthLib/Cryptography crypto: xmss XMSS hash-based signatures proofs Theorems under a Proofs directory type: proof New or changed theorems, with no change to the library code labels Nov 19, 2026
@tcoratger

Copy link
Copy Markdown
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.

@tcoratger tcoratger closed this Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto: xmss XMSS hash-based signatures crypto Cryptography: EthLib/Cryptography proofs Theorems under a Proofs directory type: proof New or changed theorems, with no change to the library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants