Apply countermeasure hardening to Camellia

pull/131/head
Jeffrey Walton 2016-05-02 06:26:19 -04:00
parent d24babdecc
commit 82939a7af9
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,8 @@ void Camellia::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBloc
// timing attack countermeasure. see comments at top for more details
const int cacheLineSize = GetCacheLineSize();
unsigned int i;
word32 u = 0;
volatile word32 _u = 0;
word32 u = _u;
assert(IsAlignedOn(s1,GetAlignmentOf<word32>()));
for (i=0; i<256; i+=cacheLineSize)