aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/block/block_cipher.h25
-rw-r--r--src/block/cascade/cascade.h5
-rw-r--r--src/block/lion/lion.h10
-rw-r--r--src/block/rc2/rc2.h7
-rw-r--r--src/block/safer/safer_sk.h6
-rw-r--r--src/block/serpent/serpent.h2
-rw-r--r--src/build-data/botan.doxy.in4
-rw-r--r--src/filters/secqueue.cpp4
-rw-r--r--src/sym_algo/sym_algo.h7
9 files changed, 52 insertions, 18 deletions
diff --git a/src/block/block_cipher.h b/src/block/block_cipher.h
index 11d5e20f9..73c72a9e4 100644
--- a/src/block/block_cipher.h
+++ b/src/block/block_cipher.h
@@ -19,6 +19,22 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
{
public:
/**
+ * BlockCipher constructor
+ * @param block_size the size of blocks this cipher processes
+ * @param key_min the minimum key size
+ * @param key_max the maximum key size
+ * @param key_mod the modulo restriction on the key size
+ */
+ BlockCipher(u32bit block_size,
+ u32bit key_min,
+ u32bit key_max = 0,
+ u32bit key_mod = 1) :
+ SymmetricAlgorithm(key_min, key_max, key_mod),
+ BLOCK_SIZE(block_size) {}
+
+ virtual ~BlockCipher() {}
+
+ /**
* The block size of this algorithm.
*/
const u32bit BLOCK_SIZE;
@@ -99,15 +115,6 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm
* Zeroize internal state
*/
virtual void clear() = 0;
-
- BlockCipher(u32bit block_size,
- u32bit key_min,
- u32bit key_max = 0,
- u32bit key_mod = 1) :
- SymmetricAlgorithm(key_min, key_max, key_mod),
- BLOCK_SIZE(block_size) {}
-
- virtual ~BlockCipher() {}
};
}
diff --git a/src/block/cascade/cascade.h b/src/block/cascade/cascade.h
index 263a9e8a1..abd9b015d 100644
--- a/src/block/cascade/cascade.h
+++ b/src/block/cascade/cascade.h
@@ -25,6 +25,11 @@ class BOTAN_DLL Cascade_Cipher : public BlockCipher
std::string name() const;
BlockCipher* clone() const;
+ /**
+ * Create a cascade of two block ciphers
+ * @param cipher1 the first cipher
+ * @param cipher2 the second cipher
+ */
Cascade_Cipher(BlockCipher* cipher1, BlockCipher* cipher2);
~Cascade_Cipher();
diff --git a/src/block/lion/lion.h b/src/block/lion/lion.h
index 07556399b..bba4e6f30 100644
--- a/src/block/lion/lion.h
+++ b/src/block/lion/lion.h
@@ -32,7 +32,15 @@ class BOTAN_DLL Lion : public BlockCipher
std::string name() const;
BlockCipher* clone() const;
- Lion(HashFunction*, StreamCipher*, u32bit);
+ /**
+ * @param hash the hash to use internally
+ * @param cipher the stream cipher to use internally
+ * @param block_size the size of the block to use
+ */
+ Lion(HashFunction* hash,
+ StreamCipher* cipher,
+ u32bit block_size);
+
~Lion() { delete hash; delete cipher; }
private:
void key_schedule(const byte[], u32bit);
diff --git a/src/block/rc2/rc2.h b/src/block/rc2/rc2.h
index d4ecac462..c16680347 100644
--- a/src/block/rc2/rc2.h
+++ b/src/block/rc2/rc2.h
@@ -21,7 +21,12 @@ class BOTAN_DLL RC2 : public BlockCipher
void encrypt_n(const byte in[], byte out[], u32bit blocks) const;
void decrypt_n(const byte in[], byte out[], u32bit blocks) const;
- static byte EKB_code(u32bit);
+ /**
+ * Return the code of the effective key bits
+ * @param bits key length
+ * @return EKB code
+ */
+ static byte EKB_code(u32bit bits);
void clear() { K.clear(); }
std::string name() const { return "RC2"; }
diff --git a/src/block/safer/safer_sk.h b/src/block/safer/safer_sk.h
index 3386102e4..c93797602 100644
--- a/src/block/safer/safer_sk.h
+++ b/src/block/safer/safer_sk.h
@@ -25,7 +25,11 @@ class BOTAN_DLL SAFER_SK : public BlockCipher
std::string name() const;
BlockCipher* clone() const;
- SAFER_SK(u32bit);
+ /**
+ * @param rounds the number of rounds to use - must be between 1
+ * and 13
+ */
+ SAFER_SK(u32bit rounds);
private:
void key_schedule(const byte[], u32bit);
diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h
index 2bbe2f71f..1c13d00f9 100644
--- a/src/block/serpent/serpent.h
+++ b/src/block/serpent/serpent.h
@@ -26,7 +26,7 @@ class BOTAN_DLL Serpent : public BlockCipher
BlockCipher* clone() const { return new Serpent; }
Serpent() : BlockCipher(16, 16, 32, 8) {}
protected:
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte key[], u32bit length);
SecureVector<u32bit, 132> round_key;
};
diff --git a/src/build-data/botan.doxy.in b/src/build-data/botan.doxy.in
index 711950b6e..fddbf468f 100644
--- a/src/build-data/botan.doxy.in
+++ b/src/build-data/botan.doxy.in
@@ -37,7 +37,7 @@ TYPEDEF_HIDES_STRUCT = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
+EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
@@ -69,7 +69,7 @@ FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
-WARN_IF_UNDOCUMENTED = NO
+WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
diff --git a/src/filters/secqueue.cpp b/src/filters/secqueue.cpp
index 26716a730..db0366bc8 100644
--- a/src/filters/secqueue.cpp
+++ b/src/filters/secqueue.cpp
@@ -10,8 +10,8 @@
namespace Botan {
-/*
-* SecureQueueNode
+/**
+* A node in a SecureQueue
*/
class SecureQueueNode
{
diff --git a/src/sym_algo/sym_algo.h b/src/sym_algo/sym_algo.h
index f00c8cedf..f1a4955ca 100644
--- a/src/sym_algo/sym_algo.h
+++ b/src/sym_algo/sym_algo.h
@@ -87,7 +87,12 @@ class BOTAN_DLL SymmetricAlgorithm
virtual ~SymmetricAlgorithm() {}
private:
- virtual void key_schedule(const byte[], u32bit) = 0;
+ /**
+ * Run the key schedule
+ * @param key the key
+ * @param length of key
+ */
+ virtual void key_schedule(const byte key[], u32bit length) = 0;
};
/**