diff options
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/gost_28147/gost_28147.h | 15 | ||||
-rw-r--r-- | src/block/lubyrack/lubyrack.h | 3 | ||||
-rw-r--r-- | src/block/misty1/misty1.h | 6 | ||||
-rw-r--r-- | src/block/rc5/rc5.h | 6 |
4 files changed, 27 insertions, 3 deletions
diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h index 2ccb3214d..dbea932a0 100644 --- a/src/block/gost_28147/gost_28147.h +++ b/src/block/gost_28147/gost_28147.h @@ -21,14 +21,24 @@ namespace Botan { class BOTAN_DLL GOST_28147_89_Params { public: + /** + * @param row the row + * @param col the column + * @return the sbox entry at this row/column + */ byte sbox_entry(u32bit row, u32bit col) const; + /** + * @return name of this parameter set + */ std::string param_name() const { return name; } /** * Default GOST parameters are the ones given in GOST R 34.11 for * testing purposes; these sboxes are also used by Crypto++, and, - * at least according to Wikipedia, the Central Bank of Russian Federation + * at least according to Wikipedia, the Central Bank of Russian + * Federation + * @param name of the parameter set */ GOST_28147_89_Params(const std::string& name = "R3411_94_TestParam"); private: @@ -50,6 +60,9 @@ class BOTAN_DLL GOST_28147_89 : public BlockCipher std::string name() const { return "GOST-28147-89"; } BlockCipher* clone() const { return new GOST_28147_89(SBOX); } + /** + * @param params the sbox parameters to use + */ GOST_28147_89(const GOST_28147_89_Params& params); private: GOST_28147_89(const SecureVector<u32bit, 1024>& other_SBOX) : diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h index 29b7ee5a4..a69d2302f 100644 --- a/src/block/lubyrack/lubyrack.h +++ b/src/block/lubyrack/lubyrack.h @@ -26,6 +26,9 @@ class BOTAN_DLL LubyRackoff : public BlockCipher std::string name() const; BlockCipher* clone() const; + /** + * @param hash function to use to form the block cipher + */ LubyRackoff(HashFunction* hash); ~LubyRackoff() { delete hash; } private: diff --git a/src/block/misty1/misty1.h b/src/block/misty1/misty1.h index d58a2aac7..a9bc12c7b 100644 --- a/src/block/misty1/misty1.h +++ b/src/block/misty1/misty1.h @@ -25,7 +25,11 @@ class BOTAN_DLL MISTY1 : public BlockCipher std::string name() const { return "MISTY1"; } BlockCipher* clone() const { return new MISTY1; } - MISTY1(u32bit = 8); + /** + * @param rounds the number of rounds. Must be 8 with the current + * implementation + */ + MISTY1(u32bit rounds = 8); private: void key_schedule(const byte[], u32bit); diff --git a/src/block/rc5/rc5.h b/src/block/rc5/rc5.h index 5135336b1..385c6b2b1 100644 --- a/src/block/rc5/rc5.h +++ b/src/block/rc5/rc5.h @@ -25,7 +25,11 @@ class BOTAN_DLL RC5 : public BlockCipher std::string name() const; BlockCipher* clone() const { return new RC5(ROUNDS); } - RC5(u32bit); + /** + * @param rounds the number of RC5 rounds to run. Must be between + * 8 and 32 and a multiple of 4. + */ + RC5(u32bit rounds); private: void key_schedule(const byte[], u32bit); SecureVector<u32bit> S; |