Bitcoin Core  27.99.0
P2P Digital Currency
Functions | Variables
tests_wycheproof_generate Namespace Reference

Functions

def to_c_array (x)
 

Variables

 filename_input = sys.argv[1]
 
 doc = json.load(f)
 
 num_groups = len(doc['testGroups'])
 
int num_vectors = 0
 
 offset_msg_running
 
 offset_pk_running
 
 offset_sig
 
string out = ""
 
string messages = ""
 
string signatures = ""
 
string public_keys = ""
 
dictionary cache_msgs = {}
 
dictionary cache_public_keys = {}
 
 group = doc['testGroups'][i]
 
 num_tests = len(group['tests'])
 
 public_key = group['publicKey']
 
 test_vector = group['tests'][j]
 
int sig_size = len(test_vector['sig']) // 2
 
int msg_size = len(test_vector['msg']) // 2
 
int expected_verify = 0
 
bool new_msg = False
 
def msg = to_c_array(test_vector['msg'])
 
 msg_offset = offset_msg_running
 
bool new_pk = False
 
def pk = to_c_array(public_key['uncompressed'])
 
 pk_offset = offset_pk_running
 
string struct_definition
 

Function Documentation

◆ to_c_array()

def tests_wycheproof_generate.to_c_array (   x)

Definition at line 19 of file tests_wycheproof_generate.py.

Variable Documentation

◆ cache_msgs

dictionary tests_wycheproof_generate.cache_msgs = {}

Definition at line 32 of file tests_wycheproof_generate.py.

◆ cache_public_keys

dictionary tests_wycheproof_generate.cache_public_keys = {}

Definition at line 33 of file tests_wycheproof_generate.py.

◆ doc

tests_wycheproof_generate.doc = json.load(f)

Definition at line 15 of file tests_wycheproof_generate.py.

◆ expected_verify

int tests_wycheproof_generate.expected_verify = 0

Definition at line 46 of file tests_wycheproof_generate.py.

◆ filename_input

tests_wycheproof_generate.filename_input = sys.argv[1]

Definition at line 12 of file tests_wycheproof_generate.py.

◆ group

tests_wycheproof_generate.group = doc['testGroups'][i]

Definition at line 36 of file tests_wycheproof_generate.py.

◆ messages

string tests_wycheproof_generate.messages = ""

Definition at line 29 of file tests_wycheproof_generate.py.

◆ msg

def tests_wycheproof_generate.msg = to_c_array(test_vector['msg'])

Definition at line 56 of file tests_wycheproof_generate.py.

◆ msg_offset

dictionary tests_wycheproof_generate.msg_offset = offset_msg_running

Definition at line 57 of file tests_wycheproof_generate.py.

◆ msg_size

int tests_wycheproof_generate.msg_size = len(test_vector['msg']) // 2

Definition at line 43 of file tests_wycheproof_generate.py.

◆ new_msg

bool tests_wycheproof_generate.new_msg = False

Definition at line 55 of file tests_wycheproof_generate.py.

◆ new_pk

bool tests_wycheproof_generate.new_pk = False

Definition at line 68 of file tests_wycheproof_generate.py.

◆ num_groups

tests_wycheproof_generate.num_groups = len(doc['testGroups'])

Definition at line 17 of file tests_wycheproof_generate.py.

◆ num_tests

tests_wycheproof_generate.num_tests = len(group['tests'])

Definition at line 37 of file tests_wycheproof_generate.py.

◆ num_vectors

int tests_wycheproof_generate.num_vectors = 0

Definition at line 26 of file tests_wycheproof_generate.py.

◆ offset_msg_running

tests_wycheproof_generate.offset_msg_running

Definition at line 27 of file tests_wycheproof_generate.py.

◆ offset_pk_running

tests_wycheproof_generate.offset_pk_running

Definition at line 27 of file tests_wycheproof_generate.py.

◆ offset_sig

tests_wycheproof_generate.offset_sig

Definition at line 27 of file tests_wycheproof_generate.py.

◆ out

string tests_wycheproof_generate.out = ""

Definition at line 28 of file tests_wycheproof_generate.py.

◆ pk

def tests_wycheproof_generate.pk = to_c_array(public_key['uncompressed'])

Definition at line 69 of file tests_wycheproof_generate.py.

◆ pk_offset

dictionary tests_wycheproof_generate.pk_offset = offset_pk_running

Definition at line 70 of file tests_wycheproof_generate.py.

◆ public_key

tests_wycheproof_generate.public_key = group['publicKey']

Definition at line 38 of file tests_wycheproof_generate.py.

◆ public_keys

string tests_wycheproof_generate.public_keys = ""

Definition at line 31 of file tests_wycheproof_generate.py.

◆ sig_size

int tests_wycheproof_generate.sig_size = len(test_vector['sig']) // 2

Definition at line 42 of file tests_wycheproof_generate.py.

◆ signatures

string tests_wycheproof_generate.signatures = ""

Definition at line 30 of file tests_wycheproof_generate.py.

◆ struct_definition

string tests_wycheproof_generate.struct_definition
Initial value:
1 = """
2 typedef struct {
3  size_t pk_offset;
4  size_t msg_offset;
5  size_t msg_len;
6  size_t sig_offset;
7  size_t sig_len;
8  int expected_verify;
9 } wycheproof_ecdsa_testvector;
10 """

Definition at line 92 of file tests_wycheproof_generate.py.

◆ test_vector

tests_wycheproof_generate.test_vector = group['tests'][j]

Definition at line 40 of file tests_wycheproof_generate.py.