AES: masked config: remove 176 bytes of zeroing on each AES finalize round
On MBEDTLS_AES_128_BIT_MASKED+FI_COUNTERMEASURES config the rk_mask array
was unconditionally zeroed on each dummy finalization round even though
it will be zeroed after the loop too. Remove the repeated zeroing to increase
overall transfer speed on DTLS session by 17..20% on a Cortex-M4.
Signed-off-by: Tero Jääskö <tero.jaasko@arm.com>
diff --git a/library/aes.c b/library/aes.c
index 061b6fd..72cfc10 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -1560,8 +1560,6 @@
{
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],