Skip to content

Commit df3bfa1

Browse files
committed
schnorrsig: clarify result of calling nonce_function_bip340 without data
1 parent 99e8614 commit df3bfa1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/secp256k1_schnorrsig.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ typedef int (*secp256k1_nonce_function_hardened)(
5050
*
5151
* If a data pointer is passed, it is assumed to be a pointer to 32 bytes of
5252
* auxiliary random data as defined in BIP-340. If the data pointer is NULL,
53-
* schnorrsig_sign does not produce BIP-340 compliant signatures. The algo16
54-
* argument must be non-NULL, otherwise the function will fail and return 0.
55-
* The hash will be tagged with algo16 after removing all terminating null
56-
* bytes. Therefore, to create BIP-340 compliant signatures, algo16 must be set
57-
* to "BIP0340/nonce\0\0\0"
53+
* the nonce derivation procedure follows BIP-340 by setting the auxiliary
54+
* random data to zero. The algo16 argument must be non-NULL, otherwise the
55+
* function will fail and return 0. The hash will be tagged with algo16 after
56+
* removing all terminating null bytes. Therefore, to create BIP-340 compliant
57+
* signatures, algo16 must be set to "BIP0340/nonce\0\0\0"
5858
*/
5959
SECP256K1_API extern const secp256k1_nonce_function_hardened secp256k1_nonce_function_bip340;
6060

0 commit comments

Comments
 (0)