Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
tests_impl.h File Reference
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_internal (void)
static void test_schnorrsig_ctx_sha256 (void)
static void test_schnorrsig_sign_verify_internal (void)
static void test_schnorrsig_taproot (void)

Variables

static const struct tf_test_entry tests_schnorrsig []

Macro Definition Documentation

◆ N_SIGS

#define N_SIGS   3

Definition at line 875 of file tests_impl.h.

Function Documentation

◆ nonce_function_0()

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 782 of file tests_impl.h.

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

◆ nonce_function_bip340_bitflip()

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 16 of file tests_impl.h.

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

◆ nonce_function_failing()

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 769 of file tests_impl.h.

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

◆ nonce_function_overflowing()

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 796 of file tests_impl.h.

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

◆ run_nonce_function_bip340_tests()

void run_nonce_function_bip340_tests ( void )
static

Definition at line 24 of file tests_impl.h.

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

◆ test_schnorrsig_api()

void test_schnorrsig_api ( void )
static

main test body

Definition at line 109 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()

void test_schnorrsig_bip_vectors ( void )
static

Definition at line 210 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()

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 176 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()

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 201 of file tests_impl.h.

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

◆ test_schnorrsig_ctx_sha256()

void test_schnorrsig_ctx_sha256 ( void )
static

Definition at line 853 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()

void test_schnorrsig_sha256_tagged ( void )
static

Definition at line 163 of file tests_impl.h.

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

◆ test_schnorrsig_sign_internal()

void test_schnorrsig_sign_internal ( void )
static

Definition at line 809 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_internal()

void test_schnorrsig_sign_verify_internal ( void )
static

Definition at line 879 of file tests_impl.h.

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

◆ test_schnorrsig_taproot()

void test_schnorrsig_taproot ( void )
static

Definition at line 956 of file tests_impl.h.

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

Variable Documentation

◆ tests_schnorrsig

const struct tf_test_entry tests_schnorrsig[]
static
Initial value:
= {
CASE(nonce_function_bip340_tests),
CASE1(test_schnorrsig_sign),
CASE1(test_schnorrsig_sign_verify),
}
static void test_schnorrsig_api(void)
Definition tests_impl.h:109
static void test_schnorrsig_taproot(void)
Definition tests_impl.h:956
static void test_schnorrsig_bip_vectors(void)
Definition tests_impl.h:210
static void test_schnorrsig_ctx_sha256(void)
Definition tests_impl.h:853
static void test_schnorrsig_sha256_tagged(void)
Definition tests_impl.h:163
#define CASE1(name)
Definition unit_test.h:27
#define CASE(name)
Definition unit_test.h:26

Definition at line 996 of file tests_impl.h.