aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ciphers/gost/gost.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ciphers/gost/gost.h')
-rw-r--r--modules/ciphers/gost/gost.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/ciphers/gost/gost.h b/modules/ciphers/gost/gost.h
new file mode 100644
index 000000000..d78e3245f
--- /dev/null
+++ b/modules/ciphers/gost/gost.h
@@ -0,0 +1,38 @@
+/*************************************************
+* GOST Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_GOST_H__
+#define BOTAN_GOST_H__
+
+#include <botan/base.h>
+
+namespace Botan {
+
+/*************************************************
+* GOST *
+*************************************************/
+class BOTAN_DLL GOST : public BlockCipher
+ {
+ public:
+ void clear() throw() { EK.clear(); }
+ std::string name() const { return "GOST"; }
+ BlockCipher* clone() const { return new GOST; }
+ GOST() : BlockCipher(8, 32) {}
+ private:
+ void enc(const byte[], byte[]) const;
+ void dec(const byte[], byte[]) const;
+ void key(const byte[], u32bit);
+
+ static const u32bit SBOX1[256];
+ static const u32bit SBOX2[256];
+ static const u32bit SBOX3[256];
+ static const u32bit SBOX4[256];
+
+ SecureBuffer<u32bit, 32> EK;
+ };
+
+}
+
+#endif