RetroArch
ecdh.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_ECDH_H
24 #define MBEDTLS_ECDH_H
25 
26 #include "ecp.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
35 typedef enum
36 {
40 
44 typedef struct
45 {
55 }
57 
72  int (*f_rng)(void *, unsigned char *, size_t),
73  void *p_rng );
74 
94  const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
95  int (*f_rng)(void *, unsigned char *, size_t),
96  void *p_rng );
97 
104 
111 
129  unsigned char *buf, size_t blen,
130  int (*f_rng)(void *, unsigned char *, size_t),
131  void *p_rng );
132 
144  const unsigned char **buf, const unsigned char *end );
145 
159  mbedtls_ecdh_side side );
160 
175  unsigned char *buf, size_t blen,
176  int (*f_rng)(void *, unsigned char *, size_t),
177  void *p_rng );
178 
190  const unsigned char *buf, size_t blen );
191 
206  unsigned char *buf, size_t blen,
207  int (*f_rng)(void *, unsigned char *, size_t),
208  void *p_rng );
209 
210 #ifdef __cplusplus
211 }
212 #endif
213 
214 #endif /* ecdh.h */
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)
Generate a public key and a TLS ServerKeyExchange payload. (First function used by a TLS server for E...
Definition: ecdh.c:118
Elliptic curves over GF(p)
ECP group structure.
Definition: ecp.h:138
int mbedtls_ecdh_gen_public(mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Generate a public key. Raw function that only does the core computation.
Definition: ecdh.c:44
int mbedtls_ecdh_read_params(mbedtls_ecdh_context *ctx, const unsigned char **buf, const unsigned char *end)
Parse and procress a TLS ServerKeyExhange payload. (First function used by a TLS client for ECDHE....
Definition: ecdh.c:155
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
int mbedtls_ecdh_get_params(mbedtls_ecdh_context *ctx, const mbedtls_ecp_keypair *key, mbedtls_ecdh_side side)
Setup an ECDH context from an EC key. (Used by clients and servers in place of the ServerKeyEchange f...
Definition: ecdh.c:173
mbedtls_mpi _d
Definition: ecdh.h:54
GLdouble GLdouble z
Definition: glext.h:6514
mbedtls_ecp_point Vf
Definition: ecdh.h:53
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
int point_format
Definition: ecdh.h:51
mbedtls_ecp_group grp
Definition: ecdh.h:46
mbedtls_ecdh_side
Definition: ecdh.h:35
mbedtls_mpi d
Definition: ecdh.h:47
void mbedtls_ecdh_init(mbedtls_ecdh_context *ctx)
Initialize context.
Definition: ecdh.c:88
mbedtls_ecp_point Qp
Definition: ecdh.h:49
void mbedtls_ecdh_free(mbedtls_ecdh_context *ctx)
Free context.
Definition: ecdh.c:96
ECP point structure (jacobian coordinates)
Definition: ecp.h:106
MPI structure.
Definition: bignum.h:179
int mbedtls_ecdh_read_public(mbedtls_ecdh_context *ctx, const unsigned char *buf, size_t blen)
Parse and process a TLS ClientKeyExchange payload. (Second function used by a TLS server for ECDH(E)....
Definition: ecdh.c:220
Definition: ecdh.h:38
mbedtls_mpi z
Definition: ecdh.h:50
mbedtls_ecp_point Q
Definition: ecdh.h:48
ECDH context structure.
Definition: ecdh.h:44
GLuint GLuint end
Definition: glext.h:6292
mbedtls_ecp_point Vi
Definition: ecdh.h:52
int mbedtls_ecdh_calc_secret(mbedtls_ecdh_context *ctx, size_t *olen, unsigned char *buf, size_t blen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Derive and export the shared secret. (Last function used by both TLS client en servers....
Definition: ecdh.c:241
int mbedtls_ecdh_make_public(mbedtls_ecdh_context *ctx, size_t *olen, unsigned char *buf, size_t blen, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Generate a public key and a TLS ClientKeyExchange payload. (Second function used by a TLS client for ...
Definition: ecdh.c:199
int mbedtls_ecdh_compute_shared(mbedtls_ecp_group *grp, mbedtls_mpi *z, const mbedtls_ecp_point *Q, const mbedtls_mpi *d, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Compute shared secret Raw function that only does the core computation.
Definition: ecdh.c:54
Definition: ecdh.h:37
ECP key pair structure.
Definition: ecp.h:165