aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/noekeon
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-21 14:31:08 +0000
committerlloyd <[email protected]>2010-06-21 14:31:08 +0000
commitb4fe5806546639fb78e630bdc5b323bf7988e9a1 (patch)
tree233dd4a61c587cb186d5dc5877dbfac53149897a /src/block/noekeon
parent928760016bae3887dedf1344d4b3d2e70155ef63 (diff)
In IDEA, Noekeon, Serpent, XTEA, provide and use ro accessor functions
for getting access to the key schedule, instead of giving the key schedule protected status, which is much harder tu audit.
Diffstat (limited to 'src/block/noekeon')
-rw-r--r--src/block/noekeon/noekeon.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/block/noekeon/noekeon.h b/src/block/noekeon/noekeon.h
index 018c1d1fd..2e524f8b8 100644
--- a/src/block/noekeon/noekeon.h
+++ b/src/block/noekeon/noekeon.h
@@ -26,15 +26,24 @@ class BOTAN_DLL Noekeon : public BlockCipher
BlockCipher* clone() const { return new Noekeon; }
Noekeon() : BlockCipher(16, 16) {}
- private:
- void key_schedule(const byte[], u32bit);
- protected: // for access by SIMD subclass
-
+ protected:
/**
* The Noekeon round constants
*/
static const byte RC[17];
+ /**
+ * @return const reference to encryption subkeys
+ */
+ const SecureVector<u32bit, 4>& get_EK() const { return EK; }
+
+ /**
+ * @return const reference to decryption subkeys
+ */
+ const SecureVector<u32bit, 4>& get_DK() const { return DK; }
+
+ private:
+ void key_schedule(const byte[], u32bit);
SecureVector<u32bit, 4> EK, DK;
};