xmss: add cross test with ream signature#433
Merged
tcoratger merged 2 commits intoleanEthereum:mainfrom Mar 4, 2026
Merged
Conversation
MegaRedHand
pushed a commit
to lambdaclass/ethlambda
that referenced
this pull request
Mar 2, 2026
## Motivation Multi-client interoperability is critical for the lean consensus ecosystem. [leanSpec PR #433](leanEthereum/leanSpec#433) introduces cross-client XMSS compatibility tests that verify ream-produced signatures can be decoded and verified by leanSpec's Python implementation. This PR adds the equivalent tests to ethlambda, ensuring our Rust client can also verify ream-generated XMSS signatures. ## Description Adds 5 cross-client XMSS compatibility tests to `crates/common/crypto/src/lib.rs` using test vectors from ream (epoch 5, all-zeros message): | Test | What it verifies | |------|-----------------| | `test_cross_client_decode_ream_public_key` | 52-byte pubkey roundtrip (decode → encode) | | `test_cross_client_decode_ream_signature` | 3112-byte signature roundtrip (decode → encode) | | `test_cross_client_verify_ream_signature` | Signature verifies with correct epoch and message | | `test_cross_client_ream_signature_rejects_wrong_message` | Rejects verification with wrong message (`0xff...ff`) | | `test_cross_client_ream_signature_rejects_wrong_epoch` | Rejects verification with wrong epoch (6 instead of 5) | These tests only do deserialization + verification (no keygen, no aggregation), so they run fast (~50ms) and don't need `#[ignore]`. Also adds `hex` as a dev-dependency to `ethlambda-crypto` for decoding the test vectors. ## How to test ```bash cargo test -p ethlambda-crypto -- cross_client ``` ## Related - leanSpec cross-client tests: leanEthereum/leanSpec#433 --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
🗒️ Description
The test is generated in Ream using:
🔗 Related Issues or PRs
✅ Checklist
toxchecks to avoid unnecessary CI fails:uvx tox