mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 12:55:34 +00:00
27a2688fbb
This commit introduces the public macro MBEDTLS_MAX_KEY_LENGTH, which evaluates to an upper bound for the key lengths of all enabled ciphers, in Bytes. This is analogous to the already existing macros MBEDTLS_MAX_IV_LENGTH and MBEDTLS_MAX_BLOCK_LENGTH, which provide upper bounds for the IV and block length, respectively. For now, MBEDTLS_MAX_KEY_LENGTH is 32 Bytes by default, and 64 in case XTS is enabled. This is a strict overapproximation for some restricted configurations. Ideally, the upper bound should be calculated exactly and automatically from the list of enabled ciphers. The same applies to the existing macros MBEDTLS_MAX_IV_LENGTH and MBEDTLS_MAX_BLOCK_LENGTH, though, and is left for future work. Signed-off-by: Hanno Becker <hanno.becker@arm.com> |
||
---|---|---|
.. | ||
mbedtls | ||
psa | ||
.gitignore | ||
CMakeLists.txt |