PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Functions
tests.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "secp256k1.c"
#include "testrand_impl.h"
Include dependency graph for tests.c:

Go to the source code of this file.

Functions

void random_field_element_test (secp256k1_fe_t *fe)
 
void random_field_element_magnitude (secp256k1_fe_t *fe)
 
void random_group_element_test (secp256k1_ge_t *ge)
 
void random_group_element_jacobian_test (secp256k1_gej_t *gej, const secp256k1_ge_t *ge)
 
void random_scalar_order_test (secp256k1_scalar_t *num)
 
void random_scalar_order (secp256k1_scalar_t *num)
 
void random_num_negate (secp256k1_num_t *num)
 
void random_num_order_test (secp256k1_num_t *num)
 
void random_num_order (secp256k1_num_t *num)
 
void test_num_negate (void)
 
void test_num_add_sub (void)
 
void run_num_smalltests (void)
 
void scalar_test (void)
 
void run_scalar_tests (void)
 
void random_fe (secp256k1_fe_t *x)
 
void random_fe_non_zero (secp256k1_fe_t *nz)
 
void random_fe_non_square (secp256k1_fe_t *ns)
 
int check_fe_equal (const secp256k1_fe_t *a, const secp256k1_fe_t *b)
 
int check_fe_inverse (const secp256k1_fe_t *a, const secp256k1_fe_t *ai)
 
void run_field_inv (void)
 
void run_field_inv_var (void)
 
void run_field_inv_all (void)
 
void run_field_inv_all_var (void)
 
void run_sqr (void)
 
void test_sqrt (const secp256k1_fe_t *a, const secp256k1_fe_t *k)
 
void run_sqrt (void)
 
int ge_equals_ge (const secp256k1_ge_t *a, const secp256k1_ge_t *b)
 
void ge_equals_gej (const secp256k1_ge_t *a, const secp256k1_gej_t *b)
 
void gej_equals_gej (const secp256k1_gej_t *a, const secp256k1_gej_t *b)
 
void test_ge (void)
 
void run_ge (void)
 
void run_ecmult_chain (void)
 
void test_point_times_order (const secp256k1_gej_t *point)
 
void run_point_times_order (void)
 
void test_wnaf (const secp256k1_scalar_t *number, int w)
 
void run_wnaf (void)
 
void random_sign (secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *key, const secp256k1_scalar_t *msg, int *recid)
 
void test_ecdsa_sign_verify (void)
 
void run_ecdsa_sign_verify (void)
 
void test_ecdsa_end_to_end (void)
 
void run_ecdsa_end_to_end (void)
 
void test_ecdsa_edge_cases (void)
 
void run_ecdsa_edge_cases (void)
 
int main (int argc, char **argv)
 

Function Documentation

◆ check_fe_equal()

int check_fe_equal ( const secp256k1_fe_t a,
const secp256k1_fe_t b 
)

Definition at line 467 of file tests.c.

Here is the caller graph for this function:

◆ check_fe_inverse()

int check_fe_inverse ( const secp256k1_fe_t a,
const secp256k1_fe_t ai 
)

Definition at line 473 of file tests.c.

◆ ge_equals_ge()

int ge_equals_ge ( const secp256k1_ge_t a,
const secp256k1_ge_t b 
)

Definition at line 598 of file tests.c.

Here is the call graph for this function:

◆ ge_equals_gej()

void ge_equals_gej ( const secp256k1_ge_t a,
const secp256k1_gej_t b 
)

Definition at line 604 of file tests.c.

◆ gej_equals_gej()

void gej_equals_gej ( const secp256k1_gej_t a,
const secp256k1_gej_t b 
)

Definition at line 611 of file tests.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1143 of file tests.c.

◆ random_fe()

void random_fe ( secp256k1_fe_t x)

Definition at line 437 of file tests.c.

Here is the caller graph for this function:

◆ random_fe_non_square()

void random_fe_non_square ( secp256k1_fe_t ns)

Definition at line 459 of file tests.c.

Here is the call graph for this function:

◆ random_fe_non_zero()

void random_fe_non_zero ( secp256k1_fe_t nz)

Definition at line 447 of file tests.c.

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

◆ random_field_element_magnitude()

void random_field_element_magnitude ( secp256k1_fe_t fe)

Definition at line 36 of file tests.c.

◆ random_field_element_test()

void random_field_element_test ( secp256k1_fe_t fe)

Definition at line 26 of file tests.c.

Here is the caller graph for this function:

◆ random_group_element_jacobian_test()

void random_group_element_jacobian_test ( secp256k1_gej_t gej,
const secp256k1_ge_t ge 
)

Definition at line 54 of file tests.c.

Here is the call graph for this function:

◆ random_group_element_test()

void random_group_element_test ( secp256k1_ge_t ge)

Definition at line 45 of file tests.c.

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

◆ random_num_negate()

void random_num_negate ( secp256k1_num_t num)

Definition at line 95 of file tests.c.

Here is the caller graph for this function:

◆ random_num_order()

void random_num_order ( secp256k1_num_t num)

Definition at line 106 of file tests.c.

Here is the call graph for this function:

◆ random_num_order_test()

void random_num_order_test ( secp256k1_num_t num)

Definition at line 100 of file tests.c.

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

◆ random_scalar_order()

void random_scalar_order ( secp256k1_scalar_t num)

Definition at line 80 of file tests.c.

Here is the caller graph for this function:

◆ random_scalar_order_test()

void random_scalar_order_test ( secp256k1_scalar_t num)

Definition at line 68 of file tests.c.

Here is the caller graph for this function:

◆ random_sign()

void random_sign ( secp256k1_ecdsa_sig_t sig,
const secp256k1_scalar_t key,
const secp256k1_scalar_t msg,
int *  recid 
)

Definition at line 849 of file tests.c.

Here is the call graph for this function:

◆ run_ecdsa_edge_cases()

void run_ecdsa_edge_cases ( void  )

Definition at line 1087 of file tests.c.

Here is the call graph for this function:

◆ run_ecdsa_end_to_end()

void run_ecdsa_end_to_end ( void  )

Definition at line 970 of file tests.c.

◆ run_ecdsa_sign_verify()

void run_ecdsa_sign_verify ( void  )

Definition at line 875 of file tests.c.

◆ run_ecmult_chain()

void run_ecmult_chain ( void  )

Definition at line 706 of file tests.c.

◆ run_field_inv()

void run_field_inv ( void  )

Definition at line 479 of file tests.c.

◆ run_field_inv_all()

void run_field_inv_all ( void  )

Definition at line 501 of file tests.c.

◆ run_field_inv_all_var()

void run_field_inv_all_var ( void  )

Definition at line 518 of file tests.c.

◆ run_field_inv_var()

void run_field_inv_var ( void  )

Definition at line 490 of file tests.c.

◆ run_ge()

void run_ge ( void  )

Definition at line 698 of file tests.c.

◆ run_num_smalltests()

void run_num_smalltests ( void  )

Definition at line 161 of file tests.c.

◆ run_point_times_order()

void run_point_times_order ( void  )

Definition at line 789 of file tests.c.

◆ run_scalar_tests()

void run_scalar_tests ( void  )

Definition at line 405 of file tests.c.

◆ run_sqr()

void run_sqr ( void  )

Definition at line 535 of file tests.c.

◆ run_sqrt()

void run_sqrt ( void  )

Definition at line 564 of file tests.c.

◆ run_wnaf()

void run_wnaf ( void  )

Definition at line 839 of file tests.c.

◆ scalar_test()

void scalar_test ( void  )

Definition at line 171 of file tests.c.

Here is the call graph for this function:

◆ test_ecdsa_edge_cases()

void test_ecdsa_edge_cases ( void  )

Definition at line 977 of file tests.c.

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

◆ test_ecdsa_end_to_end()

void test_ecdsa_end_to_end ( void  )

Definition at line 881 of file tests.c.

Here is the call graph for this function:

◆ test_ecdsa_sign_verify()

void test_ecdsa_sign_verify ( void  )

Definition at line 856 of file tests.c.

Here is the call graph for this function:

◆ test_ge()

void test_ge ( void  )

Definition at line 619 of file tests.c.

Here is the call graph for this function:

◆ test_num_add_sub()

void test_num_add_sub ( void  )

Definition at line 132 of file tests.c.

◆ test_num_negate()

void test_num_negate ( void  )

Definition at line 112 of file tests.c.

Here is the call graph for this function:

◆ test_point_times_order()

void test_point_times_order ( const secp256k1_gej_t point)

Definition at line 771 of file tests.c.

Here is the call graph for this function:

◆ test_sqrt()

void test_sqrt ( const secp256k1_fe_t a,
const secp256k1_fe_t k 
)

Definition at line 550 of file tests.c.

◆ test_wnaf()

void test_wnaf ( const secp256k1_scalar_t number,
int  w 
)

Definition at line 807 of file tests.c.