From e7720c1609b497044093c65d2c19c02acda216d7 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Thu, 5 Oct 2023 04:46:31 +0000 Subject: [PATCH] readme: Clarify ecdsa recovery --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4070210..7316714 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,8 @@ const pub2 = secp256k1.getPublicKey(privHex); #### ECDSA public key recovery & extra entropy ```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 // extraEntropy https://moderncrypto.org/mail-archive/curves/2017/000925.html