-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Size: AES Encrypt Only: Determine configurations #7367
Comments
With the mbedtls legacy API, that's a tricky one because single-block processing (what we call ECB mode) is always available. You can't tell from the existing configuration macros whether the application wants single-block processing in both directions, only for encryption, or not at all. So I don't see a way to get around adding a configuration option With the PSA API, the The modes that require both directions are ECB, CBC and XTS. The modes that require only encryption are CFB, OFB and CTR. |
Also encryption-only should be GCM and CCM, as they're based on CTR mode |
My plan is to add a configuration So I think we don't need |
Reconsider the configuration option |
I think that should be an internal option. If MBEDTLS_CIPHER_MODE_CBC and MBEDTLS_CIPHER_MODE_XTS are disabled and GCM or CCM is enabled, AES decrypt should be disabled. |
I created two separate PRs for this issue.
Personally, I think we should go with
Any comments? @tom-cosgrove-arm @gilles-peskine-arm |
I agree, this seems easier than managing differences between AES and ARIA/Camellia. |
Agreed |
(maybe below the line)
Gather list of AES-related configuration macros.
Look for "can we exclude AES decrypt if only these ones set"
DoD: We know which macros to examine to know if we can disable AES decryption code
The work in #2891 can be used as a reference
Related:
The text was updated successfully, but these errors were encountered: