6#ifndef SECP256K1_MODULE_ECDH_TESTS_EXHAUSTIVE_H
7#define SECP256K1_MODULE_ECDH_TESTS_EXHAUSTIVE_H
9#include "../../../include/secp256k1_ecdh.h"
28 unsigned char ecdh_result_ij[32];
29 unsigned char ecdh_result_ji[32];
41 unsigned char ecdh_result_expected[32];
static void test_exhaustive_ecdh(const secp256k1_context *ctx, const secp256k1_ge *group)
#define secp256k1_fe_normalize_var
#define secp256k1_fe_get_b32
#define CHECK(cond)
Unconditional failure on condition failure.
static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v)
Set a scalar to an unsigned integer.
static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar *a)
Convert a scalar to a byte array.
static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2, size_t n)
Semantics like memcmp.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(const secp256k1_context *ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
Compute the public key for a secret key.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh(const secp256k1_context *ctx, unsigned char *output, const secp256k1_pubkey *pubkey, const unsigned char *seckey, secp256k1_ecdh_hash_function hashfp, void *data) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Compute an EC Diffie-Hellman secret in constant time.
SECP256K1_API const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_function_default
A default ECDH hash function (currently equal to secp256k1_ecdh_hash_function_sha256).
A group element in affine coordinates on the secp256k1 curve, or occasionally on an isomorphic curve ...
Opaque data structure that holds a parsed and valid public key.
A scalar modulo the group order of the secp256k1 curve.
#define EXHAUSTIVE_TEST_ORDER