aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 16:45:45 +0000
committerlloyd <[email protected]>2008-09-28 16:45:45 +0000
commitae478c48af11cf4e148dddfb4b748d56d311ca67 (patch)
tree5387bd630455c3f5567a67f2ac1e2c1b01fc37ea /include
parent4a04f965bd43bd591c8973ed025dc312823f1607 (diff)
Modularize all ciphers
Diffstat (limited to 'include')
-rw-r--r--include/aes.h74
-rw-r--r--include/arc4.h38
-rw-r--r--include/blowfish.h38
-rw-r--r--include/cast128.h45
-rw-r--r--include/cast256.h42
-rw-r--r--include/des.h89
-rw-r--r--include/gost.h38
-rw-r--r--include/idea.h32
-rw-r--r--include/kasumi.h38
-rw-r--r--include/lion.h36
-rw-r--r--include/lubyrack.h35
-rw-r--r--include/mars.h36
-rw-r--r--include/misty1.h39
-rw-r--r--include/noekeon.h35
-rw-r--r--include/rc2.h35
-rw-r--r--include/rc5.h33
-rw-r--r--include/rc6.h33
-rw-r--r--include/safer_sk.h38
-rw-r--r--include/salsa20.h39
-rw-r--r--include/seed.h41
-rw-r--r--include/serpent.h33
-rw-r--r--include/skipjack.h36
-rw-r--r--include/square.h50
-rw-r--r--include/tea.h32
-rw-r--r--include/turing.h46
-rw-r--r--include/twofish.h46
-rw-r--r--include/wid_wake.h39
-rw-r--r--include/xtea.h32
28 files changed, 0 insertions, 1148 deletions
diff --git a/include/aes.h b/include/aes.h
deleted file mode 100644
index 5b43735ad..000000000
--- a/include/aes.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************
-* AES Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_AES_H__
-#define BOTAN_AES_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* AES *
-*************************************************/
-class BOTAN_DLL AES : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "AES"; }
- BlockCipher* clone() const { return new AES; }
- AES() : BlockCipher(16, 16, 32, 8) { ROUNDS = 14; }
- AES(u32bit);
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- static u32bit S(u32bit);
-
- static const byte SE[256];
- static const byte SD[256];
- static const u32bit TE[1024];
- static const u32bit TD[1024];
- SecureBuffer<u32bit, 52> EK, DK;
- SecureBuffer<byte, 32> ME, MD;
- u32bit ROUNDS;
- };
-
-/*************************************************
-* AES-128 *
-*************************************************/
-class BOTAN_DLL AES_128 : public AES
- {
- public:
- std::string name() const { return "AES-128"; }
- BlockCipher* clone() const { return new AES_128; }
- AES_128() : AES(16) {}
- };
-
-/*************************************************
-* AES-192 *
-*************************************************/
-class BOTAN_DLL AES_192 : public AES
- {
- public:
- std::string name() const { return "AES-192"; }
- BlockCipher* clone() const { return new AES_192; }
- AES_192() : AES(24) {}
- };
-
-/*************************************************
-* AES-256 *
-*************************************************/
-class BOTAN_DLL AES_256 : public AES
- {
- public:
- std::string name() const { return "AES-256"; }
- BlockCipher* clone() const { return new AES_256; }
- AES_256() : AES(32) {}
- };
-
-}
-
-#endif
diff --git a/include/arc4.h b/include/arc4.h
deleted file mode 100644
index c99691484..000000000
--- a/include/arc4.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************
-* ARC4 Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_ARC4_H__
-#define BOTAN_ARC4_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* ARC4 *
-*************************************************/
-class BOTAN_DLL ARC4 : public StreamCipher
- {
- public:
- void clear() throw();
- std::string name() const;
- StreamCipher* clone() const { return new ARC4(SKIP); }
- ARC4(u32bit = 0);
- ~ARC4() { clear(); }
- private:
- void cipher(const byte[], byte[], u32bit);
- void key(const byte[], u32bit);
- void generate();
-
- const u32bit SKIP;
-
- SecureBuffer<byte, DEFAULT_BUFFERSIZE> buffer;
- SecureBuffer<u32bit, 256> state;
- u32bit X, Y, position;
- };
-
-}
-
-#endif
diff --git a/include/blowfish.h b/include/blowfish.h
deleted file mode 100644
index 79875ba90..000000000
--- a/include/blowfish.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************
-* Blowfish Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_BLOWFISH_H__
-#define BOTAN_BLOWFISH_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Blowfish *
-*************************************************/
-class BOTAN_DLL Blowfish : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "Blowfish"; }
- BlockCipher* clone() const { return new Blowfish; }
- Blowfish() : BlockCipher(8, 1, 56) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- void generate_sbox(u32bit[], u32bit, u32bit&, u32bit&) const;
-
- static const u32bit P_INIT[18];
- static const u32bit S_INIT[1024];
-
- SecureBuffer<u32bit, 1024> S;
- SecureBuffer<u32bit, 18> P;
- };
-
-}
-
-#endif
diff --git a/include/cast128.h b/include/cast128.h
deleted file mode 100644
index 0a7c53864..000000000
--- a/include/cast128.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************
-* CAST-128 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_CAST128_H__
-#define BOTAN_CAST128_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* CAST-128 *
-*************************************************/
-class BOTAN_DLL CAST_128 : public BlockCipher
- {
- public:
- void clear() throw() { MK.clear(); RK.clear(); }
- std::string name() const { return "CAST-128"; }
- BlockCipher* clone() const { return new CAST_128; }
- CAST_128() : BlockCipher(8, 11, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static void key_schedule(u32bit[16], u32bit[4]);
-
- static const u32bit S5[256];
- static const u32bit S6[256];
- static const u32bit S7[256];
- static const u32bit S8[256];
-
- SecureBuffer<u32bit, 16> MK, RK;
- };
-
-extern const u32bit CAST_SBOX1[256];
-extern const u32bit CAST_SBOX2[256];
-extern const u32bit CAST_SBOX3[256];
-extern const u32bit CAST_SBOX4[256];
-
-}
-
-#endif
diff --git a/include/cast256.h b/include/cast256.h
deleted file mode 100644
index d4b7c6b18..000000000
--- a/include/cast256.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*************************************************
-* CAST-256 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_CAST256_H__
-#define BOTAN_CAST256_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* CAST-256 *
-*************************************************/
-class BOTAN_DLL CAST_256 : public BlockCipher
- {
- public:
- void clear() throw() { MK.clear(); RK.clear(); }
- std::string name() const { return "CAST-256"; }
- BlockCipher* clone() const { return new CAST_256; }
- CAST_256() : BlockCipher(16, 4, 32, 4) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static const u32bit KEY_MASK[192];
- static const byte KEY_ROT[32];
-
- SecureBuffer<u32bit, 48> MK;
- SecureBuffer<byte, 48> RK;
- };
-
-extern const u32bit CAST_SBOX1[256];
-extern const u32bit CAST_SBOX2[256];
-extern const u32bit CAST_SBOX3[256];
-extern const u32bit CAST_SBOX4[256];
-
-}
-
-#endif
diff --git a/include/des.h b/include/des.h
deleted file mode 100644
index 3e53a6166..000000000
--- a/include/des.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*************************************************
-* DES Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_DES_H__
-#define BOTAN_DES_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* DES *
-*************************************************/
-class BOTAN_DLL DES : public BlockCipher
- {
- public:
- void clear() throw() { round_key.clear(); }
- std::string name() const { return "DES"; }
- BlockCipher* clone() const { return new DES; }
- DES() : BlockCipher(8, 8) {}
- private:
- friend class TripleDES;
-
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- void raw_encrypt(u32bit&, u32bit&) const;
- void raw_decrypt(u32bit&, u32bit&) const;
- void round(u32bit&, u32bit, u32bit) const;
- static void IP(u32bit&, u32bit&);
- static void FP(u32bit&, u32bit&);
-
- static const u32bit SPBOX1[256];
- static const u32bit SPBOX2[256];
- static const u32bit SPBOX3[256];
- static const u32bit SPBOX4[256];
- static const u32bit SPBOX5[256];
- static const u32bit SPBOX6[256];
- static const u32bit SPBOX7[256];
- static const u32bit SPBOX8[256];
-
- static const u64bit IPTAB1[256];
- static const u64bit IPTAB2[256];
- static const u64bit FPTAB1[256];
- static const u64bit FPTAB2[256];
-
- SecureBuffer<u32bit, 32> round_key;
- };
-
-/*************************************************
-* Triple DES *
-*************************************************/
-class BOTAN_DLL TripleDES : public BlockCipher
- {
- public:
- void clear() throw() { des1.clear(); des2.clear(); des3.clear(); }
- std::string name() const { return "TripleDES"; }
- BlockCipher* clone() const { return new TripleDES; }
- TripleDES() : BlockCipher(8, 16, 24, 8) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- DES des1, des2, des3;
- };
-
-/*************************************************
-* DESX *
-*************************************************/
-class BOTAN_DLL DESX : public BlockCipher
- {
- public:
- void clear() throw() { des.clear(); K1.clear(); K2.clear(); }
- std::string name() const { return "DESX"; }
- BlockCipher* clone() const { return new DESX; }
- DESX() : BlockCipher(8, 24) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- SecureBuffer<byte, 8> K1, K2;
- DES des;
- };
-
-}
-
-#endif
diff --git a/include/gost.h b/include/gost.h
deleted file mode 100644
index d78e3245f..000000000
--- a/include/gost.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************
-* 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
diff --git a/include/idea.h b/include/idea.h
deleted file mode 100644
index 4c5e82aca..000000000
--- a/include/idea.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************
-* IDEA Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_IDEA_H__
-#define BOTAN_IDEA_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* IDEA *
-*************************************************/
-class BOTAN_DLL IDEA : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); DK.clear(); }
- std::string name() const { return "IDEA"; }
- BlockCipher* clone() const { return new IDEA; }
- IDEA() : BlockCipher(8, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- SecureBuffer<u16bit, 52> EK, DK;
- };
-
-}
-
-#endif
diff --git a/include/kasumi.h b/include/kasumi.h
deleted file mode 100644
index 58888d909..000000000
--- a/include/kasumi.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************
-* KASUMI Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_KASUMI_H__
-#define BOTAN_KASUMI_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* KASUMI *
-*************************************************/
-class BOTAN_DLL KASUMI : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); }
- std::string name() const { return "KASUMI"; }
- BlockCipher* clone() const { return new KASUMI; }
-
- KASUMI() : BlockCipher(8, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- SecureBuffer<u16bit, 64> EK;
- };
-
-extern const byte KASUMI_SBOX_S7[128];
-extern const u16bit KASUMI_SBOX_S9[512];
-
-
-}
-
-#endif
diff --git a/include/lion.h b/include/lion.h
deleted file mode 100644
index 70018838a..000000000
--- a/include/lion.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************
-* Lion Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_LION_H__
-#define BOTAN_LION_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Lion *
-*************************************************/
-class BOTAN_DLL Lion : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const;
- BlockCipher* clone() const;
- Lion(const std::string&, const std::string&, u32bit);
- ~Lion() { delete hash; delete cipher; }
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- const u32bit LEFT_SIZE, RIGHT_SIZE;
- HashFunction* hash;
- StreamCipher* cipher;
- SecureVector<byte> key1, key2;
- };
-
-}
-
-#endif
diff --git a/include/lubyrack.h b/include/lubyrack.h
deleted file mode 100644
index 2c4813cb6..000000000
--- a/include/lubyrack.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************
-* Luby-Rackoff Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_LUBY_RACKOFF_H__
-#define BOTAN_LUBY_RACKOFF_H__
-
-#include <botan/base.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
diff --git a/include/mars.h b/include/mars.h
deleted file mode 100644
index 6e1bc9f34..000000000
--- a/include/mars.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************
-* MARS Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_MARS_H__
-#define BOTAN_MARS_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-class BOTAN_DLL MARS : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); }
- std::string name() const { return "MARS"; }
- BlockCipher* clone() const { return new MARS; }
- MARS() : BlockCipher(16, 16, 32, 4) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- void encrypt_round(u32bit&, u32bit&, u32bit&, u32bit&, u32bit) const;
- void decrypt_round(u32bit&, u32bit&, u32bit&, u32bit&, u32bit) const;
- static void forward_mix(u32bit&, u32bit&, u32bit&, u32bit&);
- static void reverse_mix(u32bit&, u32bit&, u32bit&, u32bit&);
-
- static const u32bit SBOX[512];
- SecureBuffer<u32bit, 40> EK;
- };
-
-}
-
-#endif
diff --git a/include/misty1.h b/include/misty1.h
deleted file mode 100644
index 9e506d536..000000000
--- a/include/misty1.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************
-* MISTY1 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_MISTY1_H__
-#define BOTAN_MISTY1_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* MISTY1 *
-*************************************************/
-class BOTAN_DLL MISTY1 : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); DK.clear(); }
- std::string name() const { return "MISTY1"; }
- BlockCipher* clone() const { return new MISTY1; }
- MISTY1(u32bit = 8);
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static const byte EK_ORDER[100];
- static const byte DK_ORDER[100];
- SecureBuffer<u16bit, 100> EK, DK;
- };
-
-extern const byte MISTY1_SBOX_S7[128];
-extern const u16bit MISTY1_SBOX_S9[512];
-
-
-}
-
-#endif
diff --git a/include/noekeon.h b/include/noekeon.h
deleted file mode 100644
index 660ab487a..000000000
--- a/include/noekeon.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************
-* 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
diff --git a/include/rc2.h b/include/rc2.h
deleted file mode 100644
index 8f46821a4..000000000
--- a/include/rc2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************
-* RC2 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_RC2_H__
-#define BOTAN_RC2_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* RC2 *
-*************************************************/
-class BOTAN_DLL RC2 : public BlockCipher
- {
- public:
- static byte EKB_code(u32bit);
-
- void clear() throw() { K.clear(); }
- std::string name() const { return "RC2"; }
- BlockCipher* clone() const { return new RC2; }
- RC2() : BlockCipher(8, 1, 32) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- SecureBuffer<u16bit, 64> K;
- };
-
-}
-
-#endif
diff --git a/include/rc5.h b/include/rc5.h
deleted file mode 100644
index 0827048dc..000000000
--- a/include/rc5.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************
-* RC5 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_RC5_H__
-#define BOTAN_RC5_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* RC5 *
-*************************************************/
-class BOTAN_DLL RC5 : public BlockCipher
- {
- public:
- void clear() throw() { S.clear(); }
- std::string name() const;
- BlockCipher* clone() const { return new RC5(ROUNDS); }
- RC5(u32bit);
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- SecureVector<u32bit> S;
- const u32bit ROUNDS;
- };
-
-}
-
-#endif
diff --git a/include/rc6.h b/include/rc6.h
deleted file mode 100644
index d629b0995..000000000
--- a/include/rc6.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************
-* RC6 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_RC6_H__
-#define BOTAN_RC6_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* RC6 *
-*************************************************/
-class BOTAN_DLL RC6 : public BlockCipher
- {
- public:
- void clear() throw() { S.clear(); }
- std::string name() const { return "RC6"; }
- BlockCipher* clone() const { return new RC6; }
- RC6() : BlockCipher(16, 1, 32) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- SecureBuffer<u32bit, 44> S;
- };
-
-}
-
-#endif
diff --git a/include/safer_sk.h b/include/safer_sk.h
deleted file mode 100644
index 1bc65e2f7..000000000
--- a/include/safer_sk.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************
-* SAFER-SK Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SAFER_SK_H__
-#define BOTAN_SAFER_SK_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* SAFER-SK *
-*************************************************/
-class BOTAN_DLL SAFER_SK : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); }
- std::string name() const;
- BlockCipher* clone() const;
- SAFER_SK(u32bit);
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static const byte EXP[256];
- static const byte LOG[512];
- static const byte BIAS[208];
- static const byte KEY_INDEX[208];
- SecureVector<byte> EK;
- const u32bit ROUNDS;
- };
-
-}
-
-#endif
diff --git a/include/salsa20.h b/include/salsa20.h
deleted file mode 100644
index e107d8569..000000000
--- a/include/salsa20.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************
-* Salsa20 Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SALSA20_H__
-#define BOTAN_SALSA20_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Salsa20 *
-*************************************************/
-class BOTAN_DLL Salsa20 : public StreamCipher
- {
- public:
- void clear() throw();
- std::string name() const;
- StreamCipher* clone() const { return new Salsa20; }
-
- void resync(const byte[], u32bit);
-
- Salsa20();
- ~Salsa20() { clear(); }
- private:
- void cipher(const byte[], byte[], u32bit);
- void key(const byte[], u32bit);
-
- SecureBuffer<u32bit, 16> state;
-
- SecureBuffer<byte, 64> buffer;
- u32bit position;
- };
-
-}
-
-#endif
diff --git a/include/seed.h b/include/seed.h
deleted file mode 100644
index 95ddbe1d5..000000000
--- a/include/seed.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************
-* SEED Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SEED_H__
-#define BOTAN_SEED_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* SEED *
-*************************************************/
-class BOTAN_DLL SEED : public BlockCipher
- {
- public:
- void clear() throw() { K.clear(); }
- std::string name() const { return "SEED"; }
- BlockCipher* clone() const { return new SEED; }
- SEED() : BlockCipher(16, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- class G_FUNC
- {
- public:
- u32bit operator()(u32bit) const;
- private:
- static const u32bit S0[256], S1[256], S2[256], S3[256];
- };
-
- SecureBuffer<u32bit, 32> K;
- };
-
-}
-
-#endif
diff --git a/include/serpent.h b/include/serpent.h
deleted file mode 100644
index 685470e4c..000000000
--- a/include/serpent.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*************************************************
-* Serpent Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SERPENT_H__
-#define BOTAN_SERPENT_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Serpent *
-*************************************************/
-class BOTAN_DLL 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
diff --git a/include/skipjack.h b/include/skipjack.h
deleted file mode 100644
index 240148f19..000000000
--- a/include/skipjack.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************
-* Skipjack Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SKIPJACK_H__
-#define BOTAN_SKIPJACK_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Skipjack *
-*************************************************/
-class BOTAN_DLL Skipjack : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "Skipjack"; }
- BlockCipher* clone() const { return new Skipjack; }
- Skipjack() : BlockCipher(8, 10) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- void step_A(u16bit&, u16bit&, u32bit) const;
- void step_B(u16bit&, u16bit&, u32bit) const;
- void step_Ai(u16bit&, u16bit&, u32bit) const;
- void step_Bi(u16bit&, u16bit&, u32bit) const;
- SecureBuffer<byte, 256> FTABLE[10];
- };
-
-}
-
-#endif
diff --git a/include/square.h b/include/square.h
deleted file mode 100644
index efbc6e730..000000000
--- a/include/square.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************
-* Square Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_SQUARE_H__
-#define BOTAN_SQUARE_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Square *
-*************************************************/
-class BOTAN_DLL Square : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "Square"; }
- BlockCipher* clone() const { return new Square; }
- Square() : BlockCipher(16, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static void transform(u32bit[4]);
-
- static const byte SE[256];
- static const byte SD[256];
- static const byte Log[256];
- static const byte ALog[255];
-
- static const u32bit TE0[256];
- static const u32bit TE1[256];
- static const u32bit TE2[256];
- static const u32bit TE3[256];
- static const u32bit TD0[256];
- static const u32bit TD1[256];
- static const u32bit TD2[256];
- static const u32bit TD3[256];
-
- SecureBuffer<u32bit, 28> EK, DK;
- SecureBuffer<byte, 32> ME, MD;
- };
-
-}
-
-#endif
diff --git a/include/tea.h b/include/tea.h
deleted file mode 100644
index 2fc9fe838..000000000
--- a/include/tea.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************
-* TEA Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_TEA_H__
-#define BOTAN_TEA_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* TEA *
-*************************************************/
-class BOTAN_DLL TEA : public BlockCipher
- {
- public:
- void clear() throw() { K.clear(); }
- std::string name() const { return "TEA"; }
- BlockCipher* clone() const { return new TEA; }
- TEA() : BlockCipher(8, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- SecureBuffer<u32bit, 4> K;
- };
-
-}
-
-#endif
diff --git a/include/turing.h b/include/turing.h
deleted file mode 100644
index 14b2e6fd6..000000000
--- a/include/turing.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************
-* Turing Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_TURING_H__
-#define BOTAN_TURING_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Turing *
-*************************************************/
-class BOTAN_DLL Turing : public StreamCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "Turing"; }
- StreamCipher* clone() const { return new Turing; }
- Turing() : StreamCipher(4, 32, 4) { position = 0; }
- private:
- void cipher(const byte[], byte[], u32bit);
- void key(const byte[], u32bit);
- void resync(const byte[], u32bit);
- void generate();
-
- static u32bit fixedS(u32bit);
- static void gen_sbox(MemoryRegion<u32bit>&, u32bit,
- const MemoryRegion<u32bit>&);
-
- static const u32bit Q_BOX[256];
- static const byte SBOX[256];
- static const byte OFFSETS[272];
-
- SecureBuffer<u32bit, 256> S0, S1, S2, S3;
- SecureBuffer<u32bit, 17> R;
- SecureVector<u32bit> K;
- SecureBuffer<byte, 340> buffer;
- u32bit position;
- };
-
-}
-
-#endif
diff --git a/include/twofish.h b/include/twofish.h
deleted file mode 100644
index 8519a9aa8..000000000
--- a/include/twofish.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************
-* Twofish Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_TWOFISH_H__
-#define BOTAN_TWOFISH_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* Twofish *
-*************************************************/
-class BOTAN_DLL Twofish : public BlockCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "Twofish"; }
- BlockCipher* clone() const { return new Twofish; }
- Twofish() : BlockCipher(16, 16, 32, 8) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
-
- static void rs_mul(byte[4], byte, u32bit);
-
- static const u32bit MDS0[256];
- static const u32bit MDS1[256];
- static const u32bit MDS2[256];
- static const u32bit MDS3[256];
- static const byte Q0[256];
- static const byte Q1[256];
- static const byte RS[32];
- static const byte EXP_TO_POLY[255];
- static const byte POLY_TO_EXP[255];
-
- SecureBuffer<u32bit, 256> SBox0, SBox1, SBox2, SBox3;
- SecureBuffer<u32bit, 40> round_key;
- };
-
-}
-
-#endif
diff --git a/include/wid_wake.h b/include/wid_wake.h
deleted file mode 100644
index 09171a8f5..000000000
--- a/include/wid_wake.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************
-* WiderWake Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_WIDER_WAKE_H__
-#define BOTAN_WIDER_WAKE_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* WiderWake4+1-BE *
-*************************************************/
-class BOTAN_DLL WiderWake_41_BE : public StreamCipher
- {
- public:
- void clear() throw();
- std::string name() const { return "WiderWake4+1-BE"; }
- StreamCipher* clone() const { return new WiderWake_41_BE; }
- WiderWake_41_BE() : StreamCipher(16, 16, 1, 8) {}
- private:
- void cipher(const byte[], byte[], u32bit);
- void key(const byte[], u32bit);
- void resync(const byte[], u32bit);
-
- void generate(u32bit);
-
- SecureBuffer<byte, DEFAULT_BUFFERSIZE> buffer;
- SecureBuffer<u32bit, 256> T;
- SecureBuffer<u32bit, 5> state;
- SecureBuffer<u32bit, 4> t_key;
- u32bit position;
- };
-
-}
-
-#endif
diff --git a/include/xtea.h b/include/xtea.h
deleted file mode 100644
index 193c13bb9..000000000
--- a/include/xtea.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************
-* XTEA Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_XTEA_H__
-#define BOTAN_XTEA_H__
-
-#include <botan/base.h>
-
-namespace Botan {
-
-/*************************************************
-* XTEA *
-*************************************************/
-class BOTAN_DLL XTEA : public BlockCipher
- {
- public:
- void clear() throw() { EK.clear(); }
- std::string name() const { return "XTEA"; }
- BlockCipher* clone() const { return new XTEA; }
- XTEA() : BlockCipher(8, 16) {}
- private:
- void enc(const byte[], byte[]) const;
- void dec(const byte[], byte[]) const;
- void key(const byte[], u32bit);
- SecureBuffer<u32bit, 64> EK;
- };
-
-}
-
-#endif