Function esp_idf_hal::sys::mbedtls_ecc_group_of_psa
source ยท pub unsafe extern "C" fn mbedtls_ecc_group_of_psa(
curve: u8,
bits: usize,
bits_is_sloppy: i32,
) -> u32
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.