Fix the Rijndael timing attack counter measure
parent
d8b02cfaaf
commit
9f335d719e
|
|
@ -391,7 +391,7 @@ void Rijndael::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
|||
// timing attack countermeasure. see comments at top for more details
|
||||
const int cacheLineSize = GetCacheLineSize();
|
||||
unsigned int i;
|
||||
word32 u = 0;
|
||||
volatile word32 u = 0;
|
||||
#if defined(CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS) || defined(CRYPTOPP_ALLOW_RIJNDAEL_UNALIGNED_DATA_ACCESS)
|
||||
for (i=0; i<2048; i+=cacheLineSize)
|
||||
#else
|
||||
|
|
@ -467,7 +467,7 @@ void Rijndael::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
|||
// timing attack countermeasure. see comments at top for more details
|
||||
const int cacheLineSize = GetCacheLineSize();
|
||||
unsigned int i;
|
||||
word32 u = 0;
|
||||
volatile word32 u = 0;
|
||||
#if defined(CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS) || defined(CRYPTOPP_ALLOW_RIJNDAEL_UNALIGNED_DATA_ACCESS)
|
||||
for (i=0; i<2048; i+=cacheLineSize)
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in New Issue