Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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/common.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)
template<typename T>
std::string ToString (const T &t)
 Locale-independent version of std::to_string.

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 255 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 358 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 338 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 367 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 166 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 41 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 239 of file key_tests.cpp.

Here is the call graph for this function:

◆ CmpSerializationPubkey()

void CmpSerializationPubkey ( const CPubKey & pubkey)
static

Definition at line 230 of file key_tests.cpp.

Here is the caller graph for this function:

◆ GetLen()

unsigned int GetLen ( unsigned char chHeader)
static

Definition at line 221 of file key_tests.cpp.

Here is the caller graph for this function:

◆ ToString()

template<typename T>
std::string util::ToString ( const T & t)

Locale-independent version of std::to_string.

Definition at line 246 of file string.h.

Here is the caller graph for this function:

◆ UnserializePubkey()

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

Definition at line 212 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 31 of file key_tests.cpp.

◆ addr1C

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

Definition at line 33 of file key_tests.cpp.

◆ addr2

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

Definition at line 32 of file key_tests.cpp.

◆ addr2C

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

Definition at line 34 of file key_tests.cpp.

◆ strAddressBad

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

Definition at line 36 of file key_tests.cpp.

◆ strSecret1

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

Definition at line 27 of file key_tests.cpp.

◆ strSecret1C

const std::string strSecret1C = "Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw"
static

Definition at line 29 of file key_tests.cpp.

◆ strSecret2

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

Definition at line 28 of file key_tests.cpp.

◆ strSecret2C

const std::string strSecret2C = "L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g"
static

Definition at line 30 of file key_tests.cpp.