diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-07-17 14:48:59 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-07-17 14:48:59 +0000 |
commit | 69fb6c7fd8f5f591b38bb134567ea0786182b0ca (patch) | |
tree | c8076624e56c952ffd234c8327848a392eb6ecd1 /rijndael.h | |
parent | dc4097807c67cdd91b7aeafc6f144e7f3640ae59 (diff) | |
download | cryptopp-69fb6c7fd8f5f591b38bb134567ea0786182b0ca.tar.gz |
AES timing attack countermeasures
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@226 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'rijndael.h')
-rw-r--r-- | rijndael.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -12,7 +12,7 @@ NAMESPACE_BEGIN(CryptoPP) //! _ struct Rijndael_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8> { - CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return "Rijndael";} + CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return CRYPTOPP_RIJNDAEL_NAME;} }; /// <a href="http://www.weidai.com/scan-mirror/cs.html#Rijndael">Rijndael</a> @@ -24,17 +24,17 @@ class CRYPTOPP_DLL Rijndael : public Rijndael_Info, public BlockCipherDocumentat void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); protected: - static const word32 Te0[256]; + // VS2005 workaround: have to put these on seperate lines, or error C2487 is triggered in DLL build + CRYPTOPP_L1_CACHE_ALIGN(static const byte Se[256]); + CRYPTOPP_L1_CACHE_ALIGN(static const byte Sd[256]); + CRYPTOPP_L1_CACHE_ALIGN(static const word32 Te0[256]); static const word32 Te1[256]; static const word32 Te2[256]; static const word32 Te3[256]; - static const word32 Te4[256]; - - static const word32 Td0[256]; + CRYPTOPP_L1_CACHE_ALIGN(static const word32 Td0[256]); static const word32 Td1[256]; static const word32 Td2[256]; static const word32 Td3[256]; - static const word32 Td4[256]; static const word32 rcon[]; |