Function esp_idf_sys::mbedtls_ecc_group_of_psa

source ยท
pub unsafe extern "C" fn mbedtls_ecc_group_of_psa(
    curve: psa_ecc_family_t,
    bits: usize,
    bits_is_sloppy: c_int,
) -> mbedtls_ecp_group_id
Expand description

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.

\param curve A PSA elliptic curve identifier (PSA_ECC_FAMILY_xxx). \param bits The bit-length of a private key on \p curve. \param bits_is_sloppy If true, \p 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.

\return The corresponding Mbed TLS elliptic curve identifier (MBEDTLS_ECP_DP_xxx). \return #MBEDTLS_ECP_DP_NONE if \c curve is not recognized. \return #MBEDTLS_ECP_DP_NONE if \p bits is not correct for \p curve.