Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ecsda): return ecdsa signature with a normalized s value #2888

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mehcode
Copy link
Contributor

@mehcode mehcode commented Feb 22, 2025

An ECDSA message signature generated by the JS SDK does not verify in the Rust SDK.


When exploring signing a message with PrivateKey in the JS SDK and verifying it with the Rust SDK, I noticed that the JS SDK does not return a normalized s value in the ECDSA signature.

This is not a breaking change as the underlying elliptic library validates both normalized and non-normalized signatures but other SDKs only validate normalized signatures.

It is documented here - https://github.com/indutny/elliptic/wiki - that we need to use canonical: true to be Crypto-compatible.

Signed-off-by: Ryan Leckey <ryan@calaxy.com>
@mehcode mehcode requested a review from a team as a code owner February 22, 2025 03:27
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@0xivanov
Copy link
Contributor

Some of the unit tests are failing, can you check why?

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.

2 participants