Group psa_tls_helpers
- group psa_tls_helpers
Functions
-
static inline psa_ecc_family_t mbedtls_ecc_group_to_psa(mbedtls_ecp_group_id grpid, size_t *bits)
Convert an ECC curve identifier from the Mbed TLS encoding to PSA.
Note
This function is provided solely for the convenience of Mbed TLS and may be removed at any time without notice.
- Parameters
grpid – An Mbed TLS elliptic curve identifier (
MBEDTLS_ECP_DP_xxx).bits – [out] On success, the bit size of the curve.
- Returns
The corresponding PSA elliptic curve identifier (
PSA_ECC_FAMILY_xxx).- Returns
0on failure (grpidis not recognized).
-
mbedtls_ecp_group_id mbedtls_ecc_group_of_psa(psa_ecc_family_t curve, size_t bits, int bits_is_sloppy)
Convert an ECC curve identifier from the PSA encoding to Mbed TLS.
Note
This function is provided solely for the convenience of Mbed TLS and may be removed at any time without notice.
- Parameters
curve – A PSA elliptic curve identifier (
PSA_ECC_FAMILY_xxx).bits – The bit-length of a private key on
curve.bits_is_sloppy – If true,
bitsmay be the bit-length rounded up to the nearest multiple of 8. This allows the caller to infer the exact curve from the length of a key which is supplied as a byte string.
- Returns
The corresponding Mbed TLS elliptic curve identifier (
MBEDTLS_ECP_DP_xxx).- Returns
MBEDTLS_ECP_DP_NONE if
curveis not recognized.- Returns
MBEDTLS_ECP_DP_NONE if
bitsis not correct forcurve.
-
static inline psa_ecc_family_t mbedtls_ecc_group_to_psa(mbedtls_ecp_group_id grpid, size_t *bits)