Closed cheeseandcereal closed 4 years ago
@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
@stevenroose any word about getting this merged, or point me to some other place to submit this change since the repository may have moved?
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.
No worries steven!
Submitted and merged upstream https://github.com/bcgit/pc-dart/pull/10
Thanks guys
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