Skip to content

ed25519: add Wycheproof verification tests - #84

Open
DicksonWu654 wants to merge 1 commit into
StableLib:masterfrom
DicksonWu654:wycheproof-tests
Open

DicksonWu654 wants to merge 1 commit into
StableLib:masterfrom
DicksonWu654:wycheproof-tests

Conversation

@DicksonWu654

Copy link
Copy Markdown

This adds the Wycheproof Ed25519 vectors (C2SP/wycheproof at 65ca494) to packages/ed25519 as Vitest cases. All 210 run: 117 valid, 64 invalid, and the 29 acceptable ones only need to return a boolean. Nothing is skipped and they all pass.

Each case goes straight through verify() with the raw public key, message and signature. verify() throws on wrong-length keys and signatures, so the test treats those two specific errors as a reject and rethrows anything else.

The JSON is checked in under packages/ed25519/test-vectors/ with Wycheproof's Apache-2.0 LICENSE and a README noting the source commit.

Testing: npm run build and npm test pass and it adds about 5s across the source and compiled runs

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.

1 participant