Bitcoin Core 28.99.0
P2P Digital Currency
Macros | Functions
tests_impl.h File Reference
#include "../../../include/secp256k1_schnorrsig.h"
Include dependency graph for tests_impl.h:

Go to the source code of this file.

Macros

#define N_SIGS   3
 

Functions

static void nonce_function_bip340_bitflip (unsigned char **args, size_t n_flip, size_t n_bytes, size_t msglen, size_t algolen)
 
static void run_nonce_function_bip340_tests (void)
 
static void test_schnorrsig_api (void)
 
static void test_schnorrsig_sha256_tagged (void)
 
static void test_schnorrsig_bip_vectors_check_signing (const unsigned char *sk, const unsigned char *pk_serialized, const unsigned char *aux_rand, const unsigned char *msg, size_t msglen, const unsigned char *expected_sig)
 
static void test_schnorrsig_bip_vectors_check_verify (const unsigned char *pk_serialized, const unsigned char *msg, size_t msglen, const unsigned char *sig, int expected)
 
static void test_schnorrsig_bip_vectors (void)
 
static int nonce_function_failing (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)
 
static int nonce_function_0 (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)
 
static int nonce_function_overflowing (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)
 
static void test_schnorrsig_sign (void)
 
static void test_schnorrsig_sign_verify (void)
 
static void test_schnorrsig_taproot (void)
 
static void run_schnorrsig_tests (void)
 

Macro Definition Documentation

◆ N_SIGS

#define N_SIGS   3

Definition at line 851 of file tests_impl.h.

Function Documentation

◆ nonce_function_0()

static int nonce_function_0 ( 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 
)
static

Definition at line 778 of file tests_impl.h.

Here is the caller graph for this function:

◆ nonce_function_bip340_bitflip()

static void nonce_function_bip340_bitflip ( unsigned char **  args,
size_t  n_flip,
size_t  n_bytes,
size_t  msglen,
size_t  algolen 
)
static

Definition at line 15 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nonce_function_failing()

static int nonce_function_failing ( 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 
)
static

Definition at line 765 of file tests_impl.h.

Here is the caller graph for this function:

◆ nonce_function_overflowing()

static int nonce_function_overflowing ( 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 
)
static

Definition at line 792 of file tests_impl.h.

Here is the caller graph for this function:

◆ run_nonce_function_bip340_tests()

static void run_nonce_function_bip340_tests ( void  )
static

Definition at line 23 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_schnorrsig_tests()

static void run_schnorrsig_tests ( void  )
static

Definition at line 968 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_api()

static void test_schnorrsig_api ( void  )
static

main test body

Definition at line 106 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_bip_vectors()

static void test_schnorrsig_bip_vectors ( void  )
static

Definition at line 206 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_bip_vectors_check_signing()

static void test_schnorrsig_bip_vectors_check_signing ( const unsigned char *  sk,
const unsigned char *  pk_serialized,
const unsigned char *  aux_rand,
const unsigned char *  msg,
size_t  msglen,
const unsigned char *  expected_sig 
)
static

Definition at line 172 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_bip_vectors_check_verify()

static void test_schnorrsig_bip_vectors_check_verify ( const unsigned char *  pk_serialized,
const unsigned char *  msg,
size_t  msglen,
const unsigned char *  sig,
int  expected 
)
static

Definition at line 197 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_sha256_tagged()

static void test_schnorrsig_sha256_tagged ( void  )
static

Definition at line 160 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_sign()

static void test_schnorrsig_sign ( void  )
static

Definition at line 805 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_sign_verify()

static void test_schnorrsig_sign_verify ( void  )
static

Definition at line 855 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_schnorrsig_taproot()

static void test_schnorrsig_taproot ( void  )
static

Definition at line 932 of file tests_impl.h.

Here is the call graph for this function:
Here is the caller graph for this function: