Botan: src/block/misty1/misty1.h Source File

Botan 1.10.17

misty1.h
Go to the documentation of this file.
1 /*
2 * MISTY1
3 * (C) 1999-2008 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_MISTY1_H__
9 #define BOTAN_MISTY1_H__
10
11 #include <botan/block_cipher.h>
12
13 namespace Botan {
14
15 /**
16 * MISTY1
17 */
18 class BOTAN_DLL MISTY1 : public Block_Cipher_Fixed_Params<8, 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() { zeroise(EK); zeroise(DK); }
25 std::string name() const { return "MISTY1"; }
26 BlockCipher* clone() const { return new MISTY1; }
27
28 /**
29 * @param rounds the number of rounds. Must be 8 with the current
30 * implementation
31 */
32 MISTY1(size_t rounds = 8);
33 private:
34 void key_schedule(const byte[], size_t);
35
36 SecureVector<u16bit> EK, DK;
37 };
38
39 }
40
41 #endif
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::MISTY1
Definition: misty1.h:18
Botan::MISTY1::clear
void clear()
Definition: misty1.h:24
Botan
Definition: algo_base.h:14
Botan::SecureVector< u16bit >
Botan::Block_Cipher_Fixed_Params
Definition: block_cipher.h:104
Botan::MISTY1::clone
BlockCipher * clone() const
Definition: misty1.h:26
Botan::MISTY1::name
std::string name() const
Definition: misty1.h:25
Botan::zeroise
void zeroise(MemoryRegion< T > &vec)
Definition: secmem.h:428
Botan::BlockCipher
Definition: block_cipher.h:18