From 1543649ead50f2c1a0cdb2a3a8134d0cbcc81098 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 28 Apr 2017 21:35:55 -0400 Subject: [PATCH] Cleanup ARIA typedefs --- aria.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/aria.cpp b/aria.cpp index 041be215..8e2a561b 100644 --- a/aria.cpp +++ b/aria.cpp @@ -176,17 +176,8 @@ ANONYMOUS_NAMESPACE_END NAMESPACE_BEGIN(CryptoPP) -#if defined(IS_LITTLE_ENDIAN) -typedef BlockGetAndPut AlignedBigEndianBlock; typedef BlockGetAndPut BigEndianBlock; -typedef BlockGetAndPut AlignedNativeEndianBlock; -typedef BlockGetAndPut NativeEndianBlock; -#else -typedef BlockGetAndPut AlignedBigEndianBlock; -typedef BlockGetAndPut BigEndianBlock; -typedef BlockGetAndPut AlignedNativeEndianBlock; -typedef BlockGetAndPut NativeEndianBlock; -#endif +typedef BlockGetAndPut NativeEndianBlock; inline byte ARIA_BRF(const word32 x, const int y) { return GETBYTE(x, y); @@ -194,7 +185,7 @@ inline byte ARIA_BRF(const word32 x, const int y) { // Key XOR Layer #define ARIA_KXL { \ - AlignedNativeEndianBlock::Put(rk, t)(t[0])(t[1])(t[2])(t[3]); \ + NativeEndianBlock::Put(rk, t)(t[0])(t[1])(t[2])(t[3]); \ } // S-Box Layer 1 + M @@ -313,7 +304,7 @@ void ARIA::Base::UncheckedSetKey(const byte *key, unsigned int keylen, const Nam } else { - _mm_store_si128(reinterpret_cast<__m128i*>(w1), _mm_setzero_si128()); + w1[0]=w1[1]=w1[2]=w1[3]=0; } } else