Botan
1.10.9
|
#include <ssl3_mac.h>
Public Member Functions | |
void | clear () |
MessageAuthenticationCode * | clone () const |
void | final (byte out[]) |
SecureVector< byte > | final () |
Key_Length_Specification | key_spec () const |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
std::string | name () const |
size_t | output_length () const |
SecureVector< byte > | process (const byte in[], size_t length) |
SecureVector< byte > | process (const MemoryRegion< byte > &in) |
SecureVector< byte > | process (const std::string &in) |
void | set_key (const SymmetricKey &key) |
void | set_key (const byte key[], size_t length) |
SSL3_MAC (HashFunction *hash) | |
void | update (const byte in[], size_t length) |
void | update (const MemoryRegion< byte > &in) |
void | update (const std::string &str) |
void | update (byte in) |
template<typename T > | |
void | update_be (const T in) |
bool | valid_keylength (size_t length) const |
virtual bool | verify_mac (const byte in[], size_t length) |
~SSL3_MAC () | |
A MAC only used in SSLv3. Do not use elsewhere! Use HMAC instead.
Definition at line 19 of file ssl3_mac.h.
Botan::SSL3_MAC::SSL3_MAC | ( | HashFunction * | hash | ) |
hash | the underlying hash to use |
Definition at line 75 of file ssl3_mac.cpp.
References Botan::HashFunction::hash_block_size(), Botan::Algorithm::name(), and Botan::MemoryRegion< T >::resize().
Referenced by clone().
|
inline |
Definition at line 37 of file ssl3_mac.h.
|
virtual |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 49 of file ssl3_mac.cpp.
References Botan::Algorithm::clear(), and Botan::zeroise().
|
virtual |
Get a new object representing the same algorithm as *this
Implements Botan::MessageAuthenticationCode.
Definition at line 67 of file ssl3_mac.cpp.
References Botan::HashFunction::clone(), and SSL3_MAC().
|
inlineinherited |
Complete the computation and retrieve the final result.
out | The byte array to be filled with the result. Must be of length output_length() |
Definition at line 80 of file buf_comp.h.
Referenced by Botan::LubyRackoff::decrypt_n(), Botan::Lion::decrypt_n(), Botan::X942_PRF::derive(), Botan::KDF2::derive(), Botan::KDF1::derive(), Botan::PKCS5_PBKDF2::derive_key(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::EMSA2::EMSA2(), Botan::LubyRackoff::encrypt_n(), Botan::Lion::encrypt_n(), Botan::Hash_Filter::end_msg(), Botan::MAC_Filter::end_msg(), Botan::HandshakeHash::final(), Botan::HandshakeHash::final_ssl3(), Botan::Record_Reader::get_record(), Botan::MGF1::mask(), Botan::EMSA3::raw_data(), Botan::Randpool::reseed(), and Botan::HMAC_RNG::reseed().
|
inlineinherited |
Complete the computation and retrieve the final result.
Definition at line 87 of file buf_comp.h.
|
inlinevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 28 of file ssl3_mac.h.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
|
virtual |
Get the name of this algorithm.
Implements Botan::MessageAuthenticationCode.
Definition at line 59 of file ssl3_mac.cpp.
References Botan::Algorithm::name().
|
inlinevirtual |
Implements Botan::Buffered_Computation.
Definition at line 23 of file ssl3_mac.h.
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a byte array |
length | the length of the byte array |
Definition at line 101 of file buf_comp.h.
Referenced by Botan::Randpool::add_entropy(), Botan::EME1::EME1(), Botan::RTSS_Share::split(), and Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID().
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process |
Definition at line 113 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
|
inlineinherited |
Update and finalize computation. Does the same as calling update() and final() consecutively.
in | the input to process as a string |
Definition at line 125 of file buf_comp.h.
|
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(), and Botan::OctetString::length().
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::Lion::decrypt_n(), Botan::PKCS5_PBKDF2::derive_key(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), Botan::Lion::encrypt_n(), Botan::HMAC_RNG::HMAC_RNG(), Botan::MAC_Filter::MAC_Filter(), Botan::HMAC_RNG::reseed(), Botan::XTS_Encryption::set_key(), Botan::EAX_Base::set_key(), Botan::XTS_Decryption::set_key(), Botan::Record_Writer::set_keys(), Botan::Record_Reader::set_keys(), and Botan::StreamCipher_Filter::StreamCipher_Filter().
|
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.
|
inlineinherited |
Add new input to process.
in | the input to process as a byte array |
length | of param in in bytes |
Definition at line 33 of file buf_comp.h.
Referenced by Botan::HMAC_RNG::add_entropy(), Botan::Comb4P::clear(), Botan::LubyRackoff::decrypt_n(), Botan::Lion::decrypt_n(), Botan::X942_PRF::derive(), Botan::KDF2::derive(), Botan::KDF1::derive(), Botan::PKCS5_PBKDF2::derive_key(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::LubyRackoff::encrypt_n(), Botan::Lion::encrypt_n(), Botan::HandshakeHash::final(), Botan::HandshakeHash::final_ssl3(), Botan::Record_Reader::get_record(), Botan::MGF1::mask(), Botan::HMAC_RNG::reseed(), Botan::EAX_Base::start_msg(), and Botan::EMSA3::update().
|
inlineinherited |
Add new input to process.
in | the input to process as a MemoryRegion |
Definition at line 39 of file buf_comp.h.
References Botan::MemoryRegion< T >::size().
|
inlineinherited |
Add new input to process.
str | the input to process as a std::string. Will be interpreted as a byte array based on the strings encoding. |
Definition at line 63 of file buf_comp.h.
|
inlineinherited |
|
inlineinherited |
Add an integer in big-endian order
in | the value |
Definition at line 48 of file buf_comp.h.
References Botan::get_byte().
Referenced by Botan::KDF2::derive(), Botan::PKCS5_PBKDF2::derive_key(), Botan::Record_Reader::get_record(), and Botan::MGF1::mask().
|
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(), Botan::Randpool::Randpool(), and Botan::EAX_Base::valid_keylength().
|
virtualinherited |
Verify a MAC.
in | the MAC to verify as a byte array |
length | the length of param in |
Definition at line 16 of file mac.cpp.
References Botan::same_mem(), and Botan::MemoryRegion< T >::size().