diff options
author | weidai <weidai11@users.noreply.github.com> | 2006-07-17 14:48:59 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2006-07-17 14:48:59 +0000 |
commit | c8e2f8959414846031634477b2a0614434843ca3 (patch) | |
tree | c8076624e56c952ffd234c8327848a392eb6ecd1 /rijndael.h | |
parent | 0156adfd5e7cd7061801b0ead374ed0c7e66a7df (diff) | |
download | cryptopp-git-c8e2f8959414846031634477b2a0614434843ca3.tar.gz |
AES timing attack countermeasures
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[]; |