Skip to content

Commit f03df0e

Browse files
committed
Define valid ECDSA keys in the documentation of seckey_verify
1 parent 5894e1f commit f03df0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/secp256k1.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ SECP256K1_API int secp256k1_ecdsa_sign(
552552
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
553553

554554
/** Verify an ECDSA secret key.
555+
*
556+
* A secret key is valid if it is not 0 and less than the secp256k1 curve order
557+
* when interpreted as an integer (most significant byte first). The
558+
* probability of choosing a 32-byte string uniformly at random which is an
559+
* invalid secret key is negligible.
555560
*
556561
* Returns: 1: secret key is valid
557562
* 0: secret key is invalid

0 commit comments

Comments
 (0)