![]() |
Bitcoin Core
22.99.0
P2P Digital Currency
|
#include <crypto/aes.h>
#include <crypto/chacha20.h>
#include <crypto/chacha_poly_aead.h>
#include <crypto/hkdf_sha256_32.h>
#include <crypto/hmac_sha256.h>
#include <crypto/hmac_sha512.h>
#include <crypto/poly1305.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
#include <crypto/sha3.h>
#include <crypto/sha512.h>
#include <crypto/muhash.h>
#include <random.h>
#include <streams.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>
#include <vector>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
Functions | |
template<typename Hasher , typename In , typename Out > | |
static void | TestVector (const Hasher &h, const In &in, const Out &out) |
static void | TestSHA1 (const std::string &in, const std::string &hexout) |
static void | TestSHA256 (const std::string &in, const std::string &hexout) |
static void | TestSHA512 (const std::string &in, const std::string &hexout) |
static void | TestRIPEMD160 (const std::string &in, const std::string &hexout) |
static void | TestHMACSHA256 (const std::string &hexkey, const std::string &hexin, const std::string &hexout) |
static void | TestHMACSHA512 (const std::string &hexkey, const std::string &hexin, const std::string &hexout) |
static void | TestAES256 (const std::string &hexkey, const std::string &hexin, const std::string &hexout) |
static void | TestAES256CBC (const std::string &hexkey, const std::string &hexiv, bool pad, const std::string &hexin, const std::string &hexout) |
static void | TestChaCha20 (const std::string &hex_message, const std::string &hexkey, uint64_t nonce, uint64_t seek, const std::string &hexout) |
static void | TestPoly1305 (const std::string &hexmessage, const std::string &hexkey, const std::string &hextag) |
static void | TestHKDF_SHA256_32 (const std::string &ikm_hex, const std::string &salt_hex, const std::string &info_hex, const std::string &okm_check_hex) |
static std::string | LongTestString () |
BOOST_AUTO_TEST_CASE (ripemd160_testvectors) | |
BOOST_AUTO_TEST_CASE (sha1_testvectors) | |
BOOST_AUTO_TEST_CASE (sha256_testvectors) | |
BOOST_AUTO_TEST_CASE (sha512_testvectors) | |
BOOST_AUTO_TEST_CASE (hmac_sha256_testvectors) | |
BOOST_AUTO_TEST_CASE (hmac_sha512_testvectors) | |
BOOST_AUTO_TEST_CASE (aes_testvectors) | |
BOOST_AUTO_TEST_CASE (aes_cbc_testvectors) | |
BOOST_AUTO_TEST_CASE (chacha20_testvector) | |
BOOST_AUTO_TEST_CASE (poly1305_testvector) | |
BOOST_AUTO_TEST_CASE (hkdf_hmac_sha256_l32_tests) | |
static void | TestChaCha20Poly1305AEAD (bool must_succeed, unsigned int expected_aad_length, const std::string &hex_m, const std::string &hex_k1, const std::string &hex_k2, const std::string &hex_aad_keystream, const std::string &hex_encrypted_message, const std::string &hex_encrypted_message_seq_999) |
BOOST_AUTO_TEST_CASE (chacha20_poly1305_aead_testvector) | |
BOOST_AUTO_TEST_CASE (countbits_tests) | |
BOOST_AUTO_TEST_CASE (sha256d64) | |
static void | TestSHA3_256 (const std::string &input, const std::string &output) |
BOOST_AUTO_TEST_CASE (keccak_tests) | |
BOOST_AUTO_TEST_CASE (sha3_256_tests) | |
static MuHash3072 | FromInt (unsigned char i) |
BOOST_AUTO_TEST_CASE (muhash_tests) | |
Variables | |
const std::string | test1 = LongTestString() |
BOOST_AUTO_TEST_CASE | ( | aes_cbc_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | aes_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | chacha20_poly1305_aead_testvector | ) |
BOOST_AUTO_TEST_CASE | ( | chacha20_testvector | ) |
BOOST_AUTO_TEST_CASE | ( | countbits_tests | ) |
BOOST_AUTO_TEST_CASE | ( | hkdf_hmac_sha256_l32_tests | ) |
BOOST_AUTO_TEST_CASE | ( | hmac_sha256_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | hmac_sha512_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | keccak_tests | ) |
BOOST_AUTO_TEST_CASE | ( | muhash_tests | ) |
BOOST_AUTO_TEST_CASE | ( | poly1305_testvector | ) |
BOOST_AUTO_TEST_CASE | ( | ripemd160_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | sha1_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | sha256_testvectors | ) |
BOOST_AUTO_TEST_CASE | ( | sha256d64 | ) |
BOOST_AUTO_TEST_CASE | ( | sha3_256_tests | ) |
BOOST_AUTO_TEST_CASE | ( | sha512_testvectors | ) |
|
static |
|
static |
Definition at line 192 of file crypto_tests.cpp.
|
static |
Definition at line 73 of file crypto_tests.cpp.
|
static |
Definition at line 92 of file crypto_tests.cpp.
|
static |
Definition at line 133 of file crypto_tests.cpp.
|
static |
Definition at line 593 of file crypto_tests.cpp.
|
static |
Definition at line 176 of file crypto_tests.cpp.
|
static |
Definition at line 63 of file crypto_tests.cpp.
|
static |
Definition at line 68 of file crypto_tests.cpp.
|
static |
Definition at line 165 of file crypto_tests.cpp.
|
static |
Definition at line 61 of file crypto_tests.cpp.
|
static |
Definition at line 58 of file crypto_tests.cpp.
|
static |
Definition at line 59 of file crypto_tests.cpp.
|
static |
Definition at line 756 of file crypto_tests.cpp.
|
static |
Definition at line 60 of file crypto_tests.cpp.
|
static |
Definition at line 30 of file crypto_tests.cpp.
const std::string test1 = LongTestString() |
Definition at line 205 of file crypto_tests.cpp.