Closed nodech closed 5 years ago
Hmm, I was considering just having sign
return the recovery param by default, but that would be a breaking API change and I don't feel like finding every sign call we ever made and changing it.
It'd be really nice to expose this for all the EC backends. I think I could merge this and then work on the other backends.
Adds two new api calls
signRecoverable
andsignRecoverableDER
.It only adds these methods to
secp256k1
. Even thoughelliptic.js
can returns recovery for all curves, bcrypto_ecdsa is based on OpenSSL.Because bcrypto/secp256k1 is using different implementation that supports recovery, decided to expose these methods only for
lib/secp256k1
.Addresses: https://github.com/bcoin-org/bcrypto/issues/4