mbedtls_ecjpake_derive_secret() function
Derive the shared secret (TLS: Pre-Master Secret).
Arguments
ctx
The ECJPAKE context to use. This must be initialized, set up and have performed both round one and two.
buf
The buffer to write the derived secret to. This must be a writable buffer of length \p len Bytes.
len
The length of \p buf in Bytes.
olen
The address at which to store the total number of Bytes written to \p buf. This must not be \c NULL.
f_rng
The RNG function to use. This must not be \c NULL.
p_rng
The RNG parameter to be passed to \p f_rng. This may be \c NULL if \p f_rng doesn't use a context.
Return value
\c 0 if successful. A negative error code on failure.
mbedtls_ecjpake_derive_secret() is called by 3 functions and calls 6 functions:
![]()
mbedtls_ecjpake_derive_secret()
mbedtls_ecjpake_derive_secret() reads 3 variables:
![]()
mbedtls_ecjpake_derive_secret()