Skip to content

Ed25519 consensus critical test vectors - #112

Merged
davxy merged 5 commits into
mainfrom
ed25519-consensus
Jan 8, 2026
Merged

davxy merged 5 commits into
mainfrom
ed25519-consensus

Conversation

@davxy

@davxy davxy commented Nov 10, 2025 •

Copy link
Copy Markdown
Member

Ed25519 signature verification must be consistent across all implementations to maintain consensus. Different libraries have varying levels of strictness in validation.
These test vectors validate ZIP-215 compliance, which defines the specific validation rules that JAM implementations must follow.

Most ed25519 libraries are NOT ZIP-215 compliant. If your implementation fails these tests, the underlying library likely needs updating or replacement. The fix is typically straightforward but must be done within the library itself, not by preprocessing inputs.

As ed25519 is all over the place, teams are encouraged to run these vectors against their implementation

Identified ZIP-215 compliant libs:

@jaymansfield

Copy link
Copy Markdown
Contributor

JavaJAM was using a cryptographic library called bouncycastle which rejects all of the public keys in these vectors as invalid. Due to that I was unable to try validating any of the signatures using it but I'm assuming that already means it's not ZIP-215 compliant.

So for now I've now switched to use rust's ed25519-zebra (starting in v0.3.10 of JavaJAM) until I can find a pure java solution.

@davxy

davxy commented Nov 11, 2025

Copy link
Copy Markdown
Member Author

@jaymansfield can you share a code snip of how you load/use the pk in bouncycastle?

@jaymansfield

Copy link
Copy Markdown
Contributor

@jaymansfield can you share a code snip of how you load/use the pk in bouncycastle?

I think the library is just very strict and may have additional security checks and validations added according to my research.

@0xjunha

0xjunha commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

FastRoll was using ed25519-dalek and failed these cases, and now passes with ed25519-consensus, exactly as the test suite shows

@burdges

burdges commented Dec 9, 2025

Copy link
Copy Markdown

Just in case anyone wants background: https://hdevalence.ca/blog/2020-10-04-its-25519am/

It's obvious all nodes much use the same validation criteria. These test vectors make batch verification work. That's important on-chain, less important off-chain, but maybe important for bridges, RPC protocols, etc. If for example some future bridge or RPC protocol batches together many validator signatures, then it could make batches that appear valid but containe signatures that are valid according to this criteria, but appear invalid to other ed25519 libraries.

@danicuki

danicuki commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

@jamixir fixed its implementation to use a valid signature library (Elixir default :crypto library is not compliant)

@ggwpez

ggwpez commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

We are using the Zebra lib now and pass all tests.

@mikirov

mikirov commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

PBNJ uses noble/curveswhich passes these tests

@davxy
davxy merged commit 5bbd426 into main Jan 8, 2026
@davxy
davxy deleted the ed25519-consensus branch January 8, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants