Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
tests_exhaustive.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "secp256k1.c"
#include "../include/secp256k1.h"
#include "assumptions.h"
#include "group.h"
#include "testrand_impl.h"
#include "ecmult_compute_table_impl.h"
#include "ecmult_gen_compute_table_impl.h"
#include "testutil.h"
#include "util.h"
Include dependency graph for tests_exhaustive.c:

Go to the source code of this file.

Classes

struct  ecmult_multi_data

Macros

#define EXHAUSTIVE_TEST_ORDER   13
#define EXHAUSTIVE_TEST_CURVE_HAS_EVEN_ORDER   (SECP256K1_B == 1 || SECP256K1_B == 6 || SECP256K1_B == 8)

Functions

static SECP256K1_INLINE int skip_section (uint64_t *iter)
static int secp256k1_nonce_function_smallint (unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int attempt)
static void test_exhaustive_endomorphism (const secp256k1_ge *group)
static void test_exhaustive_addition (const secp256k1_ge *group, const secp256k1_gej *groupj)
static void test_exhaustive_ecmult (const secp256k1_ge *group, const secp256k1_gej *groupj)
static int ecmult_multi_callback (secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *cbdata)
static void test_exhaustive_ecmult_multi (const secp256k1_context *ctx, const secp256k1_ge *group)
static void r_from_k (secp256k1_scalar *r, const secp256k1_ge *group, int k, int *overflow)
static void test_exhaustive_verify (const secp256k1_context *ctx, const secp256k1_ge *group)
static void test_exhaustive_sign (const secp256k1_context *ctx, const secp256k1_ge *group)
int main (int argc, char **argv)

Variables

static int count = 2
static uint32_t num_cores = 1
static uint32_t this_core = 0

Macro Definition Documentation

◆ EXHAUSTIVE_TEST_CURVE_HAS_EVEN_ORDER

#define EXHAUSTIVE_TEST_CURVE_HAS_EVEN_ORDER   (SECP256K1_B == 1 || SECP256K1_B == 6 || SECP256K1_B == 8)

Definition at line 17 of file tests_exhaustive.c.

◆ EXHAUSTIVE_TEST_ORDER

#define EXHAUSTIVE_TEST_ORDER   13

Definition at line 13 of file tests_exhaustive.c.

Function Documentation

◆ ecmult_multi_callback()

int ecmult_multi_callback ( secp256k1_scalar * sc,
secp256k1_ge * pt,
size_t idx,
void * cbdata )
static

Definition at line 191 of file tests_exhaustive.c.

◆ main()

int main ( int argc,
char ** argv )

Definition at line 356 of file tests_exhaustive.c.

Here is the call graph for this function:

◆ r_from_k()

void r_from_k ( secp256k1_scalar * r,
const secp256k1_ge * group,
int k,
int * overflow )
static

Definition at line 228 of file tests_exhaustive.c.

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

◆ secp256k1_nonce_function_smallint()

int secp256k1_nonce_function_smallint ( unsigned char * nonce32,
const unsigned char * msg32,
const unsigned char * key32,
const unsigned char * algo16,
void * data,
unsigned int attempt )
static

Definition at line 45 of file tests_exhaustive.c.

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

◆ skip_section()

SECP256K1_INLINE int skip_section ( uint64_t * iter)
static

Definition at line 39 of file tests_exhaustive.c.

Here is the caller graph for this function:

◆ test_exhaustive_addition()

void test_exhaustive_addition ( const secp256k1_ge * group,
const secp256k1_gej * groupj )
static

Definition at line 74 of file tests_exhaustive.c.

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

◆ test_exhaustive_ecmult()

void test_exhaustive_ecmult ( const secp256k1_ge * group,
const secp256k1_gej * groupj )
static

Definition at line 136 of file tests_exhaustive.c.

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

◆ test_exhaustive_ecmult_multi()

void test_exhaustive_ecmult_multi ( const secp256k1_context * ctx,
const secp256k1_ge * group )
static

Definition at line 198 of file tests_exhaustive.c.

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

◆ test_exhaustive_endomorphism()

void test_exhaustive_endomorphism ( const secp256k1_ge * group)
static

Definition at line 65 of file tests_exhaustive.c.

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

◆ test_exhaustive_sign()

void test_exhaustive_sign ( const secp256k1_context * ctx,
const secp256k1_ge * group )
static

Definition at line 291 of file tests_exhaustive.c.

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

◆ test_exhaustive_verify()

void test_exhaustive_verify ( const secp256k1_context * ctx,
const secp256k1_ge * group )
static

Definition at line 238 of file tests_exhaustive.c.

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

Variable Documentation

◆ count

int count = 2
static

Definition at line 34 of file tests_exhaustive.c.

◆ num_cores

uint32_t num_cores = 1
static

Definition at line 36 of file tests_exhaustive.c.

◆ this_core

uint32_t this_core = 0
static

Definition at line 37 of file tests_exhaustive.c.