Skip to content

proof(xmss): relate full words to shared byte conversions - #839

Closed
alexanderlhicks wants to merge 2 commits into
codex/xmss-layer-callbacksfrom
codex/xmss-vcv-bytes
Closed

alexanderlhicks wants to merge 2 commits into
codex/xmss-layer-callbacksfrom
codex/xmss-vcv-bytes

Conversation

@alexanderlhicks

Copy link
Copy Markdown
Contributor

The XMSS proof gains a word-to-bytes equivalence built from EthLib's shared little-endian conversions.
Both inverse laws hold at every byte length, including zero.

Stacked on #785.

The problem

A random-oracle model must retain all 256 bits of each hash reply before the signer selects a 16-byte half.
The shared byte conversions already implement the required encoding.
Reduction proofs need an equivalence that connects these conversions to VCVio's sampler transport.

The idea

wordBytesEquiv n pairs the existing conversions and proves that they are inverse.
uniform_wordBytes applies VCVio's existing equivalence transport theorem.
Its conclusion concerns the transported sampler and states the required measurable-space and singleton hypotheses explicitly.

Example

At byte length zero, the unique zero-width word maps to the empty vector and back.
At byte length 32, the equivalence retains the full 256-bit word.
Two words with the same low 128 bits and different high 128 bits therefore remain distinct byte vectors.

For reviewers

The new declarations live in Unforgeability.VCV, alongside the existing proof namespace.
The implementation reuses the shared conversions without importing the existing security proof.
The sampler theorem supplies no new global sampler instance.
This bridge adds no unforgeability bound.

Checks

Validation uses parent 711d8478 over master 59d8233e, with VCVio pinned to bbf05eee.
A later source audit found no XMSS, toolchain or Lake changes through master 8c6c1944.
The full build below tests 59d8233e with the stacked additions.

  • Full lake build --wfail: passed, 6,016 jobs.
  • Whole lake exe check-decls: passed, 53,254 declarations and zero findings or baseline entries.
  • Scoped declaration and axiom audits: no findings or nonstandard axioms.
  • Initialization audit: 43 constants and zero initialization work or hazards.
  • All 16 linters on all four declarations, style, layout, layer rules, soundness and release-manifest checks: passed.
  • Independent ordinary consumers for both inverse laws, length zero, full-word injectivity and agreement with the existing output conversion: passed.

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.

alexanderlhicks and others added 2 commits November 6, 2026 10:38
…lemmas

The shared byte module already has the map from a bit vector to its
little-endian bytes, and both inverse laws. The bijection of 8n-bit
vectors with n-byte vectors is now built there from those lemmas. So the
fact is proved once, for leanXMSS and leanSPHINCS alike.

The XMSS copy and its sampler theorem are removed. The sampler theorem
only applied a VCVio lemma, and no proof used it.

No existing statement changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tcoratger
tcoratger force-pushed the codex/xmss-layer-callbacks branch from 711d847 to bc5fde2 Compare November 6, 2026 09:43
@tcoratger
tcoratger force-pushed the codex/xmss-vcv-bytes branch from a9e5863 to 3504039 Compare November 6, 2026 09:43
@github-actions github-actions Bot added type: proof New or changed theorems, with no change to the library code crypto Cryptography: EthLib/Cryptography proofs Theorems under a Proofs directory 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 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