Skip to content

proof(xmss): retain connected signer cache endpoints - #855

Closed
alexanderlhicks wants to merge 2 commits into
codex/xmss-vcv-merkle-cachefrom
codex/xmss-vcv-signing-support
Closed

alexanderlhicks wants to merge 2 commits into
codex/xmss-vcv-merkle-cachefrom
codex/xmss-vcv-signing-support

Conversation

@alexanderlhicks

Copy link
Copy Markdown
Contributor

A signing call can complete its bottom layer and still return a normal top-layer error.
Security arguments need the reached prefix and its full raw cache even when no signature is returned.

The new theorem decomposes an actual supported signDerived result into connected intermediate results under the model random oracle.
It retains the bottom OTS, path, full root and top reply at their actual cache boundaries.
That same path endpoint supplies the settlement premise for VCVio's cached-root refinement through EthLib's adapter.
The caller supplies no separate root or settlement assumption.

For leaf index 65537, the bottom tree index is 1.
A top-layer noAdmissibleEncoding reply still has this reached prefix:

bottom OTS Some -> bottom path -> full bottom root -> top OTS None
     afterOTS       beforeRoot         afterRoot       final cache

The top message is the bytes of that chosen root.
The returned reply exposes no signature through readback.
A bottom OTS failure instead reaches the final cache directly and skips the root and top layer.

The cache stores complete 256-bit raw replies; uniform queries remain uncached.
The theorem permits arbitrary initial raw cache contents.
Private transports reuse the existing tree laws and the public adapter in #852.
No operational definition or dependency pin changes.

This proves connected support and a local root/cache equality.
Whole-signer equality, chronological logs, physical query charges, capped execution and unforgeability remain separate obligations.

Validation at exact EthLib 15ff914d and VCVio 7d5df994 used the tracked Git pin.
lake build --wfail passed all 6,038 jobs.
lake exe check-decls checked 53,374 EthLib declarations with zero findings, new entries or stale entries.
The 46 private and public owner declarations passed the native check and all 16 linters.
All 23 source theorem declarations use only the standard three axioms.
Initialization, layout, import layers, writing, soundness facts and release-manifest checks passed.
Independent review rebuilt the owner cold and checked normal errors, the exact root/fold cache endpoint, warm full-word rows and uncached uniform forwarding.

Ordinary consumers keep large support facts in the returned conjunction and project them inline.
This avoids Lean's constructor-name linter unfolding a concrete height-16 computation; the checks use default limits.

Bindings, Python/vector suites and unchanged checker self-tests were skipped because their sources and interfaces are unchanged.

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

alexanderlhicks and others added 2 commits November 6, 2026 10:42
Keep the actual normal reply linked to its OTS, path, full-root and top
signing cache endpoints. Use the settled-path law only for local root
reconstruction; whole-signer and cost transfer remain separate.

AI-assisted implementation by Codex.
The proof names the random oracle that leanXMSS and leanSPHINCS share,
and its map from an answer to 32 bytes, as the counted game now does.

The module header cites the leanXMSS specification draft and no
implementation. It says that the theorem gives intermediate results the
signer reaches, not that the reply determines them. Comments no longer
say "existing" or "original".

No statement changes beyond the oracle's names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tcoratger
tcoratger force-pushed the codex/xmss-vcv-signing-support branch from 15ff914 to d84cfac Compare November 6, 2026 09:43
@tcoratger
tcoratger force-pushed the codex/xmss-vcv-merkle-cache branch from e1292b0 to 88a2584 Compare November 6, 2026 09:43
@tcoratger

Copy link
Copy Markdown
Collaborator

@alexanderlhicks I rebased the stack with the most recent work to avoid you this boring job.

I saw that the stack was based on a VCVio commit that is not on main I think, so I said my agent to wait for those PRs to be "ready for review" before doing any further actions, I imagine the time that the commit on VCVio is merged on main and that we can merge here this PR stack on master branch.

@alexanderlhicks

alexanderlhicks commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Yeah I'm basically working through trying to streamline the proof to make it easier to handle and maintain. See also Verified-zkEVM/VCVio#1009 on the VCV side for context, as well as several other smaller VCV PRs which are in progress.

  • VCV PR 766 had my proofs for all standardized SLH-DSA parameters in the ROM
  • Emile PR'd his proof the 128s in 912. We reach the same security bounds, I've been trying to see if it's possible to get a better single proof using techniques from both.
  • For leanXMSS there are a few extra tricks not the SLH-DSA standard (e.g. grinding), which I am working through formalizing in VCV.
  • The result should be a nicer overall proof, with leanXMSS remaining specific to EthLib (at least for now) but with the ability to draw from a more fully featured set of abstractions in VCV that will make iteration easier if anything changes (cf also my proofs in VCV for SLH-DSA which work across all parameters for roughly the same or fewer lines of code than the single 128s proof).

These PRs can be saved as draft for now and left unmerged, I'm just opening them for visibility as the work progresses since I don't want to have a single PR at the end (the idea is exactly to have more reusable separate components).

@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