MBEDTLS_PSA vs TINYCRYPT 5% more flash usage

Hello, 

I have recently upgraded from v2.9 to v3.0.1 and have noticed that the mesh security has changed from CONFIG_BT_MESH_USES_TINYCRYPT to CONFIG_BT_MESH_USES_MBEDTLS_PSA,

see https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/bt/bt_mesh/configuring.html#security_toolbox

MBEDTLS_PSA uses 5% more flash over TINYCRIPT, 

Is there any ram reduction Kconfigs I can look into as my application no longer fits in my image size.

Thank you, 

Shahin

  • Hi Shahin

    I raised a question to the Mesh team to confirm, but based on the link you shared it seems like you can switch between TINYCRYPT, MBEDTLS and TFM PSA by changing what config is set in your application. Note that we would recommend using MBEDTLS and TFM since TINYCRYPT has worse security materials protection compared to others, because it keeps the keys in the memory in open form and is not recommended for future designs.

    If you want to optimize size for your application, you can also check out the Memory footprint optimization guidance here. However, MBEDTLS and TFM is larger by design, so it might not be possible to fit if you're very constrained on memory I'm afraid.

    Best regards,

    Simon

Related