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

Negative R,S value checking #250

Merged
merged 2 commits into from Jul 30, 2014
Merged

Negative R,S value checking #250

merged 2 commits into from Jul 30, 2014

Conversation

dcousens
Copy link
Contributor

This pull request enforces positive r and s values across all the ECDSA functions that interact with a signature.
This bug is a regression introduced by bd1a08b, and thanks to cryptbe on HackerNews for pointing this issue out.

The error checking previously had been written with the assumption that r and s were always positive, which is a valid assumption in an internal use case, but may be a problem if anyone is blindly accepting ECSignatures from outside their application.

I also added further tests for recoverPubKey in terms of the exceptions it throws.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 5657dcf on dcousens:negrs into 05237f4 on bitcoinjs:master.

weilu added a commit that referenced this pull request Jul 30, 2014
Negative R,S value checking
@weilu weilu merged commit c73ab8c into bitcoinjs:master Jul 30, 2014
@dcousens dcousens deleted the negrs branch July 30, 2014 03:47
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.

None yet

3 participants