Name Description Size Coverage
data -
main.cpp The mlock pool becomes a major contention point when many threads are running, so disable it unless it was explicitly asked for via setting the env variable 4810 -
runner -
test_aead.cpp Now try to set the AD *after* setting the nonce For some modes this works, for others it does not. 20023 -
test_alt_name.cpp 3265 -
test_arb_eq.h Does T have a member to_string() returning std::string? 3687 -
test_asn1.cpp This constructs a len deep sequence of SEQUENCES each with an indefinite length 10591 -
test_bigint.cpp 35754 -
test_block.cpp Different providers may have additional restrictions on key sizes. Avoid testing the cipher with a key size that it does not natively support. 10448 -
test_blowfish.cpp header 1190 -
test_bufcomp.cpp 4247 -
test_certstor.cpp 15421 -
test_certstor_flatfile.cpp 8966 -
test_certstor_system.cpp 11584 -
test_certstor_utils.cpp 6421 -
test_certstor_utils.h 953 -
test_cmce.cpp 15157 -
test_codec.cpp 7184 -
test_compression.cpp 8488 -
test_concurrent_pk.cpp Test that public key operations (signing, verification, encryption, decryption, KEM, key agreement) with a shared key from multiple threads produce correct results without racing. TODO: Add concurrent test for ECIES handling 20063 -
test_cryptobox.cpp header 2332 -
test_crystals.cpp unused 25427 -
test_ct_utils.cpp 11866 -
test_dh.cpp unused 4934 -
test_dilithium.cpp 14294 -
test_dl_group.cpp 8259 -
test_dlies.cpp 6040 -
test_dsa.cpp unused 4605 -
test_ec_group.cpp Produces integers with long runs of ones and zeros, for testing for carry handling problems. 37542 -
test_ecc_explicit_params.cpp unused 2659 -
test_ecc_h2c.cpp vars 4805 -
test_ecc_pointmul.cpp vars 16655 -
test_ecdh.cpp unused 5056 -
test_ecdsa.cpp header 14910 -
test_ecgdsa.cpp header 2625 -
test_ecies.cpp header 23618 -
test_eckcdsa.cpp header 2570 -
test_ed448.cpp keygen_params 5942 -
test_ed25519.cpp keygen_params 4683 -
test_elgamal.cpp provider 2495 -
test_entropy.cpp Skip bzip2 both due to OS X problem (GH #394) and because bzip2's large blocks cause the entropy differential test to fail sometimes. 4515 -
test_ffi.cpp Helper class for testing "view"-style API functions that take a callback that gets passed a variable-length buffer of bytes. Example: botan_privkey_t priv; ViewBytesSink sink; botan_privkey_view_raw(priv, sink.delegate(), sink.callback()); std::cout << hex_encode(sink.get()) << std::endl; 292184 -
test_filters.cpp 28192 -
test_fpe.cpp header 1312 -
test_frodokem.cpp params 7333 -
test_gf2m.cpp This is testing one specific case where an overflow occurred. It should be extended to test more of the interface. 1834 -
test_gost_3410.cpp header 4670 -
test_hash.cpp 11459 -
test_hash_id.cpp 2632 -
test_hss_lms.cpp @brief Test the correct parsing of HSS-LMS parameters 14394 -
test_jitter_rng.cpp 1594 -
test_kdf.cpp 3057 -
test_keccak_helpers.cpp SHAKE-256 byte rate 10313 -
test_keywrap.cpp header 5231 -
test_kyber.cpp no KDF 17525 -
test_lmots.cpp @brief Test the LMOTS logic of HSS-LMS 2677 -
test_lms.cpp @brief Test the LMS logic of HSS-LMS 2686 -
test_mac.cpp 5740 -
test_mceliece.cpp header 7421 -
test_ml_dsa.cpp unused 1075 -
test_modes.cpp 15618 -
test_monty.cpp 1809 -
test_mp.cpp 3837 -
test_name_constraint.cpp hostname 4471 -
test_ocb.cpp header 14440 -
test_ocsp.cpp 24800 -
test_octetstring.cpp 4721 -
test_oid.cpp See #2730 and #2237 Certain locales format integers with thousands separators. This caused a subtle bug which caused OID comparisons to fail because OID::to_string(), which used ostringstream, introduced a thousands separator when the OID component had a value >= 1000. But this only failed in certain locales (pt_BR was reported). Nominally C++ requires std::to_string to also be locale-respecting. But, libc++, libstdc++, and MSVC's STL library all implement std::to_string in a way that ignores locales, because adding locale support means std::to_string will be both slow and a serialization point. So as a stopgap we assume this behavior from std::to_string. Here we test the original issue of #2237 to verify it works. If the compiler implements std::to_string in a way that respects locale, and* this test is run in a locale that uses thousands separators, then it will fail. Which is much better than a very subtle failure. However if it ever does fail then we must replace nearly every call to std::to_string with something else that ignores locale. 6645 -
test_os_utils.cpp uint32_t get_process_id(); uint64_t get_cpu_cycle_counter(); uint64_t get_system_timestamp_ns(); size_t get_memory_locking_limit(); void* allocate_locked_pages(size_t length); void free_locked_pages(void* ptr, size_t length); int run_cpu_instruction_probe(std::function<int ()> probe_fn); 6505 -
test_otp.cpp 5201 -
test_pad.cpp 3183 -
test_passhash.cpp header 7026 -
test_pbkdf.cpp header 10469 -
test_pem.cpp 1781 -
test_pk_pad.cpp 5288 -
test_pkcs11.h 1616 -
test_pkcs11_high_level.cpp Module **************************** 52077 -
test_pkcs11_low_level.cpp unused 33697 -
test_psk_db.cpp 8603 -
test_pubkey.cpp params 41495 -
test_pubkey.h vars 9143 -
test_pubkey_pqc.h This is an abstraction over the Known Answer Tests used by the KEM candidates in the NIST PQC competition. All these tests use a DRBG based on AES-256/CTR to expand seed values defined in the KAT vector as entropy input for key generation and encapsulation. Note that these tests won't run when the library is configured without AES. See also: https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/example-files 13907 -
test_rfc6979.cpp 1552 -
test_rng.h RNG that outputs only a given set of fixed bytes, throws otherwise. Useful for test vectors with fixed nonces, where the algorithm consumes only the fixed nonce. 6527 -
test_rng_behavior.cpp This test uses the library in both parent and child processes. But this causes a race with other threads, where if any other test thread is holding the mlock pool mutex, it is killed after the fork. Then, in the child, any attempt to allocate or free memory will cause a deadlock. 34665 -
test_rng_kat.cpp header 3550 -
test_rngs.cpp 3143 -
test_roughtime.cpp 15896 -
test_rsa.cpp unused 15113 -
test_simd.cpp 18479 -
test_siv.cpp 1788 -
test_sm2.cpp header 5034 -
test_sodium.cpp 40661 -
test_sphincsplus.cpp Test all implemented SLH-DSA instances using the data of the KAT files. 14506 -
test_sphincsplus_fors.cpp header 3656 -
test_sphincsplus_utils.cpp longer than 32bits 4816 -
test_sphincsplus_wots.cpp header 5334 -
test_srp6.cpp header 4689 -
test_stream.cpp Different providers may have additional restrictions on key sizes. Avoid testing the cipher with a key size that it does not natively support. 8069 -
test_strong_type.cpp unused 31717 -
test_tests.cpp Test the test framework :) 8212 -
test_thread_utils.cpp 1485 -
test_tls.cpp header 27956 -
test_tls_cipher_state.cpp 53933 -
test_tls_handshake_layer_13.cpp 20426 -
test_tls_handshake_state_13.cpp 5552 -
test_tls_handshake_transitions.cpp 3721 -
test_tls_hybrid_kem_key.cpp 14073 -
test_tls_messages.cpp data 24735 -
test_tls_record_layer_13.cpp label 54387 -
test_tls_rfc8448.cpp Simple version of the Padding extension (RFC 7685) to reproduce the 2nd Client_Hello in RFC8448 Section 5 (HelloRetryRequest) 152122 -
test_tls_session_manager.cpp data 60216 -
test_tls_signature_scheme.cpp 2588 -
test_tls_stream_integration.cpp 39797 -
test_tls_transcript_hash_13.cpp 9766 -
test_tpm.cpp 3019 -
test_tpm2.cpp ABI version 67168 -
test_tss.cpp header 5447 -
test_uri.cpp 5211 -
test_utils.cpp 66244 -
test_utils_bitvector.cpp 56321 -
test_utils_buffer.cpp 35104 -
test_workfactor.cpp 1306 -
test_x448.cpp keygen_params 2191 -
test_x509_dn.cpp 1919 -
test_x509_path.cpp some tests use SHA-1 85441 -
test_x509_rpki.cpp 109090 -
test_x25519.cpp unused 5581 -
test_xmss.cpp header 16539 -
test_xof.cpp 10205 -
test_zfec.cpp header 3466 -
tests.cpp ignore non-matching test names 46760 -
tests.h Warning: be very careful about adding any new includes here Each include is parsed for every test file which can get quite expensive 32329 -
unit_asio_stream.cpp Mocked Botan::TLS::Channel. Pretends to perform TLS operations and triggers appropriate callbacks in StreamCore. 31510 -
unit_ecdsa.cpp 7161 -
unit_tls.cpp type 73032 -
unit_tls_policy.cpp 7149 -
unit_x509.cpp Return some option sets 79446 -