Electroneum
Toggle main menu visibility
Loading...
Searching...
No Matches
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
15
41
typedef
int (*
secp256k1_nonce_function_hardened
)(
42
unsigned
char
*nonce32,
43
const
unsigned
char
*msg,
44
size_t
msglen,
45
const
unsigned
char
*key32,
46
const
unsigned
char
*xonly_pk32,
47
const
unsigned
char
*algo,
48
size_t
algolen,
49
void
*data
50
);
51
64
SECP256K1_API
extern
const
secp256k1_nonce_function_hardened
secp256k1_nonce_function_bip340
;
65
82
typedef
struct
{
83
unsigned
char
magic
[4];
84
secp256k1_nonce_function_hardened
noncefp
;
85
void
*
ndata
;
86
}
secp256k1_schnorrsig_extraparams
;
87
88
#define SECP256K1_SCHNORRSIG_EXTRAPARAMS_MAGIC { 0xda, 0x6f, 0xb3, 0x8c }
89
#define SECP256K1_SCHNORRSIG_EXTRAPARAMS_INIT {\
90
SECP256K1_SCHNORRSIG_EXTRAPARAMS_MAGIC,\
91
NULL,\
92
NULL\
93
}
94
119
SECP256K1_API
int
secp256k1_schnorrsig_sign32
(
120
const
secp256k1_context
* ctx,
121
unsigned
char
*sig64,
122
const
unsigned
char
*msg32,
123
const
secp256k1_keypair
*
keypair
,
124
const
unsigned
char
*aux_rand32
125
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_ARG_NONNULL
(3)
SECP256K1_ARG_NONNULL
(4);
126
129
SECP256K1_API
int
secp256k1_schnorrsig_sign
(
130
const
secp256k1_context
* ctx,
131
unsigned
char
*sig64,
132
const
unsigned
char
*msg32,
133
const
secp256k1_keypair
*
keypair
,
134
const
unsigned
char
*aux_rand32
135
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_ARG_NONNULL
(3)
SECP256K1_ARG_NONNULL
(4)
136
SECP256K1_DEPRECATED
(
"Use secp256k1_schnorrsig_sign32 instead"
);
137
151
SECP256K1_API
int
secp256k1_schnorrsig_sign_custom
(
152
const
secp256k1_context
* ctx,
153
unsigned
char
*sig64,
154
const
unsigned
char
*msg,
155
size_t
msglen,
156
const
secp256k1_keypair
*
keypair
,
157
secp256k1_schnorrsig_extraparams
*extraparams
158
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_ARG_NONNULL
(5);
159
170
SECP256K1_API
SECP256K1_WARN_UNUSED_RESULT
int
secp256k1_schnorrsig_verify
(
171
const
secp256k1_context
* ctx,
172
const
unsigned
char
*sig64,
173
const
unsigned
char
*msg,
174
size_t
msglen,
175
const
secp256k1_xonly_pubkey
*pubkey
176
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_ARG_NONNULL
(5);
177
178
#ifdef __cplusplus
179
}
180
#endif
181
182
#endif
/* SECP256K1_SCHNORRSIG_H */
keypair
std::vector< std::string > keypair
Definition
delegated_pow.cpp:7
secp256k1.h
SECP256K1_ARG_NONNULL
#define SECP256K1_ARG_NONNULL(_x)
Definition
secp256k1.h:177
secp256k1_context
struct secp256k1_context_struct secp256k1_context
Definition
secp256k1.h:50
SECP256K1_API
#define SECP256K1_API
Definition
secp256k1.h:162
SECP256K1_DEPRECATED
#define SECP256K1_DEPRECATED(_msg)
Definition
secp256k1.h:188
SECP256K1_WARN_UNUSED_RESULT
#define SECP256K1_WARN_UNUSED_RESULT
Definition
secp256k1.h:172
secp256k1_extrakeys.h
secp256k1_nonce_function_hardened
int(* secp256k1_nonce_function_hardened)(unsigned char *nonce32, const unsigned char *msg, size_t msglen, const unsigned char *key32, const unsigned char *xonly_pk32, const unsigned char *algo, size_t algolen, void *data)
Definition
secp256k1_schnorrsig.h:41
secp256k1_schnorrsig_sign32
SECP256K1_API int secp256k1_schnorrsig_sign32(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_keypair *keypair, const unsigned char *aux_rand32) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Definition
main_impl.h:195
secp256k1_schnorrsig_sign
SECP256K1_API int secp256k1_schnorrsig_sign(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_keypair *keypair, const unsigned char *aux_rand32) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_DEPRECATED("Use secp256k1_schnorrsig_sign32 instead")
Definition
main_impl.h:200
secp256k1_nonce_function_bip340
SECP256K1_API const secp256k1_nonce_function_hardened secp256k1_nonce_function_bip340
Definition
main_impl.h:99
secp256k1_schnorrsig_sign_custom
SECP256K1_API int secp256k1_schnorrsig_sign_custom(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg, size_t msglen, const secp256k1_keypair *keypair, secp256k1_schnorrsig_extraparams *extraparams) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(5)
Definition
main_impl.h:204
secp256k1_schnorrsig_verify
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorrsig_verify(const secp256k1_context *ctx, const unsigned char *sig64, const unsigned char *msg, size_t msglen, const secp256k1_xonly_pubkey *pubkey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(5)
Definition
main_impl.h:219
secp256k1_keypair
Definition
secp256k1_extrakeys.h:33
secp256k1_schnorrsig_extraparams
Definition
secp256k1_schnorrsig.h:82
secp256k1_schnorrsig_extraparams::noncefp
secp256k1_nonce_function_hardened noncefp
Definition
secp256k1_schnorrsig.h:84
secp256k1_schnorrsig_extraparams::ndata
void * ndata
Definition
secp256k1_schnorrsig.h:85
secp256k1_schnorrsig_extraparams::magic
unsigned char magic[4]
Definition
secp256k1_schnorrsig.h:83
secp256k1_xonly_pubkey
Definition
secp256k1_extrakeys.h:22
external
secp256k1
include
secp256k1_schnorrsig.h
Generated on
for Electroneum by
1.17.0