8 #include <botan/cascade.h>
32 void Cascade_Cipher::key_schedule(
const byte key[],
size_t)
48 return "Cascade(" + cipher1->
name() +
"," + cipher2->
name() +
")";
59 size_t euclids_algorithm(
size_t a,
size_t b)
71 size_t block_size_for_cascade(
size_t bs,
size_t bs2)
76 size_t gcd = euclids_algorithm(bs, bs2);
78 return (bs * bs2) /
gcd;
84 cipher1(c1), cipher2(c2)
size_t block_size() const
BigInt gcd(const BigInt &a, const BigInt &b)
void decrypt_n(const byte in[], byte out[], size_t blocks) const
virtual BlockCipher * clone() const =0
void encrypt_n(const byte in[], byte out[], size_t blocks) const
void set_key(const SymmetricKey &key)
virtual std::string name() const =0
Cascade_Cipher(BlockCipher *cipher1, BlockCipher *cipher2)
virtual void encrypt_n(const byte in[], byte out[], size_t blocks) const =0
size_t maximum_keylength() const
virtual void decrypt_n(const byte in[], byte out[], size_t blocks) const =0
virtual size_t block_size() const =0
BlockCipher * clone() const