Botan 1.10.17

noekeon.h
Go to the documentation of this file.
1 /*
2 * Noekeon
3 * (C) 1999-2008 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_NOEKEON_H__
9 #define BOTAN_NOEKEON_H__
10
11 #include <botan/block_cipher.h>
12
13 namespace Botan {
14
15 /**
16 * Noekeon
17 */
18 class BOTAN_DLL Noekeon : public Block_Cipher_Fixed_Params<16, 16>
19 {
20 public:
21 void encrypt_n(const byte in[], byte out[], size_t blocks) const;
22 void decrypt_n(const byte in[], byte out[], size_t blocks) const;
23
24 void clear();
25 std::string name() const { return "Noekeon"; }
26 BlockCipher* clone() const { return new Noekeon; }
27
28 Noekeon() : EK(4), DK(4) {}
29 protected:
30 /**
31 * The Noekeon round constants
32 */
33 static const byte RC[17];
34
35 /**
36 * @return const reference to encryption subkeys
37 */
38 const SecureVector<u32bit>& get_EK() const { return EK; }
39
40 /**
41 * @return const reference to decryption subkeys
42 */
43 const SecureVector<u32bit>& get_DK() const { return DK; }
44
45 private:
46 void key_schedule(const byte[], size_t);
47 SecureVector<u32bit> EK, DK;
48 };
49
50 }
51
52 #endif
Botan::Noekeon::name
std::string name() const
Definition: noekeon.h:25
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::Noekeon::clone
BlockCipher * clone() const
Definition: noekeon.h:26
Botan::Noekeon::Noekeon
Noekeon()
Definition: noekeon.h:28
Botan
Definition: algo_base.h:14
Botan::Noekeon::get_DK
const SecureVector< u32bit > & get_DK() const
Definition: noekeon.h:43
Botan::SecureVector< u32bit >
Botan::Block_Cipher_Fixed_Params
Definition: block_cipher.h:104
Botan::Noekeon::get_EK
const SecureVector< u32bit > & get_EK() const
Definition: noekeon.h:38
Botan::Noekeon
Definition: noekeon.h:18
Botan::BlockCipher
Definition: block_cipher.h:18