Function esp_idf_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(arg1: *mut c_void, arg2: *mut c_uchar, arg3: usize) -> c_int>,
    p_rng: *mut c_void,
) -> c_int
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.