33 #if defined(LWS_WITH_MBEDTLS)
35 mbedtls_ecdh_context *ctx_ecdh;
36 mbedtls_ecdsa_context *ctx_ecdsa;
41 struct lws_context *context;
43 enum enum_genec_alg genec_alg;
48 #if defined(LWS_WITH_MBEDTLS)
49 enum enum_lws_dh_side {
50 LDHS_OURS = MBEDTLS_ECDH_OURS,
51 LDHS_THEIRS = MBEDTLS_ECDH_THEIRS
54 enum enum_lws_dh_side {
80 lws_genecdh_create(
struct lws_genec_ctx *ctx,
struct lws_context *context,
91 LWS_VISIBLE LWS_EXTERN
int
93 enum enum_lws_dh_side side);
104 LWS_VISIBLE LWS_EXTERN
int
105 lws_genecdh_new_keypair(
struct lws_genec_ctx *ctx,
enum enum_lws_dh_side side,
108 LWS_VISIBLE LWS_EXTERN
int
109 lws_genecdh_compute_shared_secret(
struct lws_genec_ctx *ctx, uint8_t *ss,
126 lws_genecdsa_create(
struct lws_genec_ctx *ctx,
struct lws_context *context,
137 LWS_VISIBLE LWS_EXTERN
int
138 lws_genecdsa_new_keypair(
struct lws_genec_ctx *ctx,
const char *curve_name,
148 LWS_VISIBLE LWS_EXTERN
int
173 LWS_VISIBLE LWS_EXTERN
int
174 lws_genecdsa_hash_sig_verify_jws(
struct lws_genec_ctx *ctx,
const uint8_t *in,
175 enum lws_genhash_types hash_type,
int keybits,
176 const uint8_t *sig,
size_t sig_len);
196 LWS_VISIBLE LWS_EXTERN
int
197 lws_genecdsa_hash_sign_jws(
struct lws_genec_ctx *ctx,
const uint8_t *in,
198 enum lws_genhash_types hash_type,
int keybits,
199 uint8_t *sig,
size_t sig_len);
204 LWS_VISIBLE LWS_EXTERN
void
207 LWS_VISIBLE LWS_EXTERN
void
210 LWS_VISIBLE LWS_EXTERN
int
Definition: lws-genec.h:60
Definition: lws-gencrypto.h:92
Definition: lws-genec.h:32