Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent

3d1f430f9f32d45885b0a10b448c0f15386c423d Make position of * in pointer declarations in include/ consistent (Jonas Nick)

Pull request description:

ACKs for top commit:
  sipa:
    utACK 3d1f430f9f32d45885b0a10b448c0f15386c423d. I have not verified these are the only instances where changes would need to be made.
  apoelstra:
    utACK 3d1f430 from me too. I also value consistency more than either specific choice.'
  real-or-random:
    utACK 3d1f430f9f

Tree-SHA512: 6361880f4a47e58c83623f094dd121882752fa805e275033cd638d1e8d3477ade9037e5d9e34a57ae46013848648bd7ab764cad326133f2d3435c9a70a0c841b
This commit is contained in:
Tim Ruffing 2023-04-08 09:38:45 +02:00
commit a0f4644f7e
No known key found for this signature in database
GPG Key ID: 8C461CCD293F6011
6 changed files with 86 additions and 86 deletions

View File

@ -288,7 +288,7 @@ SECP256K1_API void secp256k1_selftest(void);
* Do not create a new context object for each operation, as construction and * Do not create a new context object for each operation, as construction and
* randomization can take non-negligible time. * randomization can take non-negligible time.
*/ */
SECP256K1_API secp256k1_context* secp256k1_context_create( SECP256K1_API secp256k1_context *secp256k1_context_create(
unsigned int flags unsigned int flags
) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_WARN_UNUSED_RESULT;
@ -304,8 +304,8 @@ SECP256K1_API secp256k1_context* secp256k1_context_create(
* Returns: a newly created context object. * Returns: a newly created context object.
* Args: ctx: an existing context to copy (not secp256k1_context_static) * Args: ctx: an existing context to copy (not secp256k1_context_static)
*/ */
SECP256K1_API secp256k1_context* secp256k1_context_clone( SECP256K1_API secp256k1_context *secp256k1_context_clone(
const secp256k1_context* ctx const secp256k1_context *ctx
) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
/** Destroy a secp256k1 context object (created in dynamically allocated memory). /** Destroy a secp256k1 context object (created in dynamically allocated memory).
@ -323,7 +323,7 @@ SECP256K1_API secp256k1_context* secp256k1_context_clone(
* (i.e., not secp256k1_context_static). * (i.e., not secp256k1_context_static).
*/ */
SECP256K1_API void secp256k1_context_destroy( SECP256K1_API void secp256k1_context_destroy(
secp256k1_context* ctx secp256k1_context *ctx
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
/** Set a callback function to be called when an illegal argument is passed to /** Set a callback function to be called when an illegal argument is passed to
@ -347,8 +347,8 @@ SECP256K1_API void secp256k1_context_destroy(
* USE_EXTERNAL_DEFAULT_CALLBACKS is defined, which is the case if the build * USE_EXTERNAL_DEFAULT_CALLBACKS is defined, which is the case if the build
* has been configured with --enable-external-default-callbacks. Then the * has been configured with --enable-external-default-callbacks. Then the
* following two symbols must be provided to link against: * following two symbols must be provided to link against:
* - void secp256k1_default_illegal_callback_fn(const char* message, void* data); * - void secp256k1_default_illegal_callback_fn(const char *message, void *data);
* - void secp256k1_default_error_callback_fn(const char* message, void* data); * - void secp256k1_default_error_callback_fn(const char *message, void *data);
* The library can call these default handlers even before a proper callback data * The library can call these default handlers even before a proper callback data
* pointer could have been set using secp256k1_context_set_illegal_callback or * pointer could have been set using secp256k1_context_set_illegal_callback or
* secp256k1_context_set_error_callback, e.g., when the creation of a context * secp256k1_context_set_error_callback, e.g., when the creation of a context
@ -364,9 +364,9 @@ SECP256K1_API void secp256k1_context_destroy(
* See also secp256k1_context_set_error_callback. * See also secp256k1_context_set_error_callback.
*/ */
SECP256K1_API void secp256k1_context_set_illegal_callback( SECP256K1_API void secp256k1_context_set_illegal_callback(
secp256k1_context* ctx, secp256k1_context *ctx,
void (*fun)(const char* message, void* data), void (*fun)(const char *message, void *data),
const void* data const void *data
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
/** Set a callback function to be called when an internal consistency check /** Set a callback function to be called when an internal consistency check
@ -392,9 +392,9 @@ SECP256K1_API void secp256k1_context_set_illegal_callback(
* See also secp256k1_context_set_illegal_callback. * See also secp256k1_context_set_illegal_callback.
*/ */
SECP256K1_API void secp256k1_context_set_error_callback( SECP256K1_API void secp256k1_context_set_error_callback(
secp256k1_context* ctx, secp256k1_context *ctx,
void (*fun)(const char* message, void* data), void (*fun)(const char *message, void *data),
const void* data const void *data
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
/** Create a secp256k1 scratch space object. /** Create a secp256k1 scratch space object.
@ -404,8 +404,8 @@ SECP256K1_API void secp256k1_context_set_error_callback(
* In: size: amount of memory to be available as scratch space. Some extra * In: size: amount of memory to be available as scratch space. Some extra
* (<100 bytes) will be allocated for extra accounting. * (<100 bytes) will be allocated for extra accounting.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space *secp256k1_scratch_space_create(
const secp256k1_context* ctx, const secp256k1_context *ctx,
size_t size size_t size
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
@ -416,8 +416,8 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_sc
* scratch: space to destroy * scratch: space to destroy
*/ */
SECP256K1_API void secp256k1_scratch_space_destroy( SECP256K1_API void secp256k1_scratch_space_destroy(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_scratch_space* scratch secp256k1_scratch_space *scratch
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
/** Parse a variable-length public key into the pubkey object. /** Parse a variable-length public key into the pubkey object.
@ -435,8 +435,8 @@ SECP256K1_API void secp256k1_scratch_space_destroy(
* byte 0x06 or 0x07) format public keys. * byte 0x06 or 0x07) format public keys.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey* pubkey, secp256k1_pubkey *pubkey,
const unsigned char *input, const unsigned char *input,
size_t inputlen size_t inputlen
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -457,10 +457,10 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(
* compressed format, otherwise SECP256K1_EC_UNCOMPRESSED. * compressed format, otherwise SECP256K1_EC_UNCOMPRESSED.
*/ */
SECP256K1_API int secp256k1_ec_pubkey_serialize( SECP256K1_API int secp256k1_ec_pubkey_serialize(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output, unsigned char *output,
size_t *outputlen, size_t *outputlen,
const secp256k1_pubkey* pubkey, const secp256k1_pubkey *pubkey,
unsigned int flags unsigned int flags
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
@ -474,9 +474,9 @@ SECP256K1_API int secp256k1_ec_pubkey_serialize(
* pubkey2: second public key to compare * pubkey2: second public key to compare
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_cmp( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_cmp(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const secp256k1_pubkey* pubkey1, const secp256k1_pubkey *pubkey1,
const secp256k1_pubkey* pubkey2 const secp256k1_pubkey *pubkey2
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
/** Parse an ECDSA signature in compact (64 bytes) format. /** Parse an ECDSA signature in compact (64 bytes) format.
@ -495,8 +495,8 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_cmp(
* any message and public key. * any message and public key.
*/ */
SECP256K1_API int secp256k1_ecdsa_signature_parse_compact( SECP256K1_API int secp256k1_ecdsa_signature_parse_compact(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_signature* sig, secp256k1_ecdsa_signature *sig,
const unsigned char *input64 const unsigned char *input64
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -516,8 +516,8 @@ SECP256K1_API int secp256k1_ecdsa_signature_parse_compact(
* guaranteed to fail for every message and public key. * guaranteed to fail for every message and public key.
*/ */
SECP256K1_API int secp256k1_ecdsa_signature_parse_der( SECP256K1_API int secp256k1_ecdsa_signature_parse_der(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_signature* sig, secp256k1_ecdsa_signature *sig,
const unsigned char *input, const unsigned char *input,
size_t inputlen size_t inputlen
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -534,10 +534,10 @@ SECP256K1_API int secp256k1_ecdsa_signature_parse_der(
* In: sig: a pointer to an initialized signature object * In: sig: a pointer to an initialized signature object
*/ */
SECP256K1_API int secp256k1_ecdsa_signature_serialize_der( SECP256K1_API int secp256k1_ecdsa_signature_serialize_der(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output, unsigned char *output,
size_t *outputlen, size_t *outputlen,
const secp256k1_ecdsa_signature* sig const secp256k1_ecdsa_signature *sig
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
/** Serialize an ECDSA signature in compact (64 byte) format. /** Serialize an ECDSA signature in compact (64 byte) format.
@ -550,9 +550,9 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_der(
* See secp256k1_ecdsa_signature_parse_compact for details about the encoding. * See secp256k1_ecdsa_signature_parse_compact for details about the encoding.
*/ */
SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact( SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output64, unsigned char *output64,
const secp256k1_ecdsa_signature* sig const secp256k1_ecdsa_signature *sig
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
/** Verify an ECDSA signature. /** Verify an ECDSA signature.
@ -581,7 +581,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
* For details, see the comments for that function. * For details, see the comments for that function.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const secp256k1_ecdsa_signature *sig, const secp256k1_ecdsa_signature *sig,
const unsigned char *msghash32, const unsigned char *msghash32,
const secp256k1_pubkey *pubkey const secp256k1_pubkey *pubkey
@ -629,7 +629,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify(
* secp256k1_ecdsa_signature_normalize must be called before verification. * secp256k1_ecdsa_signature_normalize must be called before verification.
*/ */
SECP256K1_API int secp256k1_ecdsa_signature_normalize( SECP256K1_API int secp256k1_ecdsa_signature_normalize(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_signature *sigout, secp256k1_ecdsa_signature *sigout,
const secp256k1_ecdsa_signature *sigin const secp256k1_ecdsa_signature *sigin
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3);
@ -662,7 +662,7 @@ SECP256K1_API_VAR const secp256k1_nonce_function secp256k1_nonce_function_defaul
* secp256k1_ecdsa_signature_normalize for more details. * secp256k1_ecdsa_signature_normalize for more details.
*/ */
SECP256K1_API int secp256k1_ecdsa_sign( SECP256K1_API int secp256k1_ecdsa_sign(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_signature *sig, secp256k1_ecdsa_signature *sig,
const unsigned char *msghash32, const unsigned char *msghash32,
const unsigned char *seckey, const unsigned char *seckey,
@ -683,7 +683,7 @@ SECP256K1_API int secp256k1_ecdsa_sign(
* In: seckey: pointer to a 32-byte secret key. * In: seckey: pointer to a 32-byte secret key.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const unsigned char *seckey const unsigned char *seckey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
@ -696,7 +696,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(
* In: seckey: pointer to a 32-byte secret key. * In: seckey: pointer to a 32-byte secret key.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey, secp256k1_pubkey *pubkey,
const unsigned char *seckey const unsigned char *seckey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -712,14 +712,14 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(
* seckey will be set to some unspecified value. * seckey will be set to some unspecified value.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_negate( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_negate(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey unsigned char *seckey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
/** Same as secp256k1_ec_seckey_negate, but DEPRECATED. Will be removed in /** Same as secp256k1_ec_seckey_negate, but DEPRECATED. Will be removed in
* future versions. */ * future versions. */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_negate( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_negate(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey unsigned char *seckey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2)
SECP256K1_DEPRECATED("Use secp256k1_ec_seckey_negate instead"); SECP256K1_DEPRECATED("Use secp256k1_ec_seckey_negate instead");
@ -731,7 +731,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_negate(
* In/Out: pubkey: pointer to the public key to be negated. * In/Out: pubkey: pointer to the public key to be negated.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey secp256k1_pubkey *pubkey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
@ -751,7 +751,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_negate(
* is negligible (around 1 in 2^128). * is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey, unsigned char *seckey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -759,7 +759,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_add(
/** Same as secp256k1_ec_seckey_tweak_add, but DEPRECATED. Will be removed in /** Same as secp256k1_ec_seckey_tweak_add, but DEPRECATED. Will be removed in
* future versions. */ * future versions. */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey, unsigned char *seckey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
@ -779,7 +779,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
* is negligible (around 1 in 2^128). * is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey, secp256k1_pubkey *pubkey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -798,7 +798,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
* is negligible (around 1 in 2^128). * is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_mul( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_mul(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey, unsigned char *seckey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -806,7 +806,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_tweak_mul(
/** Same as secp256k1_ec_seckey_tweak_mul, but DEPRECATED. Will be removed in /** Same as secp256k1_ec_seckey_tweak_mul, but DEPRECATED. Will be removed in
* future versions. */ * future versions. */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey, unsigned char *seckey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
@ -824,7 +824,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul(
* is negligible (around 1 in 2^128). * is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey, secp256k1_pubkey *pubkey,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -862,7 +862,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul(
* enhanced protection against side-channel leakage currently. * enhanced protection against side-channel leakage currently.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize(
secp256k1_context* ctx, secp256k1_context *ctx,
const unsigned char *seed32 const unsigned char *seed32
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
@ -876,9 +876,9 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize(
* n: the number of public keys to add together (must be at least 1). * n: the number of public keys to add together (must be at least 1).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *out, secp256k1_pubkey *out,
const secp256k1_pubkey * const * ins, const secp256k1_pubkey * const *ins,
size_t n size_t n
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -899,7 +899,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine(
* msglen: length of the message array * msglen: length of the message array
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_tagged_sha256( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_tagged_sha256(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *hash32, unsigned char *hash32,
const unsigned char *tag, const unsigned char *tag,
size_t taglen, size_t taglen,

View File

@ -48,7 +48,7 @@ SECP256K1_API_VAR const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_functio
* (can be NULL for secp256k1_ecdh_hash_function_sha256). * (can be NULL for secp256k1_ecdh_hash_function_sha256).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output, unsigned char *output,
const secp256k1_pubkey *pubkey, const secp256k1_pubkey *pubkey,
const unsigned char *seckey, const unsigned char *seckey,

View File

@ -45,8 +45,8 @@ typedef struct {
* In: input32: pointer to a serialized xonly_pubkey. * In: input32: pointer to a serialized xonly_pubkey.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_parse( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_parse(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_xonly_pubkey* pubkey, secp256k1_xonly_pubkey *pubkey,
const unsigned char *input32 const unsigned char *input32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -59,9 +59,9 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_parse(
* In: pubkey: a pointer to a secp256k1_xonly_pubkey containing an initialized public key. * In: pubkey: a pointer to a secp256k1_xonly_pubkey containing an initialized public key.
*/ */
SECP256K1_API int secp256k1_xonly_pubkey_serialize( SECP256K1_API int secp256k1_xonly_pubkey_serialize(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output32, unsigned char *output32,
const secp256k1_xonly_pubkey* pubkey const secp256k1_xonly_pubkey *pubkey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
/** Compare two x-only public keys using lexicographic order /** Compare two x-only public keys using lexicographic order
@ -74,9 +74,9 @@ SECP256K1_API int secp256k1_xonly_pubkey_serialize(
* pubkey2: second public key to compare * pubkey2: second public key to compare
*/ */
SECP256K1_API int secp256k1_xonly_pubkey_cmp( SECP256K1_API int secp256k1_xonly_pubkey_cmp(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const secp256k1_xonly_pubkey* pk1, const secp256k1_xonly_pubkey *pk1,
const secp256k1_xonly_pubkey* pk2 const secp256k1_xonly_pubkey *pk2
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
/** Converts a secp256k1_pubkey into a secp256k1_xonly_pubkey. /** Converts a secp256k1_pubkey into a secp256k1_xonly_pubkey.
@ -91,7 +91,7 @@ SECP256K1_API int secp256k1_xonly_pubkey_cmp(
* In: pubkey: pointer to a public key that is converted. * In: pubkey: pointer to a public key that is converted.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_from_pubkey( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_from_pubkey(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_xonly_pubkey *xonly_pubkey, secp256k1_xonly_pubkey *xonly_pubkey,
int *pk_parity, int *pk_parity,
const secp256k1_pubkey *pubkey const secp256k1_pubkey *pubkey
@ -118,7 +118,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_from_pubke
* chance of being invalid is negligible (around 1 in 2^128). * chance of being invalid is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *output_pubkey, secp256k1_pubkey *output_pubkey,
const secp256k1_xonly_pubkey *internal_pubkey, const secp256k1_xonly_pubkey *internal_pubkey,
const unsigned char *tweak32 const unsigned char *tweak32
@ -148,7 +148,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add(
* tweak32: pointer to a 32-byte tweak. * tweak32: pointer to a 32-byte tweak.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add_check( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add_check(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const unsigned char *tweaked_pubkey32, const unsigned char *tweaked_pubkey32,
int tweaked_pk_parity, int tweaked_pk_parity,
const secp256k1_xonly_pubkey *internal_pubkey, const secp256k1_xonly_pubkey *internal_pubkey,
@ -164,7 +164,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_xonly_pubkey_tweak_add_
* In: seckey: pointer to a 32-byte secret key. * In: seckey: pointer to a 32-byte secret key.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_create( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_create(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_keypair *keypair, secp256k1_keypair *keypair,
const unsigned char *seckey const unsigned char *seckey
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -177,7 +177,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_create(
* In: keypair: pointer to a keypair. * In: keypair: pointer to a keypair.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_sec( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_sec(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *seckey, unsigned char *seckey,
const secp256k1_keypair *keypair const secp256k1_keypair *keypair
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -191,7 +191,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_sec(
* In: keypair: pointer to a keypair. * In: keypair: pointer to a keypair.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_pub( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_pub(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey, secp256k1_pubkey *pubkey,
const secp256k1_keypair *keypair const secp256k1_keypair *keypair
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -211,7 +211,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_pub(
* In: keypair: pointer to a keypair. * In: keypair: pointer to a keypair.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_pub( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_pub(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_xonly_pubkey *pubkey, secp256k1_xonly_pubkey *pubkey,
int *pk_parity, int *pk_parity,
const secp256k1_keypair *keypair const secp256k1_keypair *keypair
@ -237,7 +237,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_pub(
* is negligible (around 1 in 2^128). * is negligible (around 1 in 2^128).
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_xonly_tweak_add(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_keypair *keypair, secp256k1_keypair *keypair,
const unsigned char *tweak32 const unsigned char *tweak32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);

View File

@ -63,8 +63,8 @@ SECP256K1_API size_t secp256k1_context_preallocated_size(
* See also secp256k1_context_randomize (in secp256k1.h) * See also secp256k1_context_randomize (in secp256k1.h)
* and secp256k1_context_preallocated_destroy. * and secp256k1_context_preallocated_destroy.
*/ */
SECP256K1_API secp256k1_context* secp256k1_context_preallocated_create( SECP256K1_API secp256k1_context *secp256k1_context_preallocated_create(
void* prealloc, void *prealloc,
unsigned int flags unsigned int flags
) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
@ -75,7 +75,7 @@ SECP256K1_API secp256k1_context* secp256k1_context_preallocated_create(
* In: ctx: an existing context to copy. * In: ctx: an existing context to copy.
*/ */
SECP256K1_API size_t secp256k1_context_preallocated_clone_size( SECP256K1_API size_t secp256k1_context_preallocated_clone_size(
const secp256k1_context* ctx const secp256k1_context *ctx
) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
/** Copy a secp256k1 context object into caller-provided memory. /** Copy a secp256k1 context object into caller-provided memory.
@ -97,9 +97,9 @@ SECP256K1_API size_t secp256k1_context_preallocated_clone_size(
* size at least secp256k1_context_preallocated_size(flags) * size at least secp256k1_context_preallocated_size(flags)
* bytes, as detailed above. * bytes, as detailed above.
*/ */
SECP256K1_API secp256k1_context* secp256k1_context_preallocated_clone( SECP256K1_API secp256k1_context *secp256k1_context_preallocated_clone(
const secp256k1_context* ctx, const secp256k1_context *ctx,
void* prealloc void *prealloc
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_WARN_UNUSED_RESULT; ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_WARN_UNUSED_RESULT;
/** Destroy a secp256k1 context object that has been created in /** Destroy a secp256k1 context object that has been created in
@ -124,7 +124,7 @@ SECP256K1_API secp256k1_context* secp256k1_context_preallocated_clone(
* (i.e., not secp256k1_context_static). * (i.e., not secp256k1_context_static).
*/ */
SECP256K1_API void secp256k1_context_preallocated_destroy( SECP256K1_API void secp256k1_context_preallocated_destroy(
secp256k1_context* ctx secp256k1_context *ctx
) SECP256K1_ARG_NONNULL(1); ) SECP256K1_ARG_NONNULL(1);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -34,8 +34,8 @@ typedef struct {
* recid: the recovery id (0, 1, 2 or 3) * recid: the recovery id (0, 1, 2 or 3)
*/ */
SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact( SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_recoverable_signature* sig, secp256k1_ecdsa_recoverable_signature *sig,
const unsigned char *input64, const unsigned char *input64,
int recid int recid
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
@ -48,9 +48,9 @@ SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact(
* In: sigin: a pointer to a recoverable signature. * In: sigin: a pointer to a recoverable signature.
*/ */
SECP256K1_API int secp256k1_ecdsa_recoverable_signature_convert( SECP256K1_API int secp256k1_ecdsa_recoverable_signature_convert(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_signature* sig, secp256k1_ecdsa_signature *sig,
const secp256k1_ecdsa_recoverable_signature* sigin const secp256k1_ecdsa_recoverable_signature *sigin
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
/** Serialize an ECDSA signature in compact format (64 bytes + recovery id). /** Serialize an ECDSA signature in compact format (64 bytes + recovery id).
@ -62,10 +62,10 @@ SECP256K1_API int secp256k1_ecdsa_recoverable_signature_convert(
* In: sig: a pointer to an initialized signature object. * In: sig: a pointer to an initialized signature object.
*/ */
SECP256K1_API int secp256k1_ecdsa_recoverable_signature_serialize_compact( SECP256K1_API int secp256k1_ecdsa_recoverable_signature_serialize_compact(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *output64, unsigned char *output64,
int *recid, int *recid,
const secp256k1_ecdsa_recoverable_signature* sig const secp256k1_ecdsa_recoverable_signature *sig
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
/** Create a recoverable ECDSA signature. /** Create a recoverable ECDSA signature.
@ -82,7 +82,7 @@ SECP256K1_API int secp256k1_ecdsa_recoverable_signature_serialize_compact(
* (can be NULL for secp256k1_nonce_function_default). * (can be NULL for secp256k1_nonce_function_default).
*/ */
SECP256K1_API int secp256k1_ecdsa_sign_recoverable( SECP256K1_API int secp256k1_ecdsa_sign_recoverable(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_ecdsa_recoverable_signature *sig, secp256k1_ecdsa_recoverable_signature *sig,
const unsigned char *msghash32, const unsigned char *msghash32,
const unsigned char *seckey, const unsigned char *seckey,
@ -100,7 +100,7 @@ SECP256K1_API int secp256k1_ecdsa_sign_recoverable(
* msghash32: the 32-byte message hash assumed to be signed. * msghash32: the 32-byte message hash assumed to be signed.
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover(
const secp256k1_context* ctx, const secp256k1_context *ctx,
secp256k1_pubkey *pubkey, secp256k1_pubkey *pubkey,
const secp256k1_ecdsa_recoverable_signature *sig, const secp256k1_ecdsa_recoverable_signature *sig,
const unsigned char *msghash32 const unsigned char *msghash32

View File

@ -82,7 +82,7 @@ SECP256K1_API_VAR const secp256k1_nonce_function_hardened secp256k1_nonce_functi
typedef struct { typedef struct {
unsigned char magic[4]; unsigned char magic[4];
secp256k1_nonce_function_hardened noncefp; secp256k1_nonce_function_hardened noncefp;
void* ndata; void *ndata;
} secp256k1_schnorrsig_extraparams; } secp256k1_schnorrsig_extraparams;
#define SECP256K1_SCHNORRSIG_EXTRAPARAMS_MAGIC { 0xda, 0x6f, 0xb3, 0x8c } #define SECP256K1_SCHNORRSIG_EXTRAPARAMS_MAGIC { 0xda, 0x6f, 0xb3, 0x8c }
@ -117,7 +117,7 @@ typedef struct {
* argument and for guidance if randomness is expensive. * argument and for guidance if randomness is expensive.
*/ */
SECP256K1_API int secp256k1_schnorrsig_sign32( SECP256K1_API int secp256k1_schnorrsig_sign32(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *sig64, unsigned char *sig64,
const unsigned char *msg32, const unsigned char *msg32,
const secp256k1_keypair *keypair, const secp256k1_keypair *keypair,
@ -127,7 +127,7 @@ SECP256K1_API int secp256k1_schnorrsig_sign32(
/** Same as secp256k1_schnorrsig_sign32, but DEPRECATED. Will be removed in /** Same as secp256k1_schnorrsig_sign32, but DEPRECATED. Will be removed in
* future versions. */ * future versions. */
SECP256K1_API int secp256k1_schnorrsig_sign( SECP256K1_API int secp256k1_schnorrsig_sign(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *sig64, unsigned char *sig64,
const unsigned char *msg32, const unsigned char *msg32,
const secp256k1_keypair *keypair, const secp256k1_keypair *keypair,
@ -149,7 +149,7 @@ SECP256K1_API int secp256k1_schnorrsig_sign(
* extraparams: pointer to a extraparams object (can be NULL) * extraparams: pointer to a extraparams object (can be NULL)
*/ */
SECP256K1_API int secp256k1_schnorrsig_sign_custom( SECP256K1_API int secp256k1_schnorrsig_sign_custom(
const secp256k1_context* ctx, const secp256k1_context *ctx,
unsigned char *sig64, unsigned char *sig64,
const unsigned char *msg, const unsigned char *msg,
size_t msglen, size_t msglen,
@ -168,7 +168,7 @@ SECP256K1_API int secp256k1_schnorrsig_sign_custom(
* pubkey: pointer to an x-only public key to verify with (cannot be NULL) * pubkey: pointer to an x-only public key to verify with (cannot be NULL)
*/ */
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_verify( SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_verify(
const secp256k1_context* ctx, const secp256k1_context *ctx,
const unsigned char *sig64, const unsigned char *sig64,
const unsigned char *msg, const unsigned char *msg,
size_t msglen, size_t msglen,