Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

add normalize option for ecdsa signatures #217

Closed

Conversation

cheeseandcereal
Copy link

Fixes #215

Adds option to normalize ecdsa signatures to their lower-s form, required by some ecdsa libraries in an effort to prevent signature malleability

See this comment in libsecp256k1 for more information: https://github.com/bitcoin-core/secp256k1/blob/d644dda5c9dbdecee52d1aa259235510fdc2d4ee/include/secp256k1.h#L483-L513

@cheeseandcereal
Copy link
Author

cheeseandcereal commented Dec 20, 2019

@stevenroose This is my first pass according to what we talked about in #215

I imlpemented the normalize function on ECSignature which requires the ECDomainParameters, as well as an optional named boolean parameter normalize on the generateSignature signer function as well

Also included tests to show the functionality working

@cheeseandcereal
Copy link
Author

@stevenroose any word about getting this merged, or point me to some other place to submit this change since the repository may have moved?

@AKushWarrior
Copy link

@stevenroose
Copy link
Member

Yeah I would suggest to direct your PR to the bouncy castle project repo. They have taken over this project and are in charge of merging new features.

I'm sorry I can't be of help, I don't have time anymore to maintain this project, which is why I left it to the Bouncy Castle team.

@cheeseandcereal
Copy link
Author

cheeseandcereal commented May 25, 2020

No worries steven!

Submitted and merged upstream bcgit/pc-dart#10

Thanks guys

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support lower-s form conversion for ECDSA signatures
3 participants