Hello!
We. are now developing on nrf82840 , using zephyr SDK 2.6.1 with toolchain v2.7.0
when our program runs, psa_import_key always return error code : -134
After google serach, we found an error code list here: https://docs.silabs.com/d/platform-security/4.3/error
It says the error code -134 is PSA_ERROR_NOT_SUPPORTED.
This is our code:
psa_status_t status;
LOG_INF("Generating random AES key...");
/* Configure the key attributes */
psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT);
psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE);
psa_set_key_algorithm(&key_attributes, PSA_ALG_GCM);
psa_set_key_type(&key_attributes, PSA_KEY_TYPE_AES);
psa_set_key_bits(&key_attributes, 128);
/* Generate a random key. The key is not exposed to the application,
* we can use it to encrypt/decrypt using the key handle
*/
status = psa_import_key(&key_attributes, sha1Key, TESLA_SHA1_PREFIX_LENGTH, key_handle);
if (status != PSA_SUCCESS)
{
LOG_INF("psa_generate_key failed! (Error: %d)", status);
return APP_ERROR;
}
}
the return status of psa_import_key is always -134.
This is our prj.con for reference:
You can use sha1Key : sha1[16]: 755fcd623d914ee3676a59cc03944063 for test.
Would you please help us to find out the solution?