mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Merged EC key generation support
This commit is contained in:
@ -204,6 +204,15 @@ const ecp_curve_info *ecp_curve_info_from_grp_id( ecp_group_id grp_id );
|
||||
*/
|
||||
const ecp_curve_info *ecp_curve_info_from_tls_id( uint16_t tls_id );
|
||||
|
||||
/**
|
||||
* \brief Get curve information from a human-readable name
|
||||
*
|
||||
* \param name The name
|
||||
*
|
||||
* \return The associated curve information or NULL
|
||||
*/
|
||||
const ecp_curve_info *ecp_curve_info_from_name( const char *name );
|
||||
|
||||
/**
|
||||
* \brief Initialize a point (as zero)
|
||||
*/
|
||||
@ -535,6 +544,20 @@ int ecp_gen_keypair( ecp_group *grp, mpi *d, ecp_point *Q,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
|
||||
/**
|
||||
* \brief Generate a keypair
|
||||
*
|
||||
* \param grp_id ECP group identifier
|
||||
* \param key Destination keypair
|
||||
* \param f_rng RNG function
|
||||
* \param p_rng RNG parameter
|
||||
*
|
||||
* \return 0 if successful,
|
||||
* or a POLARSSL_ERR_ECP_XXX or POLARSSL_MPI_XXX error code
|
||||
*/
|
||||
int ecp_gen_key( ecp_group_id grp_id, ecp_keypair *key,
|
||||
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );
|
||||
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
*
|
||||
|
Reference in New Issue
Block a user