ARMmbed / mbed-crypto

The development of Mbed Crypto has moved to Mbed TLS. No updates will be made to the mbed-crypto repository anymore.
Apache License 2.0
103 stars 97 forks source link

Generic cipher max key length #226

Open nanokatze opened 5 years ago

nanokatze commented 5 years ago

Description

Given the existence of MBEDTLS_MAX_IV_LENGTH and MBEDTLS_MAX_BLOCK_LENGTH constants, which give upper bounds on ciphers' IV and block lengths respectively, would it be possible to add such a constant for ciphers' key lengths? A possible use case: https://github.com/ARMmbed/mbedtls/blob/535ee4a35b9c4ddd059451b8fa5b201bfc89fbcf/library/ssl_ticket.c#L55.

In the current default set of ciphers, AES 256 XTS https://github.com/ARMmbed/mbed-crypto/blob/development/library/cipher_wrap.c#L510 has the largest key of 512 bits (64 octets).

Issue request type

[ ] Question
[x] Enhancement
[ ] Bug
ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-873

adbridge commented 4 years ago

Apologies, this was closed in error by the automated bot - re-opening.