mbedtls_ecdh_make_params() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

mbedtls_ecdh_make_params() function

This function generates an EC key pair and exports its in the format used in a TLS ServerKeyExchange handshake message. This is the second function used by a TLS server for ECDHE ciphersuites. (It is called after mbedtls_ecdh_setup().) \see ecp.h

Syntax

int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx,     size_t *olen,     unsigned char *buf,     size_t blen,     int (*f_rng)(void *, unsigned char *, size_t),     void *p_rng );
Implemented in ecdh.c:340

Arguments

ctx

The ECDH context to use. This must be initialized and bound to a group, for example via mbedtls_ecdh_setup().

olen

The address at which to store the number of Bytes written.

buf

The destination buffer. This must be a writable buffer of length \p blen Bytes.

blen

The length of the destination buffer \p buf in Bytes.

f_rng

The RNG function to use. This must not be \c NULL.

p_rng

The RNG context to be passed to \p f_rng. This may be \c NULL in case \p f_rng doesn't need a context argument.

Return value

\c 0 on success. #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops(). Another \c MBEDTLS_ERR_ECP_XXX error code on failure.

References

LocationReferrerText
ecdh.c:340
int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
ecdh.h:276
int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
ssl_srv.c:3058ssl_prepare_server_key_exchange()
if( ( ret = mbedtls_ecdh_make_params(

Call Tree

Functions calling mbedtls_ecdh_make_params()
Functions called by mbedtls_ecdh_make_params()
all items filtered out
mbedtls_ecdh_make_params()
all items filtered out