diff --git a/aria.cpp b/aria.cpp index 922ef309..63931731 100644 --- a/aria.cpp +++ b/aria.cpp @@ -327,7 +327,7 @@ void ARIA::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, b t = UINT32_CAST(outBlock); BigEndianBlock::Put(rk, t)(t[0])(t[1])(t[2])(t[3]); -#endif +#endif // CRYPTOPP_LITTLE_ENDIAN #if CRYPTOPP_ARM_NEON_AVAILABLE if (HasNEON()) diff --git a/cast.cpp b/cast.cpp index 352fcdf8..b0ad3127 100644 --- a/cast.cpp +++ b/cast.cpp @@ -35,7 +35,8 @@ typedef BlockGetAndPut Block; void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const { - word32 t, l, r; + // TODO: add a SecBlock workspace to the class when the ABI can change + word32 t,l,r; /* Get inblock into l,r */ Block::Get(inBlock)(l)(r); @@ -65,7 +66,8 @@ void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const { - word32 t, l, r; + // TODO: add a SecBlock workspace to the class when the ABI can change + word32 t,l,r; /* Get inblock into l,r */ Block::Get(inBlock)(r)(l); @@ -90,8 +92,6 @@ void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, F1(l, r, 0, 16); /* Put l,r into outblock */ Block::Put(xorBlock, outBlock)(l)(r); - /* Wipe clean */ - t = l = r = 0; } void CAST128::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) @@ -213,6 +213,7 @@ the keys are used */ void CAST256::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const { + // TODO: add a SecBlock workspace to the class when the ABI can change word32 t, block[4]; Block::Get(inBlock)(block[0])(block[1])(block[2])(block[3]); @@ -255,6 +256,7 @@ void CAST256::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, { AssertValidKeyLength(keylength); + // TODO: add a SecBlock workspace to the class when the ABI can change word32 kappa[8]; GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength);