Bitcoin Core 31.0.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 SECP256K1_ECDH_WYCHEPROOF_NUMBER_TESTVECTORS   (503)

Functions

static int ecdh_hash_function_test_xpassthru (unsigned char *output, const unsigned char *x, const unsigned char *y, void *data)
static int ecdh_hash_function_test_fail (unsigned char *output, const unsigned char *x, const unsigned char *y, void *data)
static int ecdh_hash_function_custom (unsigned char *output, const unsigned char *x, const unsigned char *y, void *data)
static void test_ecdh_api (void)
static void test_ecdh_generator_basepoint (void)
static void test_bad_scalar (void)
static void test_result_basepoint (void)
 Test that ECDH(sG, 1/s) == ECDH((1/s)G, s) == ECDH(G, 1) for a few random s.
static void test_ecdh_wycheproof (void)

Variables

static const struct tf_test_entry tests_ecdh []

Macro Definition Documentation

◆ SECP256K1_ECDH_WYCHEPROOF_NUMBER_TESTVECTORS

#define SECP256K1_ECDH_WYCHEPROOF_NUMBER_TESTVECTORS   (503)

Function Documentation

◆ ecdh_hash_function_custom()

int ecdh_hash_function_custom ( unsigned char * output,
const unsigned char * x,
const unsigned char * y,
void * data )
static

Definition at line 27 of file tests_impl.h.

Here is the caller graph for this function:

◆ ecdh_hash_function_test_fail()

int ecdh_hash_function_test_fail ( unsigned char * output,
const unsigned char * x,
const unsigned char * y,
void * data )
static

Definition at line 19 of file tests_impl.h.

Here is the caller graph for this function:

◆ ecdh_hash_function_test_xpassthru()

int ecdh_hash_function_test_xpassthru ( unsigned char * output,
const unsigned char * x,
const unsigned char * y,
void * data )
static

Definition at line 12 of file tests_impl.h.

Here is the caller graph for this function:

◆ test_bad_scalar()

void test_bad_scalar ( void )
static

Definition at line 93 of file tests_impl.h.

Here is the call graph for this function:

◆ test_ecdh_api()

void test_ecdh_api ( void )
static

Definition at line 36 of file tests_impl.h.

Here is the call graph for this function:

◆ test_ecdh_generator_basepoint()

void test_ecdh_generator_basepoint ( void )
static

Definition at line 52 of file tests_impl.h.

Here is the call graph for this function:

◆ test_ecdh_wycheproof()

void test_ecdh_wycheproof ( void )
static

Definition at line 150 of file tests_impl.h.

Here is the call graph for this function:

◆ test_result_basepoint()

void test_result_basepoint ( void )
static

Test that ECDH(sG, 1/s) == ECDH((1/s)G, s) == ECDH(G, 1) for a few random s.

Definition at line 119 of file tests_impl.h.

Here is the call graph for this function:

Variable Documentation

◆ tests_ecdh

const struct tf_test_entry tests_ecdh[]
static
Initial value:
= {
}
static void test_ecdh_api(void)
Definition tests_impl.h:36
static void test_bad_scalar(void)
Definition tests_impl.h:93
static void test_result_basepoint(void)
Test that ECDH(sG, 1/s) == ECDH((1/s)G, s) == ECDH(G, 1) for a few random s.
Definition tests_impl.h:119
static void test_ecdh_generator_basepoint(void)
Definition tests_impl.h:52
static void test_ecdh_wycheproof(void)
Definition tests_impl.h:150
#define CASE1(name)
Definition unit_test.h:25

Definition at line 184 of file tests_impl.h.