From 82939a7af9067c0aac70a9fdccddd88a4156d50a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 2 May 2016 06:26:19 -0400 Subject: [PATCH] Apply countermeasure hardening to Camellia --- camellia.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/camellia.cpp b/camellia.cpp index 8d0b4d4e..3bb9b323 100644 --- a/camellia.cpp +++ b/camellia.cpp @@ -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())); for (i=0; i<256; i+=cacheLineSize)