Skip to content

Commit 05873bb

Browse files
committed
tweak_add: fix API doc for tweak=0
1 parent d373a72 commit 05873bb

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

include/secp256k1.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate(
733733
* invalid according to secp256k1_ec_seckey_verify, this
734734
* function returns 0. seckey will be set to some unspecified
735735
* value if this function returns 0.
736-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according to
737-
* secp256k1_ec_seckey_verify, this function returns 0. For
738-
* uniformly random 32-byte arrays the chance of being invalid
739-
* is negligible (around 1 in 2^128).
736+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
737+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
738+
* random 32-byte tweaks, the chance of being invalid is
739+
* negligible (around 1 in 2^128).
740740
*/
741741
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add(
742742
const secp256k1_context *ctx,
@@ -761,10 +761,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
761761
* Args: ctx: pointer to a context object.
762762
* In/Out: pubkey: pointer to a public key object. pubkey will be set to an
763763
* invalid value if this function returns 0.
764-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according to
765-
* secp256k1_ec_seckey_verify, this function returns 0. For
766-
* uniformly random 32-byte arrays the chance of being invalid
767-
* is negligible (around 1 in 2^128).
764+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
765+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
766+
* random 32-byte tweaks, the chance of being invalid is
767+
* negligible (around 1 in 2^128).
768768
*/
769769
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
770770
const secp256k1_context *ctx,

include/secp256k1_extrakeys.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_from_pubke
112112
* Out: output_pubkey: pointer to a public key to store the result. Will be set
113113
* to an invalid value if this function returns 0.
114114
* In: internal_pubkey: pointer to an x-only pubkey to apply the tweak to.
115-
* tweak32: pointer to a 32-byte tweak. If the tweak is invalid
116-
* according to secp256k1_ec_seckey_verify, this function
117-
* returns 0. For uniformly random 32-byte arrays the
118-
* chance of being invalid is negligible (around 1 in 2^128).
115+
* tweak32: pointer to a 32-byte tweak, which must be valid
116+
* according to secp256k1_ec_seckey_verify or 32 zero
117+
* bytes. For uniformly random 32-byte tweaks, the chance of
118+
* being invalid is negligible (around 1 in 2^128).
119119
*/
120120
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add(
121121
const secp256k1_context *ctx,
@@ -231,10 +231,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_pub(
231231
* Args: ctx: pointer to a context object.
232232
* In/Out: keypair: pointer to a keypair to apply the tweak to. Will be set to
233233
* an invalid value if this function returns 0.
234-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according
235-
* to secp256k1_ec_seckey_verify, this function returns 0. For
236-
* uniformly random 32-byte arrays the chance of being invalid
237-
* is negligible (around 1 in 2^128).
234+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
235+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
236+
* random 32-byte tweaks, the chance of being invalid is
237+
* negligible (around 1 in 2^128).
238238
*/
239239
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add(
240240
const secp256k1_context *ctx,

0 commit comments

Comments
 (0)