aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/noekeon/noekeon.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-14 18:04:35 +0000
committerlloyd <[email protected]>2010-10-14 18:04:35 +0000
commit0cb6bcfedef6ffa797801acd7cb945feb2d05d50 (patch)
treea89de84b769036989fd59364dfb2d4fa000c697f /src/block/noekeon/noekeon.h
parenta142500346e9bef5c4b0905103eac9a494d6822e (diff)
In all cases where the block size of the cipher is fixed, the key
parameters are as well. So make them template paramters. The sole exception was AES, because you could either initialize AES with a fixed key length, in which case it would only be that specific key length, or not, in which case it would support any valid AES key size. This is removed in this checkin; you have to specifically ask for AES-128, AES-192, or AES-256, depending on which one you want. This is probably actually a good thing, because every implementation other than the base one (SSSE3, AES-NI, OpenSSL) did not support "AES", only the versions with specific fixed key sizes. So forcing the user to ask for the one they want ensures they get the ones that are faster and/or safer.
Diffstat (limited to 'src/block/noekeon/noekeon.h')
-rw-r--r--src/block/noekeon/noekeon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block/noekeon/noekeon.h b/src/block/noekeon/noekeon.h
index 79c627579..7c5c73dcb 100644
--- a/src/block/noekeon/noekeon.h
+++ b/src/block/noekeon/noekeon.h
@@ -15,7 +15,7 @@ namespace Botan {
/**
* Noekeon
*/
-class BOTAN_DLL Noekeon : public BlockCipher_Fixed_Block_Size<16>
+class BOTAN_DLL Noekeon : public Block_Cipher_Fixed_Params<16, 16>
{
public:
void encrypt_n(const byte in[], byte out[], size_t blocks) const;
@@ -25,7 +25,7 @@ class BOTAN_DLL Noekeon : public BlockCipher_Fixed_Block_Size<16>
std::string name() const { return "Noekeon"; }
BlockCipher* clone() const { return new Noekeon; }
- Noekeon() : BlockCipher_Fixed_Block_Size(16), EK(4), DK(4) {}
+ Noekeon() : EK(4), DK(4) {}
protected:
/**
* The Noekeon round constants