aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cipher/aes/aes.h2
-rw-r--r--src/cipher/blowfish/blowfish.h2
-rw-r--r--src/cipher/cast/cast128.h2
-rw-r--r--src/cipher/cast/cast256.h2
-rw-r--r--src/cipher/des/des.h2
-rw-r--r--src/cipher/gost/gost.h2
-rw-r--r--src/cipher/idea/idea.h2
-rw-r--r--src/cipher/kasumi/kasumi.h2
-rw-r--r--src/cipher/lion/lion.h2
-rw-r--r--src/cipher/lubyrack/lubyrack.h2
-rw-r--r--src/cipher/mars/mars.h2
-rw-r--r--src/cipher/misty1/misty1.h2
-rw-r--r--src/cipher/noekeon/noekeon.h2
-rw-r--r--src/cipher/rc2/rc2.h2
-rw-r--r--src/cipher/rc5/rc5.h2
-rw-r--r--src/cipher/rc6/rc6.h2
-rw-r--r--src/cipher/safer/safer_sk.h2
-rw-r--r--src/cipher/seed/seed.h2
-rw-r--r--src/cipher/serpent/serpent.h2
-rw-r--r--src/cipher/skipjack/skipjack.h2
-rw-r--r--src/cipher/square/square.h2
-rw-r--r--src/cipher/tea/tea.h2
-rw-r--r--src/cipher/twofish/twofish.h2
-rw-r--r--src/cipher/xtea/xtea.h2
-rw-r--r--src/cms/cms_enc.h1
-rw-r--r--src/codec/base64/base64.cpp1
-rw-r--r--src/codec/bzip2/bzip2.cpp2
-rw-r--r--src/codec/hex/hex.cpp1
-rw-r--r--src/codec/zlib/zlib.cpp2
-rw-r--r--src/core/block_cipher.h (renamed from src/core/base.h)12
-rw-r--r--src/core/data_src.cpp2
-rw-r--r--src/core/data_src.h3
-rw-r--r--src/core/info.txt2
-rw-r--r--src/core/stream_cipher.h92
-rw-r--r--src/core/sym_algo.h93
-rw-r--r--src/entropy/unix_procs/unix_cmd.cpp2
-rw-r--r--src/filters/basefilt.h1
-rw-r--r--src/filters/buf_filt.cpp1
-rw-r--r--src/filters/data_snk.cpp1
-rw-r--r--src/filters/fd_unix/fd_unix.cpp1
-rw-r--r--src/filters/filter.cpp1
-rw-r--r--src/filters/filter.h2
-rw-r--r--src/filters/filters.h2
-rw-r--r--src/filters/pipe.h1
-rw-r--r--src/hash/info.txt11
-rw-r--r--src/libstate/engine.h2
-rw-r--r--src/libstate/libstate.h4
-rw-r--r--src/libstate/look_add.h8
-rw-r--r--src/libstate/lookup.h7
-rw-r--r--src/mac/cbc_mac/cbc_mac.h1
-rw-r--r--src/mac/cmac/cmac.h1
-rw-r--r--src/mac/mac.h2
-rw-r--r--src/mac/x919_mac/x919_mac.h1
-rw-r--r--src/modes/eax/eax.h1
-rw-r--r--src/modes/mode_pad/mode_pad.cpp1
-rw-r--r--src/modes/mode_pad/mode_pad.h2
-rw-r--r--src/modes/modebase/modebase.h1
-rw-r--r--src/pk_pad/pk_pad.h2
-rw-r--r--src/pubkey/pubkey/pubkey.h3
-rw-r--r--src/rng/auto_rng/auto_rng.h2
-rw-r--r--src/rng/randpool/randpool.h2
-rw-r--r--src/rng/x931_rng/x931_rng.h2
-rw-r--r--src/selftest/selftest.h2
63 files changed, 278 insertions, 48 deletions
diff --git a/src/cipher/aes/aes.h b/src/cipher/aes/aes.h
index 5b43735ad..e287a303d 100644
--- a/src/cipher/aes/aes.h
+++ b/src/cipher/aes/aes.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_AES_H__
#define BOTAN_AES_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/blowfish/blowfish.h b/src/cipher/blowfish/blowfish.h
index 79875ba90..16f5239e3 100644
--- a/src/cipher/blowfish/blowfish.h
+++ b/src/cipher/blowfish/blowfish.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_BLOWFISH_H__
#define BOTAN_BLOWFISH_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/cast/cast128.h b/src/cipher/cast/cast128.h
index 0a7c53864..b9d02cd7a 100644
--- a/src/cipher/cast/cast128.h
+++ b/src/cipher/cast/cast128.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_CAST128_H__
#define BOTAN_CAST128_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/cast/cast256.h b/src/cipher/cast/cast256.h
index d4b7c6b18..cf0bcc953 100644
--- a/src/cipher/cast/cast256.h
+++ b/src/cipher/cast/cast256.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_CAST256_H__
#define BOTAN_CAST256_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/des/des.h b/src/cipher/des/des.h
index eb4689849..8cd490b3c 100644
--- a/src/cipher/des/des.h
+++ b/src/cipher/des/des.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_DES_H__
#define BOTAN_DES_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/gost/gost.h b/src/cipher/gost/gost.h
index d78e3245f..ef2897fae 100644
--- a/src/cipher/gost/gost.h
+++ b/src/cipher/gost/gost.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_GOST_H__
#define BOTAN_GOST_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/idea/idea.h b/src/cipher/idea/idea.h
index 4c5e82aca..824a9c6ed 100644
--- a/src/cipher/idea/idea.h
+++ b/src/cipher/idea/idea.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_IDEA_H__
#define BOTAN_IDEA_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/kasumi/kasumi.h b/src/cipher/kasumi/kasumi.h
index 49050480c..40fa7c36a 100644
--- a/src/cipher/kasumi/kasumi.h
+++ b/src/cipher/kasumi/kasumi.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_KASUMI_H__
#define BOTAN_KASUMI_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/lion/lion.h b/src/cipher/lion/lion.h
index 9b8133143..d541eb76e 100644
--- a/src/cipher/lion/lion.h
+++ b/src/cipher/lion/lion.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_LION_H__
#define BOTAN_LION_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
#include <botan/stream_cipher.h>
#include <botan/hash.h>
diff --git a/src/cipher/lubyrack/lubyrack.h b/src/cipher/lubyrack/lubyrack.h
index c22fdde43..ba5a4d052 100644
--- a/src/cipher/lubyrack/lubyrack.h
+++ b/src/cipher/lubyrack/lubyrack.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_LUBY_RACKOFF_H__
#define BOTAN_LUBY_RACKOFF_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/cipher/mars/mars.h b/src/cipher/mars/mars.h
index 6e1bc9f34..950c1eb6a 100644
--- a/src/cipher/mars/mars.h
+++ b/src/cipher/mars/mars.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_MARS_H__
#define BOTAN_MARS_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/misty1/misty1.h b/src/cipher/misty1/misty1.h
index 9e506d536..0bd3ca1e4 100644
--- a/src/cipher/misty1/misty1.h
+++ b/src/cipher/misty1/misty1.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_MISTY1_H__
#define BOTAN_MISTY1_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/noekeon/noekeon.h b/src/cipher/noekeon/noekeon.h
index 660ab487a..fb06f8c79 100644
--- a/src/cipher/noekeon/noekeon.h
+++ b/src/cipher/noekeon/noekeon.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_NOEKEON_H__
#define BOTAN_NOEKEON_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/rc2/rc2.h b/src/cipher/rc2/rc2.h
index 8f46821a4..ddf5154b8 100644
--- a/src/cipher/rc2/rc2.h
+++ b/src/cipher/rc2/rc2.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_RC2_H__
#define BOTAN_RC2_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/rc5/rc5.h b/src/cipher/rc5/rc5.h
index 0827048dc..bb91c3e68 100644
--- a/src/cipher/rc5/rc5.h
+++ b/src/cipher/rc5/rc5.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_RC5_H__
#define BOTAN_RC5_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/rc6/rc6.h b/src/cipher/rc6/rc6.h
index d629b0995..3517b4671 100644
--- a/src/cipher/rc6/rc6.h
+++ b/src/cipher/rc6/rc6.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_RC6_H__
#define BOTAN_RC6_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/safer/safer_sk.h b/src/cipher/safer/safer_sk.h
index 1bc65e2f7..121cf545b 100644
--- a/src/cipher/safer/safer_sk.h
+++ b/src/cipher/safer/safer_sk.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SAFER_SK_H__
#define BOTAN_SAFER_SK_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/seed/seed.h b/src/cipher/seed/seed.h
index 95ddbe1d5..9e96ec8c2 100644
--- a/src/cipher/seed/seed.h
+++ b/src/cipher/seed/seed.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SEED_H__
#define BOTAN_SEED_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/serpent/serpent.h b/src/cipher/serpent/serpent.h
index 76acff487..cac042185 100644
--- a/src/cipher/serpent/serpent.h
+++ b/src/cipher/serpent/serpent.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SERPENT_H__
#define BOTAN_SERPENT_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/skipjack/skipjack.h b/src/cipher/skipjack/skipjack.h
index 240148f19..c7c9ec9b9 100644
--- a/src/cipher/skipjack/skipjack.h
+++ b/src/cipher/skipjack/skipjack.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SKIPJACK_H__
#define BOTAN_SKIPJACK_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/square/square.h b/src/cipher/square/square.h
index efbc6e730..97326e7ea 100644
--- a/src/cipher/square/square.h
+++ b/src/cipher/square/square.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SQUARE_H__
#define BOTAN_SQUARE_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/tea/tea.h b/src/cipher/tea/tea.h
index 2fc9fe838..71d4e02f9 100644
--- a/src/cipher/tea/tea.h
+++ b/src/cipher/tea/tea.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_TEA_H__
#define BOTAN_TEA_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/twofish/twofish.h b/src/cipher/twofish/twofish.h
index 8519a9aa8..f7788722c 100644
--- a/src/cipher/twofish/twofish.h
+++ b/src/cipher/twofish/twofish.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_TWOFISH_H__
#define BOTAN_TWOFISH_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cipher/xtea/xtea.h b/src/cipher/xtea/xtea.h
index 193c13bb9..03b41f683 100644
--- a/src/cipher/xtea/xtea.h
+++ b/src/cipher/xtea/xtea.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_XTEA_H__
#define BOTAN_XTEA_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/cms/cms_enc.h b/src/cms/cms_enc.h
index adfa57400..f62c56ffa 100644
--- a/src/cms/cms_enc.h
+++ b/src/cms/cms_enc.h
@@ -9,6 +9,7 @@
#include <botan/x509cert.h>
#include <botan/x509stor.h>
#include <botan/pkcs8.h>
+#include <botan/symkey.h>
namespace Botan {
diff --git a/src/codec/base64/base64.cpp b/src/codec/base64/base64.cpp
index 0e01d94f3..b1a802376 100644
--- a/src/codec/base64/base64.cpp
+++ b/src/codec/base64/base64.cpp
@@ -5,6 +5,7 @@
#include <botan/base64.h>
#include <botan/charset.h>
+#include <botan/exceptn.h>
#include <algorithm>
namespace Botan {
diff --git a/src/codec/bzip2/bzip2.cpp b/src/codec/bzip2/bzip2.cpp
index 712dacd7d..18b3c51f0 100644
--- a/src/codec/bzip2/bzip2.cpp
+++ b/src/codec/bzip2/bzip2.cpp
@@ -6,6 +6,8 @@
*************************************************/
#include <botan/bzip2.h>
+#include <botan/exceptn.h>
+
#include <map>
#include <cstring>
#define BZ_NO_STDIO
diff --git a/src/codec/hex/hex.cpp b/src/codec/hex/hex.cpp
index afb082f76..4cbc1d37b 100644
--- a/src/codec/hex/hex.cpp
+++ b/src/codec/hex/hex.cpp
@@ -6,6 +6,7 @@
#include <botan/hex.h>
#include <botan/parsing.h>
#include <botan/charset.h>
+#include <botan/exceptn.h>
#include <algorithm>
namespace Botan {
diff --git a/src/codec/zlib/zlib.cpp b/src/codec/zlib/zlib.cpp
index 36a9640e3..6f1e2b770 100644
--- a/src/codec/zlib/zlib.cpp
+++ b/src/codec/zlib/zlib.cpp
@@ -6,6 +6,8 @@
*************************************************/
#include <botan/zlib.h>
+#include <botan/exceptn.h>
+
#include <cstring>
#include <map>
#include <zlib.h>
diff --git a/src/core/base.h b/src/core/block_cipher.h
index 8e4341713..1a4302581 100644
--- a/src/core/base.h
+++ b/src/core/block_cipher.h
@@ -1,10 +1,10 @@
-/*************************************************
-* Base Classes Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/**
+* Block Cipher Base Class
+* (C) 1999-2007 Jack Lloyd
+*/
-#ifndef BOTAN_BASE_H__
-#define BOTAN_BASE_H__
+#ifndef BOTAN_BLOCK_CIPHER__
+#define BOTAN_BLOCK_CIPHER__
#include <botan/exceptn.h>
#include <botan/symkey.h>
diff --git a/src/core/data_src.cpp b/src/core/data_src.cpp
index 1ec1ae090..de5544885 100644
--- a/src/core/data_src.cpp
+++ b/src/core/data_src.cpp
@@ -5,6 +5,8 @@
*************************************************/
#include <botan/data_src.h>
+#include <botan/exceptn.h>
+
#include <fstream>
#include <algorithm>
diff --git a/src/core/data_src.h b/src/core/data_src.h
index d250addfc..25bdce00f 100644
--- a/src/core/data_src.h
+++ b/src/core/data_src.h
@@ -6,7 +6,8 @@
#ifndef BOTAN_DATA_SRC_H__
#define BOTAN_DATA_SRC_H__
-#include <botan/base.h>
+#include <botan/secmem.h>
+#include <string>
#include <iosfwd>
namespace Botan {
diff --git a/src/core/info.txt b/src/core/info.txt
index fd62867e0..c5276ce46 100644
--- a/src/core/info.txt
+++ b/src/core/info.txt
@@ -15,7 +15,7 @@ timer
<add>
allocate.h
-base.h
+block_cipher.h
botan.h
data_src.cpp
buf_comp.h
diff --git a/src/core/stream_cipher.h b/src/core/stream_cipher.h
new file mode 100644
index 000000000..6c013c6d6
--- /dev/null
+++ b/src/core/stream_cipher.h
@@ -0,0 +1,92 @@
+/**
+* Stream Cipher
+* (C) 1999-2007 Jack Lloyd
+*/
+
+#ifndef BOTAN_STREAM_CIPHER_H__
+#define BOTAN_STREAM_CIPHER_H__
+
+#include <botan/exceptn.h>
+#include <botan/symkey.h>
+#include <botan/sym_algo.h>
+
+namespace Botan {
+
+/*************************************************
+* Stream Cipher *
+*************************************************/
+class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
+ {
+ public:
+ const u32bit IV_LENGTH;
+
+ /**
+ * Encrypt a message.
+ * @param i the plaintext
+ * @param o the byte array to hold the output, i.e. the ciphertext
+ * @param len the length of both i and o
+ */
+ void encrypt(const byte i[], byte o[], u32bit len) { cipher(i, o, len); }
+
+ /**
+ * Decrypt a message.
+ * @param i the ciphertext to decrypt
+ * @param o the byte array to hold the output, i.e. the plaintext
+ * @param len the length of both i and o
+ */
+ void decrypt(const byte i[], byte o[], u32bit len) { cipher(i, o, len); }
+
+ /**
+ * Encrypt a message.
+ * @param in the plaintext as input, after the function has
+ * returned it will hold the ciphertext
+
+ * @param len the length of in
+ */
+ void encrypt(byte in[], u32bit len) { cipher(in, in, len); }
+
+ /**
+ * Decrypt a message.
+ * @param in the ciphertext as input, after the function has
+ * returned it will hold the plaintext
+ * @param len the length of in
+ */
+ void decrypt(byte in[], u32bit len) { cipher(in, in, len); }
+
+ /**
+ * Resync the cipher using the IV
+ * @param iv the initialization vector
+ * @param iv_len the length of the IV in bytes
+ */
+ virtual void resync(const byte iv[], u32bit iv_len);
+
+ /**
+ * Seek ahead in the stream.
+ * @param len the length to seek ahead.
+ */
+ virtual void seek(u32bit len);
+
+ /**
+ * Get a new object representing the same algorithm as *this
+ */
+ virtual StreamCipher* clone() const = 0;
+
+ /**
+ * Zeroize internal state
+ */
+ virtual void clear() throw() = 0;
+
+ StreamCipher(u32bit key_min, u32bit key_max = 0,
+ u32bit key_mod = 1,
+ u32bit iv_len = 0) :
+ SymmetricAlgorithm(key_min, key_max, key_mod),
+ IV_LENGTH(iv_len) {}
+
+ virtual ~StreamCipher() {}
+ private:
+ virtual void cipher(const byte[], byte[], u32bit) = 0;
+ };
+
+}
+
+#endif
diff --git a/src/core/sym_algo.h b/src/core/sym_algo.h
new file mode 100644
index 000000000..02343ed56
--- /dev/null
+++ b/src/core/sym_algo.h
@@ -0,0 +1,93 @@
+/**
+* Symmetric Algorithm Base Class
+* (C) 1999-2007 Jack Lloyd
+*/
+
+#ifndef BOTAN_SYMMETRIC_ALGORITHM_H__
+#define BOTAN_SYMMETRIC_ALGORITHM_H__
+
+#include <botan/types.h>
+#include <botan/exceptn.h>
+#include <botan/symkey.h>
+
+namespace Botan {
+
+/**
+* This class represents a symmetric algorithm object.
+*/
+class BOTAN_DLL SymmetricAlgorithm
+ {
+ public:
+
+ /**
+ * The maximum allowed key length.
+ */
+ const u32bit MAXIMUM_KEYLENGTH;
+
+ /**
+ * The minimal allowed key length.
+ */
+ const u32bit MINIMUM_KEYLENGTH;
+
+ /**
+ * A valid keylength is a multiple of this value.
+ */
+ const u32bit KEYLENGTH_MULTIPLE;
+
+ /**
+ * The name of the algorithm.
+ * @return the name of the algorithm
+ */
+ virtual std::string name() const = 0;
+
+ /**
+ * Set the symmetric key of this object.
+ * @param key the SymmetricKey to be set.
+ */
+ void set_key(const SymmetricKey& skey) throw(Invalid_Key_Length)
+ { set_key(skey.begin(), skey.length()); }
+
+ /**
+ * Set the symmetric key of this object.
+ * @param key the to be set as a byte array.
+ * @param the length of the byte array.
+ */
+ void set_key(const byte skey[], u32bit length) throw(Invalid_Key_Length)
+ {
+ if(!valid_keylength(length))
+ throw Invalid_Key_Length(name(), length);
+ key(skey, length);
+ }
+
+ /**
+ * Check whether a given key length is valid for this algorithm.
+ * @param length the key length to be checked.
+ * @return true if the key length is valid.
+ */
+ bool valid_keylength(u32bit length) const
+ {
+ return ((length >= MINIMUM_KEYLENGTH) &&
+ (length <= MAXIMUM_KEYLENGTH) &&
+ (length % KEYLENGTH_MULTIPLE == 0));
+ }
+
+ /**
+ * Construct a SymmetricAlgorithm.
+ * @param key_min the minimum allowed key length
+ * @param key_max the maximum allowed key length
+ * @param key_mod any valid key length must be a multiple of this value
+ */
+ SymmetricAlgorithm(u32bit key_min, u32bit key_max, u32bit key_mod) :
+ MAXIMUM_KEYLENGTH(key_max ? key_max : key_min),
+ MINIMUM_KEYLENGTH(key_min),
+ KEYLENGTH_MULTIPLE(key_mod)
+ {}
+
+ virtual ~SymmetricAlgorithm() {}
+ private:
+ virtual void key(const byte[], u32bit) = 0;
+ };
+
+}
+
+#endif
diff --git a/src/entropy/unix_procs/unix_cmd.cpp b/src/entropy/unix_procs/unix_cmd.cpp
index 32829b91b..79cce7da4 100644
--- a/src/entropy/unix_procs/unix_cmd.cpp
+++ b/src/entropy/unix_procs/unix_cmd.cpp
@@ -13,6 +13,8 @@
#include <botan/unix_cmd.h>
#include <botan/parsing.h>
+#include <botan/exceptn.h>
+
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/src/filters/basefilt.h b/src/filters/basefilt.h
index 004e076c4..085a4bc60 100644
--- a/src/filters/basefilt.h
+++ b/src/filters/basefilt.h
@@ -7,6 +7,7 @@
#define BOTAN_BASEFILT_H__
#include <botan/filter.h>
+#include <botan/sym_algo.h>
namespace Botan {
diff --git a/src/filters/buf_filt.cpp b/src/filters/buf_filt.cpp
index 7acd37435..983f5184b 100644
--- a/src/filters/buf_filt.cpp
+++ b/src/filters/buf_filt.cpp
@@ -4,6 +4,7 @@
*************************************************/
#include <botan/buf_filt.h>
+#include <botan/exceptn.h>
#include <algorithm>
namespace Botan {
diff --git a/src/filters/data_snk.cpp b/src/filters/data_snk.cpp
index bb5226f0c..da677f47d 100644
--- a/src/filters/data_snk.cpp
+++ b/src/filters/data_snk.cpp
@@ -5,6 +5,7 @@
*************************************************/
#include <botan/data_snk.h>
+#include <botan/exceptn.h>
#include <fstream>
namespace Botan {
diff --git a/src/filters/fd_unix/fd_unix.cpp b/src/filters/fd_unix/fd_unix.cpp
index ac88ac391..6c96449bd 100644
--- a/src/filters/fd_unix/fd_unix.cpp
+++ b/src/filters/fd_unix/fd_unix.cpp
@@ -4,6 +4,7 @@
*************************************************/
#include <botan/pipe.h>
+#include <botan/exceptn.h>
#include <unistd.h>
namespace Botan {
diff --git a/src/filters/filter.cpp b/src/filters/filter.cpp
index 253f20c32..27170ed65 100644
--- a/src/filters/filter.cpp
+++ b/src/filters/filter.cpp
@@ -5,6 +5,7 @@
#include <botan/filter.h>
#include <botan/secqueue.h>
+#include <botan/exceptn.h>
namespace Botan {
diff --git a/src/filters/filter.h b/src/filters/filter.h
index 51db50a57..e6a7b6918 100644
--- a/src/filters/filter.h
+++ b/src/filters/filter.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_FILTER_H__
#define BOTAN_FILTER_H__
-#include <botan/base.h>
+#include <botan/secmem.h>
#include <vector>
namespace Botan {
diff --git a/src/filters/filters.h b/src/filters/filters.h
index 0dd7fc39d..fce38318c 100644
--- a/src/filters/filters.h
+++ b/src/filters/filters.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_FILTERS_H__
#define BOTAN_FILTERS_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
#include <botan/stream_cipher.h>
#include <botan/hash.h>
#include <botan/mac.h>
diff --git a/src/filters/pipe.h b/src/filters/pipe.h
index 4ac59617d..a7ef13bc4 100644
--- a/src/filters/pipe.h
+++ b/src/filters/pipe.h
@@ -8,6 +8,7 @@
#include <botan/data_src.h>
#include <botan/filter.h>
+#include <botan/exceptn.h>
#include <iosfwd>
namespace Botan {
diff --git a/src/hash/info.txt b/src/hash/info.txt
new file mode 100644
index 000000000..fb1f734d7
--- /dev/null
+++ b/src/hash/info.txt
@@ -0,0 +1,11 @@
+realname "Hash Functions"
+
+load_on auto
+
+<requires>
+utils
+</requires>
+
+<add>
+hash.h
+</add>
diff --git a/src/libstate/engine.h b/src/libstate/engine.h
index 3279cdcf9..6c0fa93ad 100644
--- a/src/libstate/engine.h
+++ b/src/libstate/engine.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_ENGINE_H__
#define BOTAN_ENGINE_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
#include <botan/stream_cipher.h>
#include <botan/hash.h>
#include <botan/mac.h>
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h
index 74d3d8ef3..606a091d8 100644
--- a/src/libstate/libstate.h
+++ b/src/libstate/libstate.h
@@ -6,8 +6,10 @@
#ifndef BOTAN_LIB_STATE_H__
#define BOTAN_LIB_STATE_H__
-#include <botan/base.h>
+#include <botan/types.h>
#include <botan/init.h>
+#include <botan/allocate.h>
+
#include <string>
#include <vector>
#include <map>
diff --git a/src/libstate/look_add.h b/src/libstate/look_add.h
index 8c170049d..44ae77727 100644
--- a/src/libstate/look_add.h
+++ b/src/libstate/look_add.h
@@ -6,10 +6,14 @@
#ifndef BOTAN_LOOKUP_MANGEMENT_H__
#define BOTAN_LOOKUP_MANGEMENT_H__
-#include <botan/base.h>
#include <botan/libstate.h>
-#include <botan/mode_pad.h>
+
+#include <botan/block_cipher.h>
+#include <botan/stream_cipher.h>
+#include <botan/hash.h>
+#include <botan/mac.h>
#include <botan/s2k.h>
+#include <botan/mode_pad.h>
namespace Botan {
diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h
index f45f49033..ac65799da 100644
--- a/src/libstate/lookup.h
+++ b/src/libstate/lookup.h
@@ -6,15 +6,18 @@
#ifndef BOTAN_LOOKUP_H__
#define BOTAN_LOOKUP_H__
-#include <botan/base.h>
+#include <botan/block_cipher.h>
+#include <botan/stream_cipher.h>
#include <botan/hash.h>
+#include <botan/mac.h>
+#include <botan/s2k.h>
+
#include <botan/enums.h>
#include <botan/filters.h>
#include <botan/mode_pad.h>
#include <botan/kdf.h>
#include <botan/pk_pad.h>
#include <botan/libstate.h>
-#include <botan/s2k.h>
namespace Botan {
diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h
index 2b30fedd2..7e93097d5 100644
--- a/src/mac/cbc_mac/cbc_mac.h
+++ b/src/mac/cbc_mac/cbc_mac.h
@@ -7,6 +7,7 @@
#define BOTAN_CBC_MAC_H__
#include <botan/mac.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h
index 556d9dd9e..66eb46a69 100644
--- a/src/mac/cmac/cmac.h
+++ b/src/mac/cmac/cmac.h
@@ -7,6 +7,7 @@
#define BOTAN_CMAC_H__
#include <botan/mac.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/mac/mac.h b/src/mac/mac.h
index 99184fd3f..ff5939f6e 100644
--- a/src/mac/mac.h
+++ b/src/mac/mac.h
@@ -7,7 +7,7 @@
#define BOTAN_MESSAGE_AUTH_CODE_BASE_H__
#include <botan/buf_comp.h>
-#include <botan/base.h>
+#include <botan/sym_algo.h>
#include <string>
namespace Botan {
diff --git a/src/mac/x919_mac/x919_mac.h b/src/mac/x919_mac/x919_mac.h
index 85b8254a5..46196f8f4 100644
--- a/src/mac/x919_mac/x919_mac.h
+++ b/src/mac/x919_mac/x919_mac.h
@@ -7,6 +7,7 @@
#define BOTAN_ANSI_X919_MAC_H__
#include <botan/mac.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/modes/eax/eax.h b/src/modes/eax/eax.h
index f3fc6970c..aea1383db 100644
--- a/src/modes/eax/eax.h
+++ b/src/modes/eax/eax.h
@@ -7,6 +7,7 @@
#define BOTAN_EAX_H__
#include <botan/basefilt.h>
+#include <botan/block_cipher.h>
#include <botan/mac.h>
namespace Botan {
diff --git a/src/modes/mode_pad/mode_pad.cpp b/src/modes/mode_pad/mode_pad.cpp
index 3a07afcb4..3944837cc 100644
--- a/src/modes/mode_pad/mode_pad.cpp
+++ b/src/modes/mode_pad/mode_pad.cpp
@@ -4,6 +4,7 @@
*************************************************/
#include <botan/mode_pad.h>
+#include <botan/exceptn.h>
#include <botan/util.h>
namespace Botan {
diff --git a/src/modes/mode_pad/mode_pad.h b/src/modes/mode_pad/mode_pad.h
index 4041efcdc..3dc28fa81 100644
--- a/src/modes/mode_pad/mode_pad.h
+++ b/src/modes/mode_pad/mode_pad.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_CBC_PADDING_H__
#define BOTAN_CBC_PADDING_H__
-#include <botan/base.h>
+#include <botan/types.h>
#include <string>
namespace Botan {
diff --git a/src/modes/modebase/modebase.h b/src/modes/modebase/modebase.h
index 620a5c618..a16b149be 100644
--- a/src/modes/modebase/modebase.h
+++ b/src/modes/modebase/modebase.h
@@ -7,6 +7,7 @@
#define BOTAN_MODEBASE_H__
#include <botan/basefilt.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/pk_pad/pk_pad.h b/src/pk_pad/pk_pad.h
index ed1742155..e26235c74 100644
--- a/src/pk_pad/pk_pad.h
+++ b/src/pk_pad/pk_pad.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_PUBKEY_PAD_H__
#define BOTAN_PUBKEY_PAD_H__
-#include <botan/base.h>
+#include <botan/secmem.h>
#include <botan/rng.h>
namespace Botan {
diff --git a/src/pubkey/pubkey/pubkey.h b/src/pubkey/pubkey/pubkey.h
index ed66c212e..14faa1096 100644
--- a/src/pubkey/pubkey/pubkey.h
+++ b/src/pubkey/pubkey/pubkey.h
@@ -6,9 +6,10 @@
#ifndef BOTAN_PUBKEY_H__
#define BOTAN_PUBKEY_H__
-#include <botan/base.h>
#include <botan/pk_keys.h>
#include <botan/pk_pad.h>
+#include <botan/symkey.h>
+#include <botan/rng.h>
namespace Botan {
diff --git a/src/rng/auto_rng/auto_rng.h b/src/rng/auto_rng/auto_rng.h
index bbc3703c1..dea735470 100644
--- a/src/rng/auto_rng/auto_rng.h
+++ b/src/rng/auto_rng/auto_rng.h
@@ -7,7 +7,7 @@
#define BOTAN_AUTO_SEEDING_RNG_H__
#include <botan/rng.h>
-#include <botan/base.h>
+#include <string>
namespace Botan {
diff --git a/src/rng/randpool/randpool.h b/src/rng/randpool/randpool.h
index 198a34552..f6bae9d52 100644
--- a/src/rng/randpool/randpool.h
+++ b/src/rng/randpool/randpool.h
@@ -7,7 +7,7 @@
#define BOTAN_RANDPOOL_H__
#include <botan/rng.h>
-#include <botan/base.h>
+#include <botan/block_cipher.h>
#include <botan/mac.h>
#include <vector>
diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h
index 220b47ab8..e1d090c3c 100644
--- a/src/rng/x931_rng/x931_rng.h
+++ b/src/rng/x931_rng/x931_rng.h
@@ -7,7 +7,7 @@
#define BOTAN_ANSI_X931_RNG_H__
#include <botan/rng.h>
-#include <botan/base.h>
+#include <botan/block_cipher.h>
namespace Botan {
diff --git a/src/selftest/selftest.h b/src/selftest/selftest.h
index ff011a32c..adea9ebe6 100644
--- a/src/selftest/selftest.h
+++ b/src/selftest/selftest.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_SELF_TEST_H__
#define BOTAN_SELF_TEST_H__
-#include <botan/base.h>
+#include <botan/types.h>
namespace Botan {