diff options
author | lloyd <[email protected]> | 2006-08-15 02:50:07 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-08-15 02:50:07 +0000 |
commit | eecf528cfc88b516bcff904f47226f5103ef2043 (patch) | |
tree | 3479a843de6bcbeb78fc533e40b4e6426f7290e6 /modules/alg_ia32/serpent.h | |
parent | 2ef993044a5e3b972f910995cfbeea5775b7ce6a (diff) |
Implement decryption in the Serpent assembly code
Diffstat (limited to 'modules/alg_ia32/serpent.h')
-rw-r--r-- | modules/alg_ia32/serpent.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/alg_ia32/serpent.h b/modules/alg_ia32/serpent.h new file mode 100644 index 000000000..85e0345d0 --- /dev/null +++ b/modules/alg_ia32/serpent.h @@ -0,0 +1,33 @@ +/************************************************* +* Serpent Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_SERPENT_H__ +#define BOTAN_SERPENT_H__ + +#include <botan/base.h> + +namespace Botan { + +/************************************************* +* Serpent * +*************************************************/ +class Serpent : public BlockCipher + { + public: + void clear() throw() { round_key.clear(); } + std::string name() const { return "Serpent"; } + BlockCipher* clone() const { return new Serpent; } + Serpent() : BlockCipher(16, 16, 32, 8) {} + private: + void enc(const byte[], byte[]) const; + void dec(const byte[], byte[]) const; + void key(const byte[], u32bit); + + SecureBuffer<u32bit, 132> round_key; + }; + +} + +#endif |