Generic cipher max key length
- Dominant language
- C
- Stars
- 108
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
### 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
Contributor guide
Research direction
First verify the successor Mbed TLS repository, since this repository states that development has moved and no updates will be made here. In mbed-crypto, inspect the existing key-length constants and the references in library/ssl_ticket.c and library/cipher_wrap.c; done means a public upper-bound constant covers the largest default cipher key length.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100