Function esp_idf_svc::sys::mbedtls_ecp_check_privkey
source ยท pub unsafe extern "C" fn mbedtls_ecp_check_privkey(
grp: *const mbedtls_ecp_group,
d: *const mbedtls_mpi,
) -> i32
Expand description
\brief This function checks that an \c mbedtls_mpi is a valid private key for this curve.
\note This function uses bare components rather than an ::mbedtls_ecp_keypair structure to ease use with other structures, such as ::mbedtls_ecdh_context or ::mbedtls_ecdsa_context.
\param grp The ECP group the private key should belong to. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load(). \param d The integer to check. This must be initialized.
\return \c 0 if the point is a valid private key. \return #MBEDTLS_ERR_ECP_INVALID_KEY if the point is not a valid private key for the given curve. \return Another negative error code on other kinds of failure.