93 unsigned char *nonce32,
94 const unsigned char *msg32,
95 const unsigned char *key32,
96 const unsigned char *algo16,
101 # if !defined(SECP256K1_GNUC_PREREQ) 102 # if defined(__GNUC__)&&defined(__GNUC_MINOR__) 103 # define SECP256K1_GNUC_PREREQ(_maj,_min) \ 104 ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) 106 # define SECP256K1_GNUC_PREREQ(_maj,_min) 0 110 # if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) 111 # if SECP256K1_GNUC_PREREQ(2,7) 112 # define SECP256K1_INLINE __inline__ 113 # elif (defined(_MSC_VER)) 114 # define SECP256K1_INLINE __inline 116 # define SECP256K1_INLINE 119 # define SECP256K1_INLINE inline 122 #ifndef SECP256K1_API 124 # ifdef SECP256K1_BUILD 125 # define SECP256K1_API __declspec(dllexport) 127 # define SECP256K1_API 129 # elif defined(__GNUC__) && defined(SECP256K1_BUILD) 130 # define SECP256K1_API __attribute__ ((visibility ("default"))) 132 # define SECP256K1_API 139 # if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) 140 # define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) 142 # define SECP256K1_WARN_UNUSED_RESULT 144 # if !defined(SECP256K1_BUILD) && defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) 145 # define SECP256K1_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) 147 # define SECP256K1_ARG_NONNULL(_x) 151 #define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1) 152 #define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0) 153 #define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1) 155 #define SECP256K1_FLAGS_BIT_CONTEXT_VERIFY (1 << 8) 156 #define SECP256K1_FLAGS_BIT_CONTEXT_SIGN (1 << 9) 157 #define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8) 160 #define SECP256K1_CONTEXT_VERIFY (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_VERIFY) 161 #define SECP256K1_CONTEXT_SIGN (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_SIGN) 162 #define SECP256K1_CONTEXT_NONE (SECP256K1_FLAGS_TYPE_CONTEXT) 165 #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION) 166 #define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION) 217 void (*fun)(const
char* message,
void*
data),
239 void (*fun)(const
char* message,
void*
data),
260 const
unsigned char *input,
281 unsigned char *output,
305 const
unsigned char *input64
326 const
unsigned char *input,
343 unsigned char *output,
359 unsigned char *output64,
384 const
unsigned char *msg32,
462 const
unsigned char *msg32,
463 const
unsigned char *seckey,
477 const
unsigned char *seckey
491 const
unsigned char *seckey
505 unsigned char *seckey,
506 const
unsigned char *tweak
522 const
unsigned char *tweak
534 unsigned char *seckey,
535 const
unsigned char *tweak
549 const
unsigned char *tweak
560 const
unsigned char *seed32
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul(const secp256k1_context *ctx, unsigned char *seckey, const unsigned char *tweak) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API void secp256k1_context_set_illegal_callback(secp256k1_context *ctx, void(*fun)(const char *message, void *data), const void *data) SECP256K1_ARG_NONNULL(1)
SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(const secp256k1_context *ctx, unsigned char *output64, const secp256k1_ecdsa_signature *sig) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
#define SECP256K1_WARN_UNUSED_RESULT
SECP256K1_API int secp256k1_ecdsa_signature_normalize(const secp256k1_context *ctx, secp256k1_ecdsa_signature *sigout, const secp256k1_ecdsa_signature *sigin) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3)
SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_default
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize(secp256k1_context *ctx, const unsigned char *seed32) SECP256K1_ARG_NONNULL(1)
SECP256K1_API int secp256k1_ec_pubkey_serialize(const secp256k1_context *ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey *pubkey, unsigned int flags) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(const secp256k1_context *ctx, unsigned char *seckey, const unsigned char *tweak) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_rfc6979
SECP256K1_API void secp256k1_context_destroy(secp256k1_context *ctx)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(const secp256k1_context *ctx, const unsigned char *seckey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2)
static secp256k1_context * ctx
SECP256K1_API int secp256k1_ecdsa_sign(const secp256k1_context *ctx, secp256k1_ecdsa_signature *sig, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void *ndata) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *input, size_t inputlen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API void secp256k1_context_set_error_callback(secp256k1_context *ctx, void(*fun)(const char *message, void *data), const void *data) SECP256K1_ARG_NONNULL(1)
SECP256K1_API int secp256k1_ecdsa_signature_parse_der(const secp256k1_context *ctx, secp256k1_ecdsa_signature *sig, const unsigned char *input, size_t inputlen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
#define SECP256K1_ARG_NONNULL(_x)
SECP256K1_API secp256k1_context * secp256k1_context_clone(const secp256k1_context *ctx) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT
SECP256K1_API int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context *ctx, unsigned char *output, size_t *outputlen, const secp256k1_ecdsa_signature *sig) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
int(* secp256k1_nonce_function)(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int attempt)
SECP256K1_API int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context *ctx, secp256k1_ecdsa_signature *sig, const unsigned char *input64) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine(const secp256k1_context *ctx, secp256k1_pubkey *out, const secp256k1_pubkey *const *ins, size_t n) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
SECP256K1_API secp256k1_context * secp256k1_context_create(unsigned int flags) SECP256K1_WARN_UNUSED_RESULT
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify(const secp256k1_context *ctx, const secp256k1_ecdsa_signature *sig, const unsigned char *msg32, const secp256k1_pubkey *pubkey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)