diff options
author | lloyd <[email protected]> | 2010-06-21 14:31:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-21 14:31:08 +0000 |
commit | b4fe5806546639fb78e630bdc5b323bf7988e9a1 (patch) | |
tree | 233dd4a61c587cb186d5dc5877dbfac53149897a /src/block/idea | |
parent | 928760016bae3887dedf1344d4b3d2e70155ef63 (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/idea')
-rw-r--r-- | src/block/idea/idea.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/block/idea/idea.h b/src/block/idea/idea.h index e9ccf366d..aed3be3ea 100644 --- a/src/block/idea/idea.h +++ b/src/block/idea/idea.h @@ -26,10 +26,19 @@ class BOTAN_DLL IDEA : public BlockCipher BlockCipher* clone() const { return new IDEA; } IDEA() : BlockCipher(8, 16) {} + protected: + /** + * @return const reference to encryption subkeys + */ + const SecureVector<u16bit, 52>& get_EK() const { return EK; } + + /** + * @return const reference to decryption subkeys + */ + const SecureVector<u16bit, 52>& get_DK() const { return DK; } + private: void key_schedule(const byte[], u32bit); - - protected: // for IDEA_SSE2 SecureVector<u16bit, 52> EK, DK; }; |