Hi,
Iam trying to import an ECC privatekey(parsed through mbedtls_parse_key()) to PSA (psa_import_key()) (for ECDSA NIST-P256-SECP-R1), by following the suggestions here ==> https://github.com/Mbed-TLS/mbedtls/blob/development/docs/psa-transition.md (under the heading - Importing a PK key by export-import for an ECC private key). But, i get an undefined reference to `mbedtls_ecp_export' error. Is there a special flag that controls this? I can see that the definition of this function does exist in ecp.c.
Kind Regards, Mathi.
Turns out that our platform SDK had this under a different build configuration that had to be enabled. Please ignore my query.
Thanks, Mathi.
Hi Mathi,
I'm glad you could resolve your immediate problem. I'd just like to add that we realize that mixing PSA and PK APIs can be cumbersome, and the next release of Mbed TLS (3.6, scheduled late March/early April) will have significant improvements, especially if you need to support multiple elliptic curves. The development branch already has mbedtls_pk_import_into_psa() to automate the export-import step. the transition guide will be updated shortly.
Best regards,
Hi Gilles,
Thanks for the update. Meanwhile, I have written a parser myself for converting from PEM to DER and then extracting the key material bytes.
Kind Regards, Mathi.
mbed-tls@lists.trustedfirmware.org