From 22f493dda9674df574abba300cf75d12ae62d510 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 12 Apr 2016 14:43:39 -0400 Subject: [PATCH] Fix the Rijndael timing attack counter measure (Issue 146) --- rijndael.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rijndael.cpp b/rijndael.cpp index ab9f70a0..71fa1b85 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -511,7 +511,7 @@ void Rijndael::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock // timing attack countermeasure. see comments at top for more details // If CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS is defined, // QUARTER_ROUND_LD will use Td, which is already preloaded. - u = 0; + u = _u; for (i=0; i<256; i+=cacheLineSize) u &= *(const word32 *)(const void *)(Sd+i); u &= *(const word32 *)(const void *)(Sd+252);