aboutsummaryrefslogtreecommitdiffstats
path: root/src/block
diff options
context:
space:
mode:
Diffstat (limited to 'src/block')
-rw-r--r--src/block/serpent/serpent.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h
index 1c13d00f9..dc81d4178 100644
--- a/src/block/serpent/serpent.h
+++ b/src/block/serpent/serpent.h
@@ -26,8 +26,22 @@ class BOTAN_DLL Serpent : public BlockCipher
BlockCipher* clone() const { return new Serpent; }
Serpent() : BlockCipher(16, 16, 32, 8) {}
protected:
+ /**
+ * For use by subclasses using SIMD, asm, etc
+ * @return const reference to the key schedule
+ */
+ const SecureVector<u32bit, 132>& get_round_keys() const
+ { return round_key; }
+
+ /**
+ * For use by subclasses that implement the key schedule
+ * @param ks is the new key schedule value to set
+ */
+ void set_round_keys(const u32bit ks[132])
+ { round_key.set(ks, 132); }
+
+ private:
void key_schedule(const byte key[], u32bit length);
-
SecureVector<u32bit, 132> round_key;
};