mbedtls_ecp_tls_write_point() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
CodeScopeSTM32 Libraries and SamplesmbedTLSmbedtls_ecp_tls_write_point()

mbedtls_ecp_tls_write_point() function

This function exports a point as a TLS ECPoint record defined in RFC 4492, Section 5.4.

Syntax

int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp,     const mbedtls_ecp_point *pt,     int format,     size_t *olen,     unsigned char *buf,     size_t blen );
Implemented in ecp.c:872

Arguments

grp

The ECP group to use. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load().

pt

The point to be exported. This must be initialized.

format

The point format to use. This must be either #MBEDTLS_ECP_PF_COMPRESSED or #MBEDTLS_ECP_PF_UNCOMPRESSED.

olen

The address at which to store the length in Bytes of the data written.

buf

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

blen

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

Return value

\c 0 on success. #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the input is invalid. #MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL if the target buffer is too small to hold the exported point. Another negative error code on other kinds of failure.

References

LocationReferrerText
ecp.c:872
int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt,
ecp.h:714
int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp,
ecdh.c:325ecdh_make_params_internal()
if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format,
ecdh.c:519ecdh_make_public_internal()
return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format, olen,

Call Tree

Functions calling mbedtls_ecp_tls_write_point()
Functions called by mbedtls_ecp_tls_write_point()
mbedtls_ecp_tls_write_point()
all items filtered out
Data read by mbedtls_ecp_tls_write_point()
Data written by mbedtls_ecp_tls_write_point()
mbedtls_ecp_tls_write_point()
mbedtls_ecp_tls_write_point()::ret
all items filtered out