Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
We are currently testing PSA Crypto Sign and Verify operations using the Keystore, but we encounter failure/exception during execution.
Could you please review our setup and let us know if we are missing any required steps or configurations. Test code attached.
Apologies for the lengthy mail.
Please find the details below:
Environment:
- Evaluation Board: (LP-XDS-110): LP_EM_CC2745R10_Q1.
- SDK: simplelink_lowpower_f3_sdk_9_10_00_83
- IDE: CCS Version: 20.1.1.8__1.7.1
- HSM Firmware: simplelink_lowpower_f3_sdk_9_10_00_83\bin\hsm\cc27xxx10_hsm_fw_v3.0.0.bin
- SysCfg: PSA+Keystore is enabled.
- Initialization: psa_crypto_init is called and it succeeds.
APIs Tested:
- psa_generate_random -> Works as expected.
- ECDSA Sign and Verify (Direct driver APIs are called : drivers\ecdsa\ECDSALPF3HSM.c) -> Works correctly with ECDSA enabled in syscfg.
- ECDSA Sign and Verify using PSA wrapper APIs: Fails/throws exception. Note: ECDSA is not enabled in syscfg for this test
- PSA Wrapper API failures:
- psa_sign_message.
- PSA_KEY_LIFETIME_VOLATILE
- PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_HSM_ASSET_STORE, PSA_KEY_LOCATION_HSM_ASSET_STORE)
- psa_generate_key -> succeeds
- psa_export_public_key -> succeeds
- psa_sign_message -> fails
- call stack:attached
- /resized-image/__size/640x480/__key/communityserver-discussions-components-files/158/8712.CallStack.png
- PSA_KEY_LIFETIME_PERSISTENT
- psa_generate_key fails with -135 error if psa_set_key_id is not called.
- Throws exception in psa_generate_key if psa_set_key_id is done.
- Two step signing: psa_hash_compute + psa_sign_hash
- PSA_KEY_LIFETIME_VOLATILE
- psa_generate_key -> succeeds
- psa_hash_compute -> succeeds
- psa_sign_hash -> succeeds and signature is generated
- psa_verify_hash -> throws exception:
- callstack:attached
- /resized-image/__size/640x480/__key/communityserver-discussions-components-files/158/8712.CallStack.png
- PSA_KEY_LIFETIME_PERSISTENT
- psa_generate_key fails with -135 error if psa_set_key_id is not called.
- Throws exception in psa_generate_key if psa_set_key_id is done.
Questions:
- Is the ECC curve PSA_ECC_FAMILY_SECP_R1 fully supported and enabled. (It appears to be enabled as per the documentation)
- Are there any additional SysConfig settings required to properly enable ECC when using Keystore with persistent keys
- For testing with volatile keys, is it recommended to disable Keystore in SysConfig.
- Is there any example code available that demonstrates Keystore based asymmetric key operations (ex. ECDSA Sign/Verify) using PSA wrapper APIs.
Thank you
Mit freundlichen Grüßen / Best regards
Thwayyiba