1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-16 07:21:53 +03:00
Files
mbedtls/library
Gilles Peskine f5d7eef11f PSA operation structures: move less-used fields to the end
Move fields around to have fewer accesses outside the 128-element Thumb
direct access window.

In psa_hkdf_key_derivation_t, move the large fields (output_block, prk,
hmac) after the state bit-fields. Experimentally, it's slightly better
to put hmac last.

In aead_operation_t, tag_length was outside the window. The details depend
on the sizes of contexts included in ctx. Make the large ctx be the last
field.

In mbedtls_psa_hmac_operation_t, the opad field is outside the window when
SHA-512 is enabled. Moving opad before hash_ctx only saves 4 bytes and made
the structure clumsy, so I left it alone.

Results (arm-none-eabi-gcc 7.3.1, build_arm_none_eabi_gcc_m0plus build):
library/psa_crypto.o: 16246 -> 16166 (diff: 80)
library/psa_crypto_aead.o: 952 -> 928 (diff: 24)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-16 15:00:17 +01:00
..
2021-10-25 21:24:23 +02:00
2021-08-03 14:01:51 +01:00
2021-09-30 15:51:05 +02:00
2021-06-07 21:42:15 +02:00
2021-06-25 14:59:15 +01:00
2021-08-03 13:39:57 +01:00
2021-08-03 13:39:57 +01:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-04-07 12:45:35 +01:00
2021-08-03 13:39:57 +01:00
2021-04-15 11:19:47 +01:00
2021-04-15 11:19:47 +01:00
2021-10-08 18:28:15 +02:00
2020-11-25 13:10:50 +01:00
2021-10-28 10:07:37 +02:00
2020-11-25 13:10:50 +01:00
2021-08-03 13:39:57 +01:00
2021-08-03 13:39:57 +01:00
2021-08-03 13:39:57 +01:00
2021-08-03 14:08:26 +01:00
2021-08-20 15:56:22 +01:00
2021-08-23 12:49:14 +01:00
2021-08-23 11:45:36 +01:00
2021-04-15 11:19:47 +01:00
2021-04-15 11:19:47 +01:00
2021-04-15 11:19:47 +01:00