Official bridge from PK to PSA #7760
Labels
component-crypto
Crypto primitives and low-level interfaces
enhancement
size-m
Estimated task size: medium (~1w)
There are many scenarios where it's useful to use a legacy mbedtls API to construct a private key or a public key, then a PSA API to perform operations on the key. The PSA API is the future, it's where the accelerators and secure element drivers are, and in the long term it'll be the only API to perform operations. However, when it comes to constructing a key, the PSA API is lacking in many areas.
We are planning to extend the PSA API with a PK-like layer, but until then we need to provide a transition mechanism. In terms of timeline, this transition mechanism should appear in 3.x (to give users the benefits of PSA drivers), would remain in 4.x, and would be obsoleted by the time 5.0 comes out. The PSA API extension may or may not appear in 3.x, and even if it does, it's likely that it will miss some important use cases until after 4.0.
Some example use cases that are easy or at least doable with a pk→psa conversion, but require a lot of code duplication otherwise:
MBEDTLS_USE_PSA_CRYPTO
is enabled, it's often awkward to use due to the differences between the encoding of mechanisms and policies.ecp.h
to create a key? Given that ECC formats are simple, a pk bridge might not be the best way.(For the dual problem of exporting a PSA key and leveraging pkwrite, I think .
mbedtls_pk_setup_opaque
does the job adequately.)Goals of this issue (which may be broken down into sub-issues depending on how the development goes):
mbedtls_pk_wrap_as_opaque
, but it's intended for testing and may not be the right prototype or resource behavior.The text was updated successfully, but these errors were encountered: