Botan
2.1.0
Crypto and TLS for C++11
|
#include <gcm.h>
Public Member Functions | |
void | clear () override |
secure_vector< uint8_t > | final () |
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 len) |
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) |
bool | valid_keylength (size_t length) const |
Protected Member Functions | |
void | add_final_block (secure_vector< uint8_t > &x, size_t ad_len, size_t pt_len) |
void | ghash_update (secure_vector< uint8_t > &x, const uint8_t input[], size_t input_len) |
Protected Attributes | |
size_t | m_ad_len = 0 |
secure_vector< uint8_t > | m_ghash |
secure_vector< uint8_t > | m_H |
secure_vector< uint8_t > | m_H_ad |
|
protected |
Definition at line 120 of file gcm.cpp.
References ghash_update().
Referenced by final(), and nonce_hash().
|
overridevirtual |
Reset the state.
Implements Botan::SymmetricAlgorithm.
Definition at line 151 of file gcm.cpp.
References m_H, reset(), and Botan::zeroise().
Referenced by Botan::GMAC::clear().
secure_vector< uint8_t > Botan::GHASH::final | ( | ) |
Definition at line 128 of file gcm.cpp.
References add_final_block(), m_ad_len, and m_ghash.
|
protected |
Definition at line 69 of file gcm.cpp.
References Botan::CT::min(), and Botan::xor_buf().
Referenced by add_final_block(), nonce_hash(), set_associated_data(), and update().
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
|
inlineinherited |
Definition at line 39 of file sym_algo.h.
|
inlineinherited |
Definition at line 47 of file sym_algo.h.
|
inlineoverridevirtual |
Implements Botan::SymmetricAlgorithm.
secure_vector< uint8_t > Botan::GHASH::nonce_hash | ( | const uint8_t | nonce[], |
size_t | len | ||
) |
Definition at line 140 of file gcm.cpp.
References add_final_block(), BOTAN_ASSERT, ghash_update(), and m_ghash.
void Botan::GHASH::reset | ( | ) |
void Botan::GHASH::set_associated_data | ( | const uint8_t | ad[], |
size_t | ad_len | ||
) |
Definition at line 103 of file gcm.cpp.
References ghash_update(), m_ad_len, m_H_ad, and Botan::zeroise().
|
inlineinherited |
Set the symmetric key of this object.
key | the SymmetricKey to be set. |
Definition at line 66 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_mac_set_key(), and Botan::pbkdf2().
|
inlineinherited |
Definition at line 72 of file sym_algo.h.
|
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 82 of file sym_algo.h.
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 111 of file gcm.cpp.
References BOTAN_ASSERT, ghash_update(), and m_ghash.
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
length | the key length to be checked. |
Definition at line 57 of file sym_algo.h.
Referenced by Botan::aont_package(), and Botan::aont_unpackage().
|
protected |
Definition at line 147 of file gcm.h.
Referenced by final(), reset(), and set_associated_data().
|
protected |
Definition at line 146 of file gcm.h.
Referenced by Botan::GMAC::clear(), final(), nonce_hash(), reset(), start(), and update().
|
protected |
Definition at line 144 of file gcm.h.
Referenced by Botan::GMAC::clear(), and clear().
|
protected |
Definition at line 145 of file gcm.h.
Referenced by Botan::GMAC::clear(), reset(), set_associated_data(), and start().