aboutsummaryrefslogtreecommitdiffstats
path: root/src/cipher/serpent_ia32/serp_ia32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cipher/serpent_ia32/serp_ia32.h')
-rw-r--r--src/cipher/serpent_ia32/serp_ia32.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cipher/serpent_ia32/serp_ia32.h b/src/cipher/serpent_ia32/serp_ia32.h
new file mode 100644
index 000000000..26f870188
--- /dev/null
+++ b/src/cipher/serpent_ia32/serp_ia32.h
@@ -0,0 +1,33 @@
+/*************************************************
+* Serpent (IA-32) Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_SERPENT_IA32_H__
+#define BOTAN_SERPENT_IA32_H__
+
+#include <botan/base.h>
+
+namespace Botan {
+
+/*************************************************
+* Serpent *
+*************************************************/
+class BOTAN_DLL Serpent_IA32 : public BlockCipher
+ {
+ public:
+ void clear() throw() { round_key.clear(); }
+ std::string name() const { return "Serpent"; }
+ BlockCipher* clone() const { return new Serpent_IA32; }
+ Serpent_IA32() : 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