Skip to content

Commit fb758fe

Browse files
committed
Merge #1323: tweak_add: fix API doc for tweak=0
05873bb tweak_add: fix API doc for tweak=0 (Jonas Nick) Pull request description: ACKs for top commit: real-or-random: ACK 05873bb Tree-SHA512: ef587a680c3355c6328dd61e0f5fcac80ea995f6045b4392fe35f3ee1c04ee1bd941662c120758ad641588670c1f0f53bfb17a802821f54100f1385b8bb7375a
2 parents 7966aee + 05873bb commit fb758fe

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
@@ -734,10 +734,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate(
734734
* invalid according to secp256k1_ec_seckey_verify, this
735735
* function returns 0. seckey will be set to some unspecified
736736
* value if this function returns 0.
737-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according to
738-
* secp256k1_ec_seckey_verify, this function returns 0. For
739-
* uniformly random 32-byte arrays the chance of being invalid
740-
* is negligible (around 1 in 2^128).
737+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
738+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
739+
* random 32-byte tweaks, the chance of being invalid is
740+
* negligible (around 1 in 2^128).
741741
*/
742742
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add(
743743
const secp256k1_context *ctx,
@@ -762,10 +762,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
762762
* Args: ctx: pointer to a context object.
763763
* In/Out: pubkey: pointer to a public key object. pubkey will be set to an
764764
* invalid value if this function returns 0.
765-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according to
766-
* secp256k1_ec_seckey_verify, this function returns 0. For
767-
* uniformly random 32-byte arrays the chance of being invalid
768-
* is negligible (around 1 in 2^128).
765+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
766+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
767+
* random 32-byte tweaks, the chance of being invalid is
768+
* negligible (around 1 in 2^128).
769769
*/
770770
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
771771
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,
@@ -229,10 +229,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_pub(
229229
* Args: ctx: pointer to a context object.
230230
* In/Out: keypair: pointer to a keypair to apply the tweak to. Will be set to
231231
* an invalid value if this function returns 0.
232-
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid according
233-
* to secp256k1_ec_seckey_verify, this function returns 0. For
234-
* uniformly random 32-byte arrays the chance of being invalid
235-
* is negligible (around 1 in 2^128).
232+
* In: tweak32: pointer to a 32-byte tweak, which must be valid according to
233+
* secp256k1_ec_seckey_verify or 32 zero bytes. For uniformly
234+
* random 32-byte tweaks, the chance of being invalid is
235+
* negligible (around 1 in 2^128).
236236
*/
237237
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add(
238238
const secp256k1_context *ctx,

0 commit comments

Comments
 (0)