Botan
1.10.9
|
#include <lion.h>
Public Member Functions | |
size_t | block_size () const |
void | clear () |
BlockCipher * | clone () const |
void | decrypt (const byte in[], byte out[]) const |
void | decrypt (byte block[]) const |
void | decrypt_n (const byte in[], byte out[], size_t blocks) const |
void | encrypt (const byte in[], byte out[]) const |
void | encrypt (byte block[]) const |
void | encrypt_n (const byte in[], byte out[], size_t blocks) const |
Key_Length_Specification | key_spec () const |
Lion (HashFunction *hash, StreamCipher *cipher, size_t block_size) | |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
std::string | name () const |
size_t | parallel_bytes () const |
virtual size_t | parallelism () const |
void | set_key (const SymmetricKey &key) |
void | set_key (const byte key[], size_t length) |
bool | valid_keylength (size_t length) const |
~Lion () | |
Lion is a block cipher construction designed by Ross Anderson and Eli Biham, described in "Two Practical and Provably Secure Block Ciphers: BEAR and LION". It has a variable block size and is designed to encrypt very large blocks (up to a megabyte)
Botan::Lion::Lion | ( | HashFunction * | hash, |
StreamCipher * | cipher, | ||
size_t | block_size | ||
) |
hash | the hash to use internally |
cipher | the stream cipher to use internally |
block_size | the size of the block to use |
Definition at line 111 of file lion.cpp.
References name(), Botan::MemoryRegion< T >::resize(), and Botan::SymmetricAlgorithm::valid_keylength().
Referenced by clone().
|
inline |
|
inlinevirtual |
Implements Botan::BlockCipher.
|
virtual |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 100 of file lion.cpp.
References Botan::Algorithm::clear(), and Botan::zeroise().
|
virtual |
Get a new object representing the same algorithm as *this
Implements Botan::BlockCipher.
Definition at line 92 of file lion.cpp.
References Botan::HashFunction::clone(), Botan::StreamCipher::clone(), and Lion().
Decrypt a block.
in | The ciphertext block to be decypted as a byte array. Must be of length block_size(). |
out | The byte array designated to hold the decrypted block. Must be of length block_size(). |
Definition at line 57 of file block_cipher.h.
Referenced by Botan::DESX::decrypt_n().
|
inlineinherited |
Decrypt a block.
block | the ciphertext block to be decrypted Must be of length block_size(). Will hold the result when the function has finished. |
Definition at line 74 of file block_cipher.h.
Decrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
blocks | the number of blocks to process |
Implements Botan::BlockCipher.
Definition at line 44 of file lion.cpp.
References Botan::StreamCipher::cipher(), Botan::StreamCipher::cipher1(), Botan::Buffered_Computation::final(), Botan::SymmetricAlgorithm::set_key(), Botan::Buffered_Computation::update(), and Botan::xor_buf().
Encrypt a block.
in | The plaintext block to be encrypted as a byte array. Must be of length block_size(). |
out | The byte array designated to hold the encrypted block. Must be of length block_size(). |
Definition at line 47 of file block_cipher.h.
Referenced by Botan::aont_package(), Botan::aont_unpackage(), Botan::OFB::cipher(), Botan::DESX::encrypt_n(), Botan::CFB_Encryption::set_iv(), Botan::OFB::set_iv(), Botan::XTS_Encryption::set_iv(), Botan::CFB_Decryption::set_iv(), and Botan::XTS_Decryption::set_iv().
|
inlineinherited |
Encrypt a block.
block | the plaintext block to be encrypted Must be of length block_size(). Will hold the result when the function has finished. |
Definition at line 66 of file block_cipher.h.
Encrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
blocks | the number of blocks to process |
Implements Botan::BlockCipher.
Definition at line 17 of file lion.cpp.
References Botan::StreamCipher::cipher(), Botan::StreamCipher::cipher1(), Botan::Buffered_Computation::final(), Botan::SymmetricAlgorithm::set_key(), Botan::Buffered_Computation::update(), and Botan::xor_buf().
|
inlinevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 33 of file lion.h.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
|
virtual |
Implements Botan::Algorithm.
Definition at line 82 of file lion.cpp.
References Botan::Algorithm::name(), and Botan::to_string().
Referenced by Lion().
|
inlineinherited |
Definition at line 35 of file block_cipher.h.
References block_size.
|
inlinevirtualinherited |
Reimplemented in Botan::AES_256_NI, Botan::AES_192_NI, Botan::AES_128_NI, Botan::IDEA_SSE2, Botan::Noekeon_SIMD, Botan::Serpent_SIMD, and Botan::XTEA_SIMD.
Definition at line 30 of file block_cipher.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(), decrypt_n(), Botan::PKCS5_PBKDF2::derive_key(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), 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 |
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(), Lion(), Botan::Randpool::Randpool(), and Botan::EAX_Base::valid_keylength().