diff options
author | lloyd <[email protected]> | 2008-07-11 18:22:13 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-07-11 18:22:13 +0000 |
commit | 666f27c1c7a186bc53bfa3391f48e9c6821e0333 (patch) | |
tree | 438370b3e6b5f746889dbe04d387f5cebea0beb5 /include | |
parent | 7efb1b1ce852c16cfab8f0fc9ec43ccf20a48775 (diff) |
Add the block cipher Noekeon (http://gro.noekeon.org/). Only "indirect mode"
keying is supported (see section 2.3 of the specification for details)
Diffstat (limited to 'include')
-rw-r--r-- | include/noekeon.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/noekeon.h b/include/noekeon.h new file mode 100644 index 000000000..660ab487a --- /dev/null +++ b/include/noekeon.h @@ -0,0 +1,35 @@ +/************************************************* +* Noekeon Header File * +* (C) 1999-2008 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_NOEKEON_H__ +#define BOTAN_NOEKEON_H__ + +#include <botan/base.h> + +namespace Botan { + +/************************************************* +* Noekeon * +*************************************************/ +class BOTAN_DLL Noekeon : public BlockCipher + { + public: + void clear() throw(); + std::string name() const { return "Noekeon"; } + BlockCipher* clone() const { return new Noekeon; } + Noekeon() : BlockCipher(16, 16) {} + private: + void enc(const byte[], byte[]) const; + void dec(const byte[], byte[]) const; + void key(const byte[], u32bit); + + static const byte RC[17]; + + SecureBuffer<u32bit, 4> EK, DK; + }; + +} + +#endif |