From 34151a54f66c145a4d3e43bc63d138408c887892 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 30 Sep 2023 22:00:20 -0400 Subject: [PATCH] Update comments --- aria.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aria.cpp b/aria.cpp index 3463366f..c2bd37f5 100644 --- a/aria.cpp +++ b/aria.cpp @@ -127,7 +127,7 @@ void ARIA::Base::UncheckedSetKey(const byte *key, unsigned int keylen, const Nam CRYPTOPP_ASSERT(0); } - // w0-w3 each has room for 16 bytes. t and u are 16 byte temp areas. + // w0-w3 each has room for 4 words (16 bytes). t and u are each 4 words (16 bytes) temp areas. // The storage requrements for w0-w3, t and u are 96 bytes or 24 words. word32 *w0 = m_w.data(), *w1 = m_w.data()+4, *w2 = m_w.data()+8, *w3 = m_w.data()+12, *t = m_w.data()+16; @@ -231,7 +231,7 @@ void ARIA::Base::UncheckedSetKey(const byte *key, unsigned int keylen, const Nam void ARIA::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const { const byte *rk = reinterpret_cast(m_rk.data()); - word32 *t = const_cast(m_w.data()+20); + word32 *t = const_cast(m_w.data()+16); // Timing attack countermeasure. See comments in Rijndael for more details. // We used Yun's 32-bit implementation, so we use words rather than bytes.