Use inline for LEA_Encryption and LEA_Decryption

This commit is contained in:
Jeffrey Walton 2018-06-23 12:58:55 -04:00
parent 8279fab432
commit 09c8ae2835
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 5 additions and 6 deletions

View File

@ -43,10 +43,9 @@
# include <arm_neon.h>
#endif
#if (CRYPTOPP_SSSE3_AVAILABLE)
# include <emmintrin.h>
# include <pmmintrin.h>
# include <tmmintrin.h>
#if (CRYPTOPP_SSE2_INTRIN_AVAILABLE)
# include <immintrin.h>
# include <xmmintrin.h>
#endif
#if defined(CRYPTOPP_ALTIVEC_AVAILABLE)

View File

@ -255,7 +255,7 @@ inline uint32x4_t RepackNEON(const uint32x4_t& v)
return UnpackNEON<IDX>(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)
{