Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Go to the source code of this file.
Functions | |
int | ecdh_hash_function_test_fail (unsigned char *output, const unsigned char *x, const unsigned char *y, void *data) |
int | ecdh_hash_function_custom (unsigned char *output, const unsigned char *x, const unsigned char *y, void *data) |
void | test_ecdh_api (void) |
void | test_ecdh_generator_basepoint (void) |
void | test_bad_scalar (void) |
void | run_ecdh_tests (void) |
Function Documentation
◆ ecdh_hash_function_custom()
int ecdh_hash_function_custom | ( | unsigned char * | output, |
const unsigned char * | x, | ||
const unsigned char * | y, | ||
void * | data | ||
) |
Definition at line 18 of file tests_impl.h.
References memcpy().
Referenced by test_ecdh_generator_basepoint().
◆ ecdh_hash_function_test_fail()
int ecdh_hash_function_test_fail | ( | unsigned char * | output, |
const unsigned char * | x, | ||
const unsigned char * | y, | ||
void * | data | ||
) |
Definition at line 10 of file tests_impl.h.
Referenced by test_bad_scalar().
◆ run_ecdh_tests()
void run_ecdh_tests | ( | void | ) |
Definition at line 126 of file tests_impl.h.
References test_bad_scalar(), test_ecdh_api(), and test_ecdh_generator_basepoint().
Referenced by main().
◆ test_bad_scalar()
void test_bad_scalar | ( | void | ) |
Definition at line 97 of file tests_impl.h.
References CHECK, ctx, ecdh_hash_function_test_fail(), random_scalar_order(), secp256k1_ec_pubkey_create(), secp256k1_ecdh(), and secp256k1_scalar_get_b32().
Referenced by run_ecdh_tests().
◆ test_ecdh_api()
void test_ecdh_api | ( | void | ) |
Definition at line 27 of file tests_impl.h.
References CHECK, counting_illegal_callback_fn(), secp256k1_context_create(), secp256k1_context_destroy(), secp256k1_context_set_error_callback(), secp256k1_context_set_illegal_callback(), SECP256K1_CONTEXT_SIGN, secp256k1_ec_pubkey_create(), and secp256k1_ecdh().
Referenced by run_ecdh_tests().
◆ test_ecdh_generator_basepoint()
void test_ecdh_generator_basepoint | ( | void | ) |
Definition at line 56 of file tests_impl.h.
References CHECK, ctx, ecdh_hash_function_custom(), random_scalar_order(), SECP256K1_EC_COMPRESSED, secp256k1_ec_pubkey_create(), secp256k1_ec_pubkey_serialize(), SECP256K1_EC_UNCOMPRESSED, secp256k1_ecdh(), secp256k1_scalar_get_b32(), secp256k1_sha256_finalize(), secp256k1_sha256_initialize(), and secp256k1_sha256_write().
Referenced by run_ecdh_tests().