Bitcoin Core  0.20.99
P2P Digital Currency
secp256k1_schnorrsig.h
Go to the documentation of this file.
1 #ifndef SECP256K1_SCHNORRSIG_H
2 #define SECP256K1_SCHNORRSIG_H
3 
4 #include "secp256k1.h"
5 #include "secp256k1_extrakeys.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
39  unsigned char *nonce32,
40  const unsigned char *msg32,
41  const unsigned char *key32,
42  const unsigned char *xonly_pk32,
43  const unsigned char *algo16,
44  void *data
45 );
46 
60 
83  const secp256k1_context* ctx,
84  unsigned char *sig64,
85  const unsigned char *msg32,
86  const secp256k1_keypair *keypair,
88  void *ndata
90 
101  const secp256k1_context* ctx,
102  const unsigned char *sig64,
103  const unsigned char *msg32,
104  const secp256k1_xonly_pubkey *pubkey
105 ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* SECP256K1_SCHNORRSIG_H */
#define SECP256K1_WARN_UNUSED_RESULT
Warning attributes NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out...
Definition: secp256k1.h:150
SECP256K1_API const secp256k1_nonce_function_hardened secp256k1_nonce_function_bip340
An implementation of the nonce generation function as defined in Bitcoin Improvement Proposal 340 "Sc...
Definition: main_impl.h:94
int(* secp256k1_nonce_function_hardened)(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *xonly_pk32, const unsigned char *algo16, void *data)
This module implements a variant of Schnorr signatures compliant with Bitcoin Improvement Proposal 34...
Opaque data structure that holds a parsed and valid "x-only" public key.
static secp256k1_context * ctx
Definition: tests.c:36
Opaque data structure that holds a keypair consisting of a secret and a public key.
#define SECP256K1_ARG_NONNULL(_x)
Definition: secp256k1.h:155
SECP256K1_API int secp256k1_schnorrsig_sign(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_keypair *keypair, secp256k1_nonce_function_hardened noncefp, void *ndata) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Create a Schnorr signature.
Definition: main_impl.h:127
#define SECP256K1_API
Definition: secp256k1.h:140
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_verify(const secp256k1_context *ctx, const unsigned char *sig64, const unsigned char *msg32, const secp256k1_xonly_pubkey *pubkey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Verify a Schnorr signature.
Definition: main_impl.h:190