psa_open_key failed PSA_ERROR_DOES_NOT_EXIST (-134) on nRF9151 with NCS v3.2.2 and MCUboot

Board: nRF9151DK (nrf9151dk/nrf9151/ns)

NCS version: v3.2.2

Softsim branch: master (59bac8b)

MCUboot: enabled

Issue:

Keys are provisioned successfully (SoftSIM keys written to KMU, SoftSIM fully provisioned) but psa_open_key returns -134 (PSA_ERROR_DOES_NOT_EXIST) during MILENAGE authentication.

*** Booting My Application v1.0.0-a2550914679b ***
*** Using nRF Connect SDK v3.2.2-74845e169be2 ***
*** Using Zephyr OS v4.2.99-fe4f0106803e ***
[00:00:00.257,263] <inf> fs_nvs: 8 Sectors of 4096 bytes
[00:00:00.257,293] <inf> fs_nvs: alloc wra: 1, 6d0
[00:00:00.257,293] <inf> fs_nvs: data wra: 1, 6d8
[00:00:00.263,519] <err> softsim_crypto: Failed to open key 10, error: -134
[00:00:00.265,045] <inf> softsim: Provisioning static profile
[00:00:00.265,289] <err> softsim_crypto: Failed to open a persistent key, ERR: -134
[00:00:00.265,380] <err> softsim_crypto: Failed to open a persistent key, ERR: -134
[00:00:00.265,472] <err> softsim_crypto: Failed to open a persistent key, ERR: -134
[00:00:00.265,502] <inf> softsim: SoftSIM keys written to KMU
[00:00:00.265,533] <inf> softsim: Provisioning SoftSIM 1/4
[00:00:00.356,597] <inf> softsim: Provisioning SoftSIM 2/4
[00:00:00.358,398] <inf> softsim: Provisioning SoftSIM 3/4
[00:00:00.360,473] <inf> softsim: Provisioning SoftSIM 4/4
[00:00:00.363,464] <inf> softsim: SoftSIM provisioned
[00:00:00.363,494] <inf> softsim: SoftSIM fully provisioned
[00:00:00.364,990] <inf> softsim: SoftSIM initialized

[00:02:36.056,793] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.056,884] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.056,976] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.057,098] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.057,189] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.057,281] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.057,373] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:36.057,495] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:46.748,901] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)
[00:02:46.749,023] <err> softsim_crypto: ss_utils_aes_decrypt: psa_open_key failed! (Error: -134)

Configs tried: -

CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n

- CONFIG_PSA_CRYPTO_DRIVER_CC3XX=n

- CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xC000

- CONFIG_TFM_ITS_NUM_ASSETS=20

- Increased heap to 65536 - Doubled tfm_its partition size to 0x4000 - All combinations of above , None resolved the issue.

Question: Is nRF9151 + MCUboot + NCS v3.2.2 a supported combination? Is there a known working configuration for this setup?

Parents Reply
  • Hi,

    I installed your project (73546ff7a219d43eb6cdcd47d23f1fd5a1dc67da) but I am getting implicit declaration warnings for the socket APIs and the port_check_provisioned() function. Are you not getting these warnings?

    And I am not getting any logs past the bootloaer either because of an assert somewhere in the sim library early on startup (I did not note down the exact location):

Children
No Data
Related