use MBEDTLS_OPTIMIZE_ALWAYS in AES-XTS
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
a0b166e11e
commit
6cfd9b54ae
1 changed files with 6 additions and 1 deletions
|
@ -1128,7 +1128,8 @@ typedef unsigned char mbedtls_be128[16];
|
|||
* for machine endianness and hence works correctly on both big and little
|
||||
* endian machines.
|
||||
*/
|
||||
static void mbedtls_gf128mul_x_ble(unsigned char r[16],
|
||||
MBEDTLS_OPTIMIZE_ALWAYS
|
||||
static inline void mbedtls_gf128mul_x_ble(unsigned char r[16],
|
||||
const unsigned char x[16])
|
||||
{
|
||||
uint64_t a, b, ra, rb;
|
||||
|
@ -1145,7 +1146,11 @@ static void mbedtls_gf128mul_x_ble(unsigned char r[16],
|
|||
|
||||
/*
|
||||
* AES-XTS buffer encryption/decryption
|
||||
*
|
||||
* Use of MBEDTLS_OPTIMIZE_ALWAYS here and for mbedtls_gf128mul_x_ble()
|
||||
* is a 3x performance improvement for gcc -Os!
|
||||
*/
|
||||
MBEDTLS_OPTIMIZE_ALWAYS
|
||||
int mbedtls_aes_crypt_xts(mbedtls_aes_xts_context *ctx,
|
||||
int mode,
|
||||
size_t length,
|
||||
|
|
Loading…
Reference in a new issue