mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-21 23:35:42 +01:00
Merge pull request #4053 from TeroJaasko/baremetal_aes_masking_speedup
Baremetal aes masking speedup
This commit is contained in:
commit
f63b2283f2
@ -1421,9 +1421,9 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
uint8_t round_ctrl_table[( 14 + AES_SCA_CM_ROUNDS + 2 )];
|
||||
|
||||
#if defined MBEDTLS_AES_128_BIT_MASKED
|
||||
uint32_t rk_masked[MBEDTLS_AES_128_EXPANDED_KEY_SIZE_IN_WORDS] = {0};
|
||||
uint8_t sbox_masked[256] = {0};
|
||||
uint32_t mask[10] = {0};
|
||||
uint32_t rk_masked[MBEDTLS_AES_128_EXPANDED_KEY_SIZE_IN_WORDS];
|
||||
uint8_t sbox_masked[256];
|
||||
uint32_t mask[10];
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_VALIDATE_AES_KEYS_INTEGRITY)
|
||||
@ -1560,8 +1560,6 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
{
|
||||
flow_control++;
|
||||
}
|
||||
//Cleanup the masked key
|
||||
mbedtls_platform_memset( rk_masked, 0, sizeof(rk_masked) );
|
||||
#else
|
||||
aes_fround_final( aes_data_ptr->rk_ptr,
|
||||
&aes_data_ptr->xy_values[0],
|
||||
|
Loading…
Reference in New Issue
Block a user