diff --git a/adv-simd.h b/adv-simd.h index 1cbd67ae..24e01e20 100644 --- a/adv-simd.h +++ b/adv-simd.h @@ -43,10 +43,9 @@ # include #endif -#if (CRYPTOPP_SSSE3_AVAILABLE) -# include -# include -# include +#if (CRYPTOPP_SSE2_INTRIN_AVAILABLE) +# include +# include #endif #if defined(CRYPTOPP_ALTIVEC_AVAILABLE) diff --git a/lea-simd.cpp b/lea-simd.cpp index ac43bdf7..a43b719a 100644 --- a/lea-simd.cpp +++ b/lea-simd.cpp @@ -255,7 +255,7 @@ inline uint32x4_t RepackNEON(const uint32x4_t& v) return UnpackNEON(v); } -void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds) +inline void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds) { temp[3] = RotateRight<3>(Add(Xor(temp[2], LoadKey<4>(subkeys)), Xor(temp[3], LoadKey<5>(subkeys)))); temp[2] = RotateRight<5>(Add(Xor(temp[1], LoadKey<2>(subkeys)), Xor(temp[2], LoadKey<3>(subkeys)))); @@ -368,7 +368,7 @@ void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int roun } } -void LEA_Decryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds) +inline void LEA_Decryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds) { if(rounds > 28) {