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 wrong v value on ethereum signature #7

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

josher8a
Copy link
Contributor

@josher8a josher8a commented Sep 4, 2024

This pull request fixes the issue #6 with the calculation of the v value in the ethereum signature. The current implementation is returning v = 1 instead of v = 0, which is causing the end of the signature to be different. The fix involves updating the calculation of v to use a bitwise XOR operation with 1 when s is greater than half of the curve's order.

The pull request also includes a test case to ensure that the fix is working correctly.

@c0mm4nd c0mm4nd merged commit 345da0b into c0mm4nd:master Sep 5, 2024
@c0mm4nd
Copy link
Owner

c0mm4nd commented Sep 5, 2024

@josher8a Thank you and your great team. I have already merged the PR and published a new version on pub.dev https://pub.dev/packages/ecdsa/versions/0.1.1

@josher8a
Copy link
Contributor Author

josher8a commented Sep 5, 2024

Thank you, sir 🫡

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