|
Botan
1.11.4
|
#include <eax.h>
Public Member Functions | |
| void | clear () |
| EAX_Decryption (BlockCipher *cipher, size_t tag_size=16) | |
| void | finish (secure_vector< byte > &final_block, size_t offset) override |
| Key_Length_Specification | key_spec () const override |
| size_t | maximum_keylength () const |
| size_t | minimum_final_size () const override |
| size_t | minimum_keylength () const |
| std::string | name () const override |
| size_t | output_length (size_t input_length) const override |
| void | set_associated_data (const byte ad[], size_t ad_len) override |
| template<typename Alloc > | |
| void | set_associated_data_vec (const std::vector< byte, Alloc > &ad) |
| void | set_key (const SymmetricKey &key) |
| void | set_key (const byte key[], size_t length) |
| secure_vector< byte > | start (const byte nonce[], size_t nonce_len) override |
| template<typename Alloc > | |
| secure_vector< byte > | start_vec (const std::vector< byte, Alloc > &nonce) |
| void | update (secure_vector< byte > &blocks, size_t offset) override |
| size_t | update_granularity () const |
| bool | valid_keylength (size_t length) const |
| bool | valid_nonce_length (size_t) const override |
Protected Member Functions | |
| size_t | block_size () const |
| void | key_schedule (const byte key[], size_t length) override |
| size_t | tag_size () const |
Protected Attributes | |
| secure_vector< byte > | m_ad_mac |
| std::unique_ptr< BlockCipher > | m_cipher |
| std::unique_ptr < MessageAuthenticationCode > | m_cmac |
| std::unique_ptr< StreamCipher > | m_ctr |
| secure_vector< byte > | m_nonce_mac |
| size_t | m_tag_size |
|
inline |
|
inlineprotectedinherited |
Definition at line 50 of file eax.h.
Referenced by Botan::EAX_Mode::key_schedule(), Botan::EAX_Mode::set_associated_data(), and Botan::EAX_Mode::start().
|
virtualinherited |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 48 of file eax.cpp.
References Botan::EAX_Mode::m_ad_mac, Botan::EAX_Mode::m_cipher, Botan::EAX_Mode::m_cmac, Botan::EAX_Mode::m_ctr, Botan::EAX_Mode::m_nonce_mac, and Botan::zeroise().
|
overridevirtual |
Complete processing of a message. For decryption, may throw an exception due to authentication failure.
| final_block | in/out parameter which must be at least minimum_final_size() bytes, and will be set to any final output |
| offset | an offset into final_block to begin processing |
Implements Botan::AEAD_Mode.
Definition at line 142 of file eax.cpp.
References BOTAN_ASSERT, Botan::EAX_Mode::m_ad_mac, Botan::EAX_Mode::m_cmac, Botan::EAX_Mode::m_ctr, Botan::EAX_Mode::m_nonce_mac, Botan::same_mem(), and Botan::EAX_Mode::tag_size().
|
overrideprotectedvirtualinherited |
Run the key schedule
| key | the key |
| length | of key |
Implements Botan::SymmetricAlgorithm.
Definition at line 75 of file eax.cpp.
References Botan::EAX_Mode::block_size(), Botan::EAX_Mode::m_ad_mac, Botan::EAX_Mode::m_cmac, and Botan::EAX_Mode::m_ctr.
|
overridevirtualinherited |
Implements Botan::SymmetricAlgorithm.
Definition at line 67 of file eax.cpp.
References Botan::EAX_Mode::m_cipher.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
References Botan::Key_Length_Specification::maximum_keylength().
Referenced by Botan::PBE_PKCS5v20::PBE_PKCS5v20(), and Botan::time_algorithm_ops().
|
inlineoverridevirtual |
Implements Botan::AEAD_Mode.
Definition at line 105 of file eax.h.
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
|
overridevirtualinherited |
Implements Botan::Algorithm.
Definition at line 57 of file eax.cpp.
References Botan::EAX_Mode::m_cipher.
Referenced by Botan::EAX_Mode::EAX_Mode(), and Botan::EAX_Mode::start().
|
inlineoverridevirtual |
Returns the size of the output if this mode is used to process a message with input_length bytes. Typically this will be input_length plus or minus the length of the tag.
Implements Botan::AEAD_Mode.
Definition at line 99 of file eax.h.
References BOTAN_ASSERT.
|
overridevirtualinherited |
Unless reset by another call, the associated data is kept between messages. Thus, if the AD does not change, calling once (after set_key) is the optimum.
| ad | the associated data |
| ad_len | length of add in bytes |
Implements Botan::AEAD_Mode.
Definition at line 90 of file eax.cpp.
References Botan::EAX_Mode::block_size(), Botan::EAX_Mode::m_ad_mac, and Botan::EAX_Mode::m_cmac.
|
inlineinherited |
Definition at line 63 of file aead.h.
References Botan::AEAD_Mode::set_associated_data().
|
inlineinherited |
Set the symmetric key of this object.
| key | the SymmetricKey to be set. |
Definition at line 60 of file sym_algo.h.
References Botan::OctetString::begin(), Botan::OctetString::length(), and Botan::SymmetricAlgorithm::set_key().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::Lion::decrypt_n(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), Botan::Lion::encrypt_n(), Botan::HMAC_RNG::HMAC_RNG(), Botan::PKCS5_PBKDF2::key_derivation(), Botan::MAC_Filter::MAC_Filter(), Botan::HMAC_RNG::reseed(), Botan::XTS_Encryption::set_key(), Botan::XTS_Decryption::set_key(), Botan::SymmetricAlgorithm::set_key(), Botan::StreamCipher_Filter::StreamCipher_Filter(), and Botan::time_algorithm_ops().
|
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 68 of file sym_algo.h.
|
overridevirtualinherited |
Begin processing a message.
| nonce | the per message nonce |
| nonce_len | length of nonce |
Implements Botan::AEAD_Mode.
Definition at line 95 of file eax.cpp.
References Botan::EAX_Mode::block_size(), Botan::EAX_Mode::m_cmac, Botan::EAX_Mode::m_ctr, Botan::EAX_Mode::m_nonce_mac, Botan::EAX_Mode::name(), and Botan::EAX_Mode::valid_nonce_length().
|
inlineinherited |
Definition at line 79 of file aead.h.
References Botan::AEAD_Mode::start().
|
inlineprotectedinherited |
|
overridevirtual |
Update (encrypt or decrypt) some data. Input must be in size update_granularity() byte blocks.
| blocks | in/out paramter which will possibly be resized |
Implements Botan::AEAD_Mode.
Definition at line 132 of file eax.cpp.
References BOTAN_ASSERT, Botan::EAX_Mode::m_cmac, and Botan::EAX_Mode::m_ctr.
|
virtualinherited |
Implements Botan::AEAD_Mode.
Definition at line 62 of file eax.cpp.
References Botan::EAX_Mode::m_cipher.
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
| length | the key length to be checked. |
Definition at line 51 of file sym_algo.h.
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::HMAC_RNG::HMAC_RNG(), Botan::Lion::Lion(), and Botan::Randpool::Randpool().
|
inlineoverridevirtualinherited |
Implements Botan::AEAD_Mode.
Definition at line 36 of file eax.h.
Referenced by Botan::EAX_Mode::start().
|
protectedinherited |
Definition at line 58 of file eax.h.
Referenced by Botan::EAX_Mode::clear(), Botan::EAX_Encryption::finish(), finish(), Botan::EAX_Mode::key_schedule(), and Botan::EAX_Mode::set_associated_data().
|
protectedinherited |
Definition at line 54 of file eax.h.
Referenced by Botan::EAX_Mode::clear(), Botan::EAX_Mode::key_spec(), Botan::EAX_Mode::name(), and Botan::EAX_Mode::update_granularity().
|
protectedinherited |
Definition at line 56 of file eax.h.
Referenced by Botan::EAX_Mode::clear(), Botan::EAX_Mode::EAX_Mode(), Botan::EAX_Encryption::finish(), finish(), Botan::EAX_Mode::key_schedule(), Botan::EAX_Mode::set_associated_data(), Botan::EAX_Mode::start(), Botan::EAX_Encryption::update(), and update().
|
protectedinherited |
Definition at line 55 of file eax.h.
Referenced by Botan::EAX_Mode::clear(), finish(), Botan::EAX_Mode::key_schedule(), Botan::EAX_Mode::start(), Botan::EAX_Encryption::update(), and update().
|
protectedinherited |
Definition at line 60 of file eax.h.
Referenced by Botan::EAX_Mode::clear(), Botan::EAX_Encryption::finish(), finish(), and Botan::EAX_Mode::start().
1.8.3.1