Botan 3.8.1
Crypto and TLS for C&
|
#include <ghash.h>
Public Member Functions | |
void | clear () override |
void | final (std::span< uint8_t > out) |
bool | has_keying_material () const override |
Key_Length_Specification | key_spec () const override |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
std::string | name () const override |
void | nonce_hash (std::span< uint8_t, GCM_BS > y0, std::span< const uint8_t > nonce) |
Hashing of non-default length nonce values for both GCM and GMAC use-cases. | |
std::string | provider () const |
void | reset () |
void | set_associated_data (std::span< const uint8_t > ad) |
Monolithic setting of associated data usid in the GCM use-case. | |
void | set_key (const OctetString &key) |
void | set_key (const uint8_t key[], size_t length) |
void | set_key (std::span< const uint8_t > key) |
void | start (std::span< const uint8_t > nonce) |
void | update (std::span< const uint8_t > in) |
void | update_associated_data (std::span< const uint8_t > ad) |
Incremental update of associated data used in the GMAC use-case. | |
bool | valid_keylength (size_t length) const |
Protected Member Functions | |
void | assert_key_material_set () const |
void | assert_key_material_set (bool predicate) const |
|
inlineprotectedinherited |
Definition at line 141 of file sym_algo.h.
References assert_key_material_set(), and has_keying_material().
Referenced by assert_key_material_set(), Botan::Salsa20::cipher_bytes(), Botan::Lion::decrypt_n(), Botan::Lion::encrypt_n(), Botan::GHASH::final(), Botan::GHASH::nonce_hash(), Botan::ChaCha::seek(), Botan::CTR_BE::seek(), Botan::Salsa20::seek(), Botan::GHASH::set_associated_data(), Botan::OCB_Mode::set_associated_data_n(), Botan::Salsa20::set_iv_bytes(), Botan::GHASH::update(), and Botan::GHASH::update_associated_data().
|
inlineprotectedinherited |
Definition at line 143 of file sym_algo.h.
|
overridevirtual |
Reset the internal state. This includes not just the key, but any partial message that may have been in process.
Implements Botan::SymmetricAlgorithm.
Definition at line 190 of file ghash.cpp.
References reset(), and Botan::zap().
void Botan::GHASH::final | ( | std::span< uint8_t > | out | ) |
Definition at line 166 of file ghash.cpp.
References Botan::SymmetricAlgorithm::assert_key_material_set(), BOTAN_ARG_CHECK, BOTAN_STATE_CHECK, Botan::secure_scrub_memory(), and Botan::xor_buf().
|
overridevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 88 of file ghash.cpp.
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 39 of file ghash.h.
|
inlineinherited |
Definition at line 97 of file sym_algo.h.
References key_spec().
|
inlineinherited |
Definition at line 102 of file sym_algo.h.
References key_spec().
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 47 of file ghash.h.
void Botan::GHASH::nonce_hash | ( | std::span< uint8_t, GCM_BS > | y0, |
std::span< const uint8_t > | nonce ) |
Hashing of non-default length nonce values for both GCM and GMAC use-cases.
Definition at line 181 of file ghash.cpp.
References Botan::SymmetricAlgorithm::assert_key_material_set(), and BOTAN_STATE_CHECK.
std::string Botan::GHASH::provider | ( | ) | const |
Definition at line 23 of file ghash.cpp.
References Botan::CPUID::has(), Botan::CPUFeature::HW_CLMUL, and Botan::CPUFeature::SIMD_4X32.
void Botan::GHASH::reset | ( | ) |
Definition at line 196 of file ghash.cpp.
References Botan::secure_scrub_memory().
Referenced by clear().
void Botan::GHASH::set_associated_data | ( | std::span< const uint8_t > | ad | ) |
Monolithic setting of associated data usid in the GCM use-case.
Definition at line 143 of file ghash.cpp.
References Botan::SymmetricAlgorithm::assert_key_material_set(), and BOTAN_STATE_CHECK.
|
inherited |
Set the symmetric key of this object.
key | the SymmetricKey to be set. |
Definition at line 14 of file sym_algo.cpp.
References Botan::OctetString::begin(), Botan::OctetString::length(), and set_key().
Referenced by Botan::create_aes_row_generator(), Botan::Sodium::crypto_stream_salsa20(), Botan::Sodium::crypto_stream_salsa20_xor_ic(), Botan::Sodium::crypto_stream_xsalsa20(), Botan::Sodium::crypto_stream_xsalsa20_xor_ic(), Botan::FPE::fe1_decrypt(), Botan::FPE::fe1_encrypt(), Botan::Sphincs_Hash_Functions_Sha2::PRF_msg(), Botan::Sodium::randombytes_buf_deterministic(), and set_key().
|
inlineinherited |
Set the symmetric key of this object.
key | the to be set as a byte array. |
length | in bytes of key param |
Definition at line 128 of file sym_algo.h.
References set_key().
Referenced by set_key().
|
inherited |
Set the symmetric key of this object.
key | the contiguous byte range to be set. |
Definition at line 22 of file sym_algo.cpp.
References name(), and valid_keylength().
void Botan::GHASH::start | ( | std::span< const uint8_t > | nonce | ) |
Definition at line 136 of file ghash.cpp.
References BOTAN_ARG_CHECK, and Botan::copy_mem().
void Botan::GHASH::update | ( | std::span< const uint8_t > | in | ) |
Definition at line 159 of file ghash.cpp.
References Botan::SymmetricAlgorithm::assert_key_material_set(), and BOTAN_STATE_CHECK.
void Botan::GHASH::update_associated_data | ( | std::span< const uint8_t > | ad | ) |
Incremental update of associated data used in the GMAC use-case.
Definition at line 153 of file ghash.cpp.
References Botan::SymmetricAlgorithm::assert_key_material_set().
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
length | the key length to be checked. |
Definition at line 109 of file sym_algo.h.
References key_spec().
Referenced by set_key().