Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
key_tests.cpp File Reference
#include <key.h>
#include <common/system.h>
#include <key_io.h>
#include <span.h>
#include <streams.h>
#include <secp256k1_extrakeys.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <string>
#include <vector>
#include <boost/test/unit_test.hpp>
Include dependency graph for key_tests.cpp:

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (key_test1)
 
 BOOST_AUTO_TEST_CASE (key_signature_tests)
 
static CPubKey UnserializePubkey (const std::vector< uint8_t > &data)
 
static unsigned int GetLen (unsigned char chHeader)
 
static void CmpSerializationPubkey (const CPubKey &pubkey)
 
 BOOST_AUTO_TEST_CASE (pubkey_unserialize)
 
 BOOST_AUTO_TEST_CASE (bip340_test_vectors)
 
 BOOST_AUTO_TEST_CASE (key_ellswift)
 
 BOOST_AUTO_TEST_CASE (bip341_test_h)
 
 BOOST_AUTO_TEST_CASE (key_schnorr_tweak_smoke_test)
 

Variables

static const std::string strSecret1 = "5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj"
 
static const std::string strSecret2 = "5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3"
 
static const std::string strSecret1C = "Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw"
 
static const std::string strSecret2C = "L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g"
 
static const std::string addr1 = "1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ"
 
static const std::string addr2 = "1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ"
 
static const std::string addr1C = "1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs"
 
static const std::string addr2C = "1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs"
 
static const std::string strAddressBad = "1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF"
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( bip340_test_vectors  )

Definition at line 254 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( bip341_test_h  )

Definition at line 357 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( key_ellswift  )

Definition at line 337 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( key_schnorr_tweak_smoke_test  )

Definition at line 366 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( key_signature_tests  )

Definition at line 165 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( key_test1  )

Definition at line 40 of file key_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( pubkey_unserialize  )

Definition at line 238 of file key_tests.cpp.

Here is the call graph for this function:

◆ CmpSerializationPubkey()

static void CmpSerializationPubkey ( const CPubKey pubkey)
static

Definition at line 229 of file key_tests.cpp.

Here is the caller graph for this function:

◆ GetLen()

static unsigned int GetLen ( unsigned char  chHeader)
static

Definition at line 220 of file key_tests.cpp.

Here is the caller graph for this function:

◆ UnserializePubkey()

static CPubKey UnserializePubkey ( const std::vector< uint8_t > &  data)
static

Definition at line 211 of file key_tests.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ addr1

const std::string addr1 = "1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ"
static

Definition at line 30 of file key_tests.cpp.

◆ addr1C

const std::string addr1C = "1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs"
static

Definition at line 32 of file key_tests.cpp.

◆ addr2

const std::string addr2 = "1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ"
static

Definition at line 31 of file key_tests.cpp.

◆ addr2C

const std::string addr2C = "1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs"
static

Definition at line 33 of file key_tests.cpp.

◆ strAddressBad

const std::string strAddressBad = "1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF"
static

Definition at line 35 of file key_tests.cpp.

◆ strSecret1

const std::string strSecret1 = "5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj"
static

Definition at line 26 of file key_tests.cpp.

◆ strSecret1C

const std::string strSecret1C = "Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw"
static

Definition at line 28 of file key_tests.cpp.

◆ strSecret2

const std::string strSecret2 = "5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3"
static

Definition at line 27 of file key_tests.cpp.

◆ strSecret2C

const std::string strSecret2C = "L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g"
static

Definition at line 29 of file key_tests.cpp.