23 #ifndef MBEDTLS_ECJPAKE_H
24 #define MBEDTLS_ECJPAKE_H
116 const unsigned char *secret,
145 unsigned char *buf,
size_t len,
size_t *olen,
146 int (*f_rng)(
void *,
unsigned char *,
size_t),
162 const unsigned char *buf,
180 unsigned char *buf,
size_t len,
size_t *olen,
181 int (*f_rng)(
void *,
unsigned char *,
size_t),
196 const unsigned char *buf,
214 unsigned char *buf,
size_t len,
size_t *olen,
215 int (*f_rng)(
void *,
unsigned char *,
size_t),
225 #if defined(MBEDTLS_SELF_TEST)
231 int mbedtls_ecjpake_self_test(
int verbose );
mbedtls_mpi xm1
My private key 1 C: x1, S: x3.
mbedtls_ecp_point Xp2
Peer public key 2 C: X4, S: X2.
mbedtls_ecp_point Xp1
Peer public key 1 C: X3, S: X1.
mbedtls_ecp_point Xm1
My public key 1 C: X1, S: X3.
int mbedtls_ecjpake_check(const mbedtls_ecjpake_context *ctx)
Elliptic curves over GF(p)
const mbedtls_md_info_t * md_info
Hash to use.
int mbedtls_ecjpake_setup(mbedtls_ecjpake_context *ctx, mbedtls_ecjpake_role role, mbedtls_md_type_t hash, mbedtls_ecp_group_id curve, const unsigned char *secret, size_t len)
Set up a context for use.
int point_format
Format for point export.
mbedtls_ecp_point Xp
Peer public key C: Xs, S: Xc.
mbedtls_ecp_point Xm2
My public key 2 C: X2, S: X4.
mbedtls_ecp_group grp
Elliptic curve.
mbedtls_mpi xm2
My private key 2 C: x2, S: x4.
void mbedtls_ecjpake_free(mbedtls_ecjpake_context *ctx)
Free a context's content.
mbedtls_mpi s
Pre-shared secret (passphrase)
int mbedtls_ecjpake_write_round_one(mbedtls_ecjpake_context *ctx, unsigned char *buf, size_t len, size_t *olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Generate and write the first round message (TLS: contents of the Client/ServerHello extension...
int mbedtls_ecjpake_write_round_two(mbedtls_ecjpake_context *ctx, unsigned char *buf, size_t len, size_t *olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Generate and write the second round message (TLS: contents of the Client/ServerKeyExchange) ...
mbedtls_ecjpake_role role
Are we client or server?
void mbedtls_ecjpake_init(mbedtls_ecjpake_context *ctx)
Initialize a context (just makes it ready for setup() or free()).
int mbedtls_ecjpake_derive_secret(mbedtls_ecjpake_context *ctx, unsigned char *buf, size_t len, size_t *olen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Derive the shared secret (TLS: Pre-Master Secret)
mbedtls_ecp_group_id
Domain parameters (curve, subgroup and generator) identifiers.
mbedtls_ecjpake_role
Roles in the EC J-PAKE exchange.
Generic message digest wrapper.
int mbedtls_ecjpake_read_round_one(mbedtls_ecjpake_context *ctx, const unsigned char *buf, size_t len)
Read and process the first round message (TLS: contents of the Client/ServerHello extension...
Message digest information.
ECP point structure (jacobian coordinates)
EC J-PAKE context structure.
int mbedtls_ecjpake_read_round_two(mbedtls_ecjpake_context *ctx, const unsigned char *buf, size_t len)
Read and process the second round message (TLS: contents of the Client/ServerKeyExchange) ...