![]() |
Bitcoin Core
25.99.0
P2P Digital Currency
|
#include <crypto/aes.h>
#include <crypto/chacha20.h>
#include <crypto/chacha20poly1305.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/random.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, ChaCha20::Nonce96 nonce, uint32_t seek, const std::string &hexout) |
static void | TestFSChaCha20 (const std::string &hex_plaintext, const std::string &hexkey, uint32_t rekey_interval, const std::string &ciphertext_after_rotation) |
static void | TestPoly1305 (const std::string &hexmessage, const std::string &hexkey, const std::string &hextag) |
static void | TestChaCha20Poly1305 (const std::string &plain_hex, const std::string &aad_hex, const std::string &key_hex, ChaCha20::Nonce96 nonce, const std::string &cipher_hex) |
static void | TestFSChaCha20Poly1305 (const std::string &plain_hex, const std::string &aad_hex, const std::string &key_hex, uint64_t msg_idx, const std::string &cipher_hex) |
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 (chacha20_midblock) | |
BOOST_AUTO_TEST_CASE (poly1305_testvector) | |
BOOST_AUTO_TEST_CASE (chacha20poly1305_testvectors) | |
BOOST_AUTO_TEST_CASE (hkdf_hmac_sha256_l32_tests) | |
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_midblock | ) |
BOOST_AUTO_TEST_CASE | ( | chacha20_testvector | ) |
BOOST_AUTO_TEST_CASE | ( | chacha20poly1305_testvectors | ) |
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 353 of file crypto_tests.cpp.
|
static |
Definition at line 74 of file crypto_tests.cpp.
|
static |
Definition at line 93 of file crypto_tests.cpp.
|
static |
Definition at line 134 of file crypto_tests.cpp.
|
static |
Definition at line 250 of file crypto_tests.cpp.
|
static |
Definition at line 185 of file crypto_tests.cpp.
|
static |
Definition at line 291 of file crypto_tests.cpp.
|
static |
Definition at line 337 of file crypto_tests.cpp.
|
static |
Definition at line 64 of file crypto_tests.cpp.
|
static |
Definition at line 69 of file crypto_tests.cpp.
|
static |
Definition at line 225 of file crypto_tests.cpp.
|
static |
Definition at line 62 of file crypto_tests.cpp.
|
static |
Definition at line 59 of file crypto_tests.cpp.
|
static |
Definition at line 60 of file crypto_tests.cpp.
|
static |
Definition at line 1101 of file crypto_tests.cpp.
|
static |
Definition at line 61 of file crypto_tests.cpp.
|
static |
Definition at line 31 of file crypto_tests.cpp.
const std::string test1 = LongTestString() |
Definition at line 366 of file crypto_tests.cpp.