TLS helper functions#

Functions#

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.

Function Documentation#

mbedtls_ecc_group_of_psa#

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.

Parameters
N/Acurve

A PSA elliptic curve identifier (PSA_ECC_FAMILY_xxx).

N/Abits

The bit-length of a private key on curve.

N/Abits_is_sloppy

If true, bits may 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.

Note

  • This function is provided solely for the convenience of Mbed TLS and may be removed at any time without notice.

Returns

  • The corresponding Mbed TLS elliptic curve identifier (MBEDTLS_ECP_DP_xxx).

  • #MBEDTLS_ECP_DP_NONE if curve is not recognized.

  • #MBEDTLS_ECP_DP_NONE if bits is not correct for curve.


Definition at line 603 of file util/third_party/mbedtls/include/psa/crypto_extra.h