mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Add ecdh_{make,read}_public()
This commit is contained in:
@@ -122,6 +122,33 @@ int ecdh_make_params( ecdh_context *ctx, size_t *olen,
|
||||
int ecdh_read_params( ecdh_context *ctx,
|
||||
const unsigned char **buf, const unsigned char *end );
|
||||
|
||||
/**
|
||||
* \brief Setup and export the client's public value
|
||||
*
|
||||
* \param ctx ECDH context
|
||||
* \param olen number of bytes actually written
|
||||
* \param buf destination buffer
|
||||
* \param blen size of destination buffer
|
||||
*
|
||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
||||
*/
|
||||
int ecdh_make_public( ecdh_context *ctx, size_t *olen,
|
||||
unsigned char *buf, size_t blen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
|
||||
/**
|
||||
* \brief Parse and import the client's public value
|
||||
*
|
||||
* \param ctx ECDH context
|
||||
* \param buf start of input buffer
|
||||
* \param blen length of input buffer
|
||||
*
|
||||
* \return 0 if successful, or an POLARSSL_ERR_ECP_XXX error code
|
||||
*/
|
||||
int ecdh_read_public( ecdh_context *ctx,
|
||||
const unsigned char *buf, size_t blen );
|
||||
|
||||
/**
|
||||
* \brief Checkup routine
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user