aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/serpent
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/serpent')
-rw-r--r--src/block/serpent/serpent.cpp2
-rw-r--r--src/block/serpent/serpent.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp
index 4979ecbab..4133750ad 100644
--- a/src/block/serpent/serpent.cpp
+++ b/src/block/serpent/serpent.cpp
@@ -355,7 +355,7 @@ void Serpent::key_schedule(const byte key[], u32bit length)
{
const u32bit PHI = 0x9E3779B9;
- SecureVector<u32bit, 140> W;
+ SecureVector<u32bit> W(140);
for(u32bit j = 0; j != length / 4; ++j)
W[j] = load_le<u32bit>(key, j);
diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h
index 56afd3330..f980c602e 100644
--- a/src/block/serpent/serpent.h
+++ b/src/block/serpent/serpent.h
@@ -24,13 +24,13 @@ class BOTAN_DLL Serpent : public BlockCipher
void clear() { zeroise(round_key); }
std::string name() const { return "Serpent"; }
BlockCipher* clone() const { return new Serpent; }
- Serpent() : BlockCipher(16, 16, 32, 8) {}
+ Serpent() : BlockCipher(16, 16, 32, 8), round_key(132) {}
protected:
/**
* For use by subclasses using SIMD, asm, etc
* @return const reference to the key schedule
*/
- const SecureVector<u32bit, 132>& get_round_keys() const
+ const SecureVector<u32bit>& get_round_keys() const
{ return round_key; }
/**
@@ -42,7 +42,7 @@ class BOTAN_DLL Serpent : public BlockCipher
private:
void key_schedule(const byte key[], u32bit length);
- SecureVector<u32bit, 132> round_key;
+ SecureVector<u32bit> round_key;
};
}