Function esp_idf_svc::sys::mbedtls_ecp_keypair_calc_public

source ·
pub unsafe extern "C" fn mbedtls_ecp_keypair_calc_public(
    key: *mut mbedtls_ecp_keypair,
    f_rng: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: usize) -> i32>,
    p_rng: *mut c_void,
) -> i32
Expand description

\brief Calculate the public key from a private key in a key pair.

\param key A keypair structure. It must have a private key set. If the public key is set, it will be overwritten. \param f_rng The RNG function. This must not be \c NULL. \param p_rng The RNG context to be passed to \p f_rng. This may be \c NULL if \p f_rng doesn’t need a context.

\return \c 0 on success. The key pair object can be used for operations that require the public key. \return An \c MBEDTLS_ERR_ECP_XXX or an \c MBEDTLS_ERR_MPI_XXX error code on calculation failure.