readme: Clarify ecdsa recovery

This commit is contained in:
Paul Miller 2023-10-05 04:46:31 +00:00
parent 2da6abb336
commit e7720c1609
No known key found for this signature in database
GPG Key ID: 697079DA6878B89B

@ -91,7 +91,8 @@ const pub2 = secp256k1.getPublicKey(privHex);
#### ECDSA public key recovery & extra entropy #### ECDSA public key recovery & extra entropy
```ts ```ts
// const sig = secp256k1.Signature.fromCompact(sigHex); // or .fromDER(sigDERHex) // let sig = secp256k1.Signature.fromCompact(sigHex); // or .fromDER(sigDERHex)
// sig = sig.addRecoveryBit(bit); // bit is not serialized into compact / der format
sig.recoverPublicKey(msg).toRawBytes(); // === pub; // public key recovery sig.recoverPublicKey(msg).toRawBytes(); // === pub; // public key recovery
// extraEntropy https://moderncrypto.org/mail-archive/curves/2017/000925.html // extraEntropy https://moderncrypto.org/mail-archive/curves/2017/000925.html