Mbedtls compilation with DES enabled by default

Hello,

I'm developing with nRF5280-DK, using Zephyr-OS with mbedtls for the cryptography, and I need to have DES and 3DES enabled by default.

I tried to set in the prj.conf file : CONFIG_MBEDTLS_CIPHER_DES_ENABLED=y, but it's not working and each time Zephyr is recompiled  in nrf-config.h, MBEDTLS_DES_C is always undefined. Do you know how to define this value by default in the project ?

Thank you,

Jean-Baptiste

Parents
  • Hi Jean-Baptiste,

    DES is not supported nor tested in the nRF Connect SDK, and so this will never match the criteria in zephyr/modules/mbedtls/Kconfig.tls-generic. Therefor it will be set to 0, and you should see a warning similar to this if you check the prj.conf in VS Code:

    CONFIG_MBEDTLS_CIPHER_DES_ENABLED was assigned the value y, but got the value n. Missing dependencies:
    (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS) || (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS && 0)
    I did not get a chances to test this myself, but it should be possible to modify Kconfig.tls-generic to allow CONFIG_MBEDTLS_CIPHER_DES_ENABLED.

Reply
  • Hi Jean-Baptiste,

    DES is not supported nor tested in the nRF Connect SDK, and so this will never match the criteria in zephyr/modules/mbedtls/Kconfig.tls-generic. Therefor it will be set to 0, and you should see a warning similar to this if you check the prj.conf in VS Code:

    CONFIG_MBEDTLS_CIPHER_DES_ENABLED was assigned the value y, but got the value n. Missing dependencies:
    (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS) || (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS && 0)
    I did not get a chances to test this myself, but it should be possible to modify Kconfig.tls-generic to allow CONFIG_MBEDTLS_CIPHER_DES_ENABLED.

Children
Related