aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/lubyrack/lubyrack.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-08 19:46:52 +0000
committerlloyd <[email protected]>2008-11-08 19:46:52 +0000
commitf1c459725da56fd8ed5766e7779300182fa26bcf (patch)
tree32295cec92df1155563ae8a535dc695d6800d7f6 /src/block/lubyrack/lubyrack.h
parent8dba7b5264403e781bbb86ff61850e4377dca7b9 (diff)
Split ciphers into block and stream ciphers. Move base class headers
Diffstat (limited to 'src/block/lubyrack/lubyrack.h')
-rw-r--r--src/block/lubyrack/lubyrack.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h
new file mode 100644
index 000000000..ba5a4d052
--- /dev/null
+++ b/src/block/lubyrack/lubyrack.h
@@ -0,0 +1,36 @@
+/*************************************************
+* Luby-Rackoff Header File *
+* (C) 1999-2008 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_LUBY_RACKOFF_H__
+#define BOTAN_LUBY_RACKOFF_H__
+
+#include <botan/block_cipher.h>
+#include <botan/hash.h>
+
+namespace Botan {
+
+/*************************************************
+* Luby-Rackoff *
+*************************************************/
+class BOTAN_DLL LubyRackoff : public BlockCipher
+ {
+ public:
+ void clear() throw();
+ std::string name() const;
+ BlockCipher* clone() const;
+
+ LubyRackoff(HashFunction* hash);
+ ~LubyRackoff() { delete hash; }
+ private:
+ void enc(const byte[], byte[]) const;
+ void dec(const byte[], byte[]) const;
+ void key(const byte[], u32bit);
+ HashFunction* hash;
+ SecureVector<byte> K1, K2;
+ };
+
+}
+
+#endif