Skip to main content

mbedtls_ecdsa_genkey

Function mbedtls_ecdsa_genkey 

Source
pub unsafe extern "C" fn mbedtls_ecdsa_genkey(
    ctx: *mut mbedtls_ecdsa_context,
    gid: mbedtls_ecp_group_id,
    f_rng: mbedtls_f_rng_t,
    p_rng: *mut c_void,
) -> c_int
Expand description

\brief This function generates an ECDSA keypair on the given curve.

\see ecp.h

\param ctx The ECDSA context to store the keypair in. This must be initialized. \param gid The elliptic curve to use. One of the various \c MBEDTLS_ECP_DP_XXX macros depending on configuration. \param f_rng The RNG function to use. 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 code on failure.