Function esp_idf_sys::mbedtls_ecp_gen_keypair_base
source · pub unsafe extern "C" fn mbedtls_ecp_gen_keypair_base(
grp: *mut mbedtls_ecp_group,
G: *const mbedtls_ecp_point,
d: *mut mbedtls_mpi,
Q: *mut mbedtls_ecp_point,
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 This function generates a keypair with a configurable base point.
\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 to generate a key pair for. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load(). \param G The base point to use. This must be initialized and belong to \p grp. It replaces the default base point \c grp->G used by mbedtls_ecp_gen_keypair(). \param d The destination MPI (secret part). This must be initialized. \param Q The destination point (public part). This must be initialized. \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 argument.
\return \c 0 on success. \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX error code on failure.