|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <ghash.h>
Public Member Functions | |
| void | add_final_block (secure_vector< uint8_t > &x, size_t ad_len, size_t pt_len) |
| void | clear () override |
| secure_vector< uint8_t > | final () |
| void | final (uint8_t out[], size_t out_len) |
| void | ghash_update (secure_vector< uint8_t > &x, const uint8_t input[], size_t input_len) |
| Key_Length_Specification | key_spec () const override |
| size_t | maximum_keylength () const |
| size_t | minimum_keylength () const |
| std::string | name () const override |
| secure_vector< uint8_t > | nonce_hash (const uint8_t nonce[], size_t nonce_len) |
| void | nonce_hash (secure_vector< uint8_t > &y0, const uint8_t nonce[], size_t len) |
| std::string | provider () const |
| void | reset () |
| void | set_associated_data (const uint8_t ad[], size_t ad_len) |
| void | set_key (const SymmetricKey &key) |
| template<typename Alloc > | |
| void | set_key (const std::vector< uint8_t, Alloc > &key) |
| void | set_key (const uint8_t key[], size_t length) |
| void | start (const uint8_t nonce[], size_t len) |
| void | update (const uint8_t in[], size_t len) |
| void | update_associated_data (const uint8_t ad[], size_t len) |
| bool | valid_keylength (size_t length) const |
Protected Member Functions | |
| void | verify_key_set (bool cond) const |
GCM's GHASH This is not intended for general use, but is exposed to allow shared code between GCM and GMAC
| void Botan::GHASH::add_final_block | ( | secure_vector< uint8_t > & | x, |
| size_t | ad_len, | ||
| size_t | pt_len | ||
| ) |
Definition at line 197 of file ghash.cpp.
References ghash_update().
Referenced by final(), and nonce_hash().
|
overridevirtual |
Reset the state.
Implements Botan::SymmetricAlgorithm.
Definition at line 229 of file ghash.cpp.
References reset(), and Botan::zap().
|
inline |
| void Botan::GHASH::final | ( | uint8_t | out[], |
| size_t | out_len | ||
| ) |
Definition at line 209 of file ghash.cpp.
References add_final_block(), and BOTAN_ARG_CHECK.
| void Botan::GHASH::ghash_update | ( | secure_vector< uint8_t > & | x, |
| const uint8_t | input[], | ||
| size_t | input_len | ||
| ) |
Definition at line 96 of file ghash.cpp.
References Botan::copy_mem(), Botan::secure_scrub_memory(), and Botan::SymmetricAlgorithm::verify_key_set().
Referenced by add_final_block(), nonce_hash(), set_associated_data(), update(), and update_associated_data().
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
|
inlineinherited |
Definition at line 38 of file sym_algo.h.
|
inlineinherited |
Definition at line 46 of file sym_algo.h.
Referenced by botan_block_cipher_get_keyspec(), and botan_mac_get_keyspec().
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
|
inline |
Definition at line 28 of file ghash.h.
| void Botan::GHASH::nonce_hash | ( | secure_vector< uint8_t > & | y0, |
| const uint8_t | nonce[], | ||
| size_t | len | ||
| ) |
Definition at line 221 of file ghash.cpp.
References add_final_block(), BOTAN_ASSERT, and ghash_update().
| std::string Botan::GHASH::provider | ( | ) | const |
| void Botan::GHASH::reset | ( | ) |
| void Botan::GHASH::set_associated_data | ( | const uint8_t | ad[], |
| size_t | ad_len | ||
| ) |
Definition at line 172 of file ghash.cpp.
References ghash_update(), and Botan::zeroise().
|
inlineinherited |
Set the symmetric key of this object.
| key | the SymmetricKey to be set. |
Definition at line 65 of file sym_algo.h.
References Botan::OctetString::begin(), and Botan::OctetString::length().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), botan_block_cipher_set_key(), botan_cipher_set_key(), botan_mac_set_key(), 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(), and Botan::Sodium::randombytes_buf_deterministic().
|
inlineinherited |
Definition at line 71 of file sym_algo.h.
|
inherited |
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 17 of file sym_algo.cpp.
References Botan::SymmetricAlgorithm::name(), and Botan::SymmetricAlgorithm::valid_keylength().
| void Botan::GHASH::start | ( | const uint8_t | nonce[], |
| size_t | len | ||
| ) |
| void Botan::GHASH::update | ( | const uint8_t | in[], |
| size_t | len | ||
| ) |
Definition at line 190 of file ghash.cpp.
References ghash_update(), and Botan::SymmetricAlgorithm::verify_key_set().
| void Botan::GHASH::update_associated_data | ( | const uint8_t | ad[], |
| size_t | len | ||
| ) |
Definition at line 183 of file ghash.cpp.
References ghash_update(), and Botan::SymmetricAlgorithm::verify_key_set().
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
| length | the key length to be checked. |
Definition at line 56 of file sym_algo.h.
Referenced by Botan::aont_package(), Botan::aont_unpackage(), and Botan::SymmetricAlgorithm::set_key().
|
inlineprotectedinherited |
Definition at line 89 of file sym_algo.h.
Referenced by Botan::Salsa20::cipher(), Botan::CTR_BE::cipher(), Botan::RC4::cipher(), Botan::SHAKE_128_Cipher::cipher(), Botan::ChaCha::cipher(), Botan::SHACAL2::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::AES_128::decrypt_n(), Botan::KASUMI::decrypt_n(), Botan::Noekeon::decrypt_n(), Botan::CAST_256::decrypt_n(), Botan::SM4::decrypt_n(), Botan::DES::decrypt_n(), Botan::DESX::decrypt_n(), Botan::XTEA::decrypt_n(), Botan::Camellia_128::decrypt_n(), Botan::IDEA::decrypt_n(), Botan::CAST_128::decrypt_n(), Botan::MISTY1::decrypt_n(), Botan::SEED::decrypt_n(), Botan::Blowfish::decrypt_n(), Botan::Serpent::decrypt_n(), Botan::Threefish_512::decrypt_n(), Botan::Lion::decrypt_n(), Botan::ARIA_128::decrypt_n(), Botan::Camellia_192::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::ARIA_192::decrypt_n(), Botan::Camellia_256::decrypt_n(), Botan::GOST_28147_89::decrypt_n(), Botan::AES_192::decrypt_n(), Botan::ARIA_256::decrypt_n(), Botan::AES_256::decrypt_n(), Botan::SEED::encrypt_n(), Botan::CAST_256::encrypt_n(), Botan::SHACAL2::encrypt_n(), Botan::SM4::encrypt_n(), Botan::IDEA::encrypt_n(), Botan::KASUMI::encrypt_n(), Botan::AES_128::encrypt_n(), Botan::MISTY1::encrypt_n(), Botan::Noekeon::encrypt_n(), Botan::CAST_128::encrypt_n(), Botan::DES::encrypt_n(), Botan::Blowfish::encrypt_n(), Botan::Twofish::encrypt_n(), Botan::Camellia_128::encrypt_n(), Botan::XTEA::encrypt_n(), Botan::DESX::encrypt_n(), Botan::Threefish_512::encrypt_n(), Botan::Serpent::encrypt_n(), Botan::Lion::encrypt_n(), Botan::ARIA_128::encrypt_n(), Botan::Camellia_192::encrypt_n(), Botan::TripleDES::encrypt_n(), Botan::ARIA_192::encrypt_n(), Botan::Camellia_256::encrypt_n(), Botan::GOST_28147_89::encrypt_n(), Botan::AES_192::encrypt_n(), Botan::ARIA_256::encrypt_n(), Botan::AES_256::encrypt_n(), Botan::OCB_Encryption::finish(), Botan::OCB_Decryption::finish(), ghash_update(), Botan::CFB_Encryption::process(), Botan::CFB_Decryption::process(), Botan::Salsa20::seek(), Botan::CTR_BE::seek(), Botan::ChaCha::seek(), Botan::OCB_Mode::set_associated_data(), Botan::Salsa20::set_iv(), Botan::ChaCha::set_iv(), update(), update_associated_data(), and Botan::ChaCha::write_keystream().
1.8.9.1