@@ -447,7 +447,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
447447/** Verify an ECDSA signature.
448448 *
449449 * Returns: 1: correct signature
450- * 0: incorrect or unparseable signature
450+ * 0: incorrect signature
451451 * Args: ctx: a secp256k1 context object, initialized for verification.
452452 * In: sig: the signature being verified (cannot be NULL)
453453 * msg32: the 32-byte message hash being verified (cannot be NULL)
@@ -524,9 +524,14 @@ SECP256K1_API int secp256k1_ecdsa_signature_normalize(
524524SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_rfc6979 ;
525525
526526/** An implementation of the nonce generation function as defined in BIP-schnorr.
527+ *
527528 * If a data pointer is passed, it is assumed to be a pointer to 32 bytes of
528- * extra entropy. The attempt argument must be 0 or the function will fail and
529- * return 0.
529+ * extra entropy. If the data pointer is NULL and this function is used in
530+ * schnorrsig_sign, it produces BIP-schnorr compliant signatures.
531+ * When this function is used in ecdsa_sign, it generates a nonce using an
532+ * analogue of the bip-schnorr nonce generation algorithm, but with tag
533+ * "BIPSchnorrNULL" instead of "BIPSchnorrDerive".
534+ * The attempt argument must be 0 or the function will fail and return 0.
530535 */
531536SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_bipschnorr ;
532537
@@ -710,10 +715,8 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine(
710715
711716/** Opaque data structure that holds a parsed and valid "x-only" public key.
712717 * An x-only pubkey encodes a positive point. That is a point whose Y
713- * coordinate is a quadratic residue. It is serialized using only its X
714- * coordinate (32 bytes). A secp256k1_xonly_pubkey is also a secp256k1_pubkey
715- * but the inverse is not true. Therefore, a secp256k1_pubkey must never be
716- * interpreted as or copied into a secp256k1_xonly_pubkey.
718+ * coordinate is square. It is serialized using only its X coordinate (32
719+ * bytes).
717720 *
718721 * The exact representation of data inside is implementation defined and not
719722 * guaranteed to be portable between different platforms or versions. It is
@@ -758,10 +761,8 @@ SECP256K1_API int secp256k1_xonly_pubkey_serialize(
758761 const secp256k1_xonly_pubkey * pubkey
759762) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
760763
761- /** Compute the xonly public key for a secret key. Just as ec_pubkey_create this
762- * function computes the point P by multiplying the seckey (interpreted as a scalar)
763- * with the generator. The public key corresponds to P if the Y coordinate of P is a
764- * quadratic residue or -P otherwise.
764+ /** Compute the xonly public key for a secret key. Same as ec_pubkey_create, but
765+ * for xonly public keys.
765766 *
766767 * Returns: 1 if secret was valid, public key stores
767768 * 0 if secret was invalid, try again
0 commit comments