mbedtls_ecdh_read_public() function
This function parses and processes the ECDHE payload of a TLS ClientKeyExchange message. This is the third function used by a TLS server for ECDH(E) ciphersuites. (It is called after mbedtls_ecdh_setup() and mbedtls_ecdh_make_params().) \see ecp.h
Arguments
ctx
The ECDH context to use. This must be initialized and bound to a group, for example via mbedtls_ecdh_setup().
buf
The pointer to the ClientKeyExchange payload. This must be a readable buffer of length \p blen Bytes.
blen
The length of the input buffer \p buf in Bytes.
Return value
\c 0 on success. An \c MBEDTLS_ERR_ECP_XXX error code on failure.