Product: nRF54L15, SDK: V2.9.0
Application: Matter + BLE multi-protocol
Hi,
we want to store X509 certificates in secure storage. I went went through Nordic supplied materials, Dev Zone and tried an implementation without success.
Material went through:
- https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/nrf/app_dev/device_guides/nrf54l/cryptography.html#ug-nrf54l-crypto-configuration
- https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/persistent-storage-of-keys-and-data-using-the-nrf-connect-sdk?utm_source=chatgpt.com
- The above one is good one, and it would help more if there would be sample application. The one provided is not easy one.
- Sample example: Hardware Unique Key, psa related etc.
- Nordic Dev Zone past tickets but can not find much help.
psa_ps_set() fails for PSA protected storage without TF-M
I added the below code in the matter + BLE application which was based on Nordic's Matter door lock example. I started with certificates initially, the stack crash occurred and then switch to the below simple example, which apparently someone else also tried.
I traced the code and found that the stack crash occurs when cracen_key_derivation_cmac_ctr_generate_K_0(operation) is called from /opt/nordic/ncs/v2.9.0/nrf/subsys/nrf_security/src/drivers/cracen/cracenpsa/src/key_derivation.c, line no 1134. I have added the printk's and I see the printk("In S7:T32 state=%d->",operation->state * 100) getting printed. I have another printk and it does not get executed.
The prj.conf settings are:
I have also added the code to generate HUK and MKEK - below is the code. The below functions calls the same function and completes successfully.
- The purpose is to store X509 certificates securely. Is there a better method and an sample solution available.
- If what I am pursuing is the correct method, then please advise a solution to overcome the stack crash. I feel that I am missing something, since the same functions are used/working when I try to derive a key based on HUK.