psa_raw_key_agreement() and psa_key_derivation_key_agreement() don't work with opaque drivers #8747
Labels
component-psa
PSA keystore/dispatch layer (storage, drivers, …)
help-wanted
This issue is not being actively worked on, but PRs welcome.
size-l
Estimated task size: large (2w+)
Summary
PSA crypto drivers can offer transparent and opaque key agreement functions in
psa_driver_wrapper_key_agreement()
(the test driver also does so).However, calling
psa_raw_key_agreement()
andpsa_key_derivation_key_agreement()
fails for opaque keys, since these functions check the input key withpsa_get_and_lock_transparent_key_slot_with_policy()
instead ofpsa_get_and_lock_key_slot_with_policy()
.This is a very similar issue to #8461.
System information
Mbed TLS version: 3.5.1
Expected behavior
Calls to
psa_raw_key_agreement()
andpsa_key_derivation_key_agreement()
should work with opaque keys and hand over to the configured crypto driver viapsa_key_agreement_raw_internal()
.Actual behavior
Calls to
psa_raw_key_agreement()
andpsa_key_derivation_key_agreement()
with opaque keys returnPSA_ERROR_NOT_SUPPORTED
before reaching the crypto driver.The text was updated successfully, but these errors were encountered: