File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,17 @@ SECP256K1_API int secp256k1_ecdsa_sign_recoverable(
92
92
93
93
/** Recover an ECDSA public key from a signature.
94
94
*
95
- * Returns: 1: public key successfully recovered (which guarantees a correct signature).
95
+ * Successful public key recovery guarantees that the signature, after normalization,
96
+ * passes `secp256k1_ecdsa_verify`. Thus, explicit verification is not necessary.
97
+ *
98
+ * However, a recoverable signature that successfully passes `secp256k1_ecdsa_recover`,
99
+ * when converted to a non-recoverable signature (using
100
+ * `secp256k1_ecdsa_recoverable_signature_convert`), is not guaranteed to be
101
+ * normalized and thus not guaranteed to pass `secp256k1_ecdsa_verify`. If a
102
+ * normalized signature is required, call `secp256k1_ecdsa_signature_normalize`
103
+ * after `secp256k1_ecdsa_recoverable_signature_convert`.
104
+ *
105
+ * Returns: 1: public key successfully recovered
96
106
* 0: otherwise.
97
107
* Args: ctx: pointer to a context object.
98
108
* Out: pubkey: pointer to the recovered public key.
You can’t perform that action at this time.
0 commit comments