7 #ifndef _SECP256K1_SCHNORR_IMPL_H_ 8 #define _SECP256K1_SCHNORR_IMPL_H_ 65 unsigned char h32[32];
76 if (pubnonce != NULL) {
91 hash(h32, sig64, msg32);
111 unsigned char hh[32];
117 hash(hh, sig64, msg32);
149 unsigned char hh[32];
152 hash(hh, sig64, msg32);
184 for (i = 0; i <
n; i++) {
192 if (memcmp(sig64ins[i - 1], sig64ins[i], 32) != 0) {
201 memcpy(sig64, sig64ins[0], 32);
static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b)
static int secp256k1_ge_is_infinity(const secp256k1_ge *a)
static int secp256k1_gej_is_infinity(const secp256k1_gej *a)
static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *a)
static void secp256k1_fe_normalize_var(secp256k1_fe *r)
static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a)
static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a)
static int secp256k1_scalar_is_zero(const secp256k1_scalar *a)
static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng)
static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *bin, int *overflow)
static int secp256k1_fe_is_odd(const secp256k1_fe *a)
static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context *ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32)
static int secp256k1_schnorr_sig_combine(unsigned char *sig64, size_t n, const unsigned char *const *sig64ins)
#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0)
static secp256k1_context * ctx
static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a)
static void secp256k1_scalar_clear(secp256k1_scalar *r)
static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context *ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32)
static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar *a)
static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd)
static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a)
static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b)
static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b)
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *a)
void * memcpy(void *a, const void *b, size_t c)
static void secp256k1_fe_normalize(secp256k1_fe *r)
void(* secp256k1_schnorr_msghash)(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32)
static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a)
static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b)
static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a)
static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context *ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32)