Skip to content

crypto/mbedtls: Rename the option MBEDTLS_DES_C to MBEDTLS_DES. - #3858

Closed
casaroli wants to merge 1 commit into
apache:masterfrom
casaroli:mbedtls-des-rename
Closed

casaroli wants to merge 1 commit into
apache:masterfrom
casaroli:mbedtls-des-rename

Conversation

@casaroli

Copy link
Copy Markdown
Contributor

Summary

#3848 added the Kconfig option MBEDTLS_DES_C. The Espressif HAL reads CONFIG_MBEDTLS_DES_C too: it is an ESP-IDF option with the same name, and the HAL then defines MBEDTLS_DES_C for its own Mbed TLS (esp_config.h:2088). That Mbed TLS (TF-PSA-crypto) does not support DES, so esp32s3-devkit:mbedtls stops with:

tf_psa_crypto_config_check_user.h:153:4: error: #error "MBEDTLS_DES_C is not a valid configuration option."

This PR renames the option to MBEDTLS_DES. It keeps the same default (!MBEDTLS_MINIMAL) and still defines MBEDTLS_DES_C for the apps Mbed TLS, but the HAL does not see it. The help text says why the name differs.

This is an alternative to #3857, which removes the option instead. Only one of the two should merge.

The error was already in the CI of #3848, but Linux (xtensa-03) shows "cancelled" there: arm-13 failed on the nxboot break and fail-fast stopped the job after it had hit this error.

CI logs:

Impact

Every nuttx PR whose CI builds xtensa-03 fails on esp32s3-devkit:mbedtls since #3848 merged; this PR fixes that. No defconfig in nuttx or apps sets CONFIG_MBEDTLS_DES_C, so nothing needs the old name.

Testing

Local build of esp32s3-devkit:mbedtls (nuttx master c006807501d, xtensa-esp-elf 14.2.0, the same as CI):

  • apps master 06a5ce3: fails with the error above (CONFIG_MBEDTLS_DES_C=y).
  • this PR: builds (CONFIG_MBEDTLS_DES=y).

tools/checkpatch.sh -c -u -m -g passes.

c16a266 added the Kconfig option MBEDTLS_DES_C.  The Espressif HAL
reads CONFIG_MBEDTLS_DES_C, an ESP-IDF option with the same name, and
then defines MBEDTLS_DES_C for its own Mbed TLS.  That Mbed TLS
(TF-PSA-crypto) does not support DES and stops the build, so
esp32s3-devkit:mbedtls fails.

Rename the option, so that the HAL does not see it.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
Comment thread crypto/mbedtls/Kconfig
default !MBEDTLS_MINIMAL
---help---
Defines MBEDTLS_DES_C. The option is not called MBEDTLS_DES_C,
because the Espressif HAL reads CONFIG_MBEDTLS_DES_C for its own

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but should we fix esp HAL?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (and hope) that ESP-HAL does not use DES.

I suggest we remove DES as in #3857

@casaroli casaroli Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I think it does use DES but it has an internal implementation, it does not use DES from MbedTLS

@casaroli

Copy link
Copy Markdown
Contributor Author

keeping this as draft in case we re-decide we prefer the rename, or until #3857 is merged.

@casaroli
casaroli marked this pull request as draft October 17, 2026 14:01
@casaroli

Copy link
Copy Markdown
Contributor Author

remove bad cypher is better than renaming

@casaroli casaroli closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants