mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
use MBEDTLS_OPTIMIZE_ALWAYS in AES-XTS
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user