Deduce MBEDTLS_BLOCK_CIPHER_NO_DECRYPT automatically #609

Open
opened 2024-05-22 08:49:54 -05:00 by gilles-peskine-arm · 0 comments
gilles-peskine-arm commented 2024-05-22 08:49:54 -05:00 (Migrated from github.com)

Deduce MBEDTLS_BLOCK_CIPHER_NO_DECRYPT automatically from PSA_WANT_ALG_xxx: enable it when no both-direction block cipher mode is enabled.

In Mbed TLS 3, this is a user option because enabling a block cipher (e.g. MBEDTLS_AES_C) enables ECB encryption and decryption. With PSA crypto, ECB is a separate compile-time option, so we do not need an extra option. Note that we are not interested in supporting e.g CBC encryption without decryption: this is not useful in practice.

Definition of done:

  • MBEDTLS_BLOCK_CIPHER_NO_DECRYPT is no longer a public option, but is defined internally based on PSA_WANT_ALG_xxx.
  • There is at least one test component that enables encryption-only block cipher modes, and verifies that the decryption code is not included in the build.
Deduce `MBEDTLS_BLOCK_CIPHER_NO_DECRYPT` automatically from `PSA_WANT_ALG_xxx`: enable it when no both-direction block cipher mode is enabled. In Mbed TLS 3, this is a user option because enabling a block cipher (e.g. `MBEDTLS_AES_C`) enables ECB encryption and decryption. With PSA crypto, ECB is a separate compile-time option, so we do not need an extra option. Note that we are not interested in supporting e.g CBC encryption without decryption: this is not useful in practice. Definition of done: * `MBEDTLS_BLOCK_CIPHER_NO_DECRYPT` is no longer a public option, but is defined internally based on `PSA_WANT_ALG_xxx`. * There is at least one test component that enables encryption-only block cipher modes, and verifies that the decryption code is not included in the build.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#609
No description provided.