Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Macros | Functions | Variables
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()

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

Definition at line 189 of file tests_exhaustive.c.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 354 of file tests_exhaustive.c.

Here is the call graph for this function:

◆ r_from_k()

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

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

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

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

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

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

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

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

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

Definition at line 196 of file tests_exhaustive.c.

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

◆ test_exhaustive_endomorphism()

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

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

Definition at line 289 of file tests_exhaustive.c.

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

◆ test_exhaustive_verify()

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

Definition at line 236 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.