38 enum enum_genrsa_mode {
40 LGRSAM_PKCS1_OAEP_PSS,
46 #if defined(LWS_WITH_MBEDTLS)
47 mbedtls_rsa_context *ctx;
49 BIGNUM *bn[LWS_GENCRYPTO_RSA_KEYEL_COUNT];
53 struct lws_context *context;
54 enum enum_genrsa_mode mode;
76 LWS_VISIBLE LWS_EXTERN
int
78 struct lws_context *context,
enum enum_genrsa_mode mode,
79 enum lws_genhash_types oaep_hashid);
92 LWS_VISIBLE LWS_EXTERN
void
113 LWS_VISIBLE LWS_EXTERN
int
131 LWS_VISIBLE LWS_EXTERN
int
133 size_t in_len, uint8_t *out);
148 LWS_VISIBLE LWS_EXTERN
int
150 size_t in_len, uint8_t *out);
166 LWS_VISIBLE LWS_EXTERN
int
168 size_t in_len, uint8_t *out,
size_t out_max);
184 LWS_VISIBLE LWS_EXTERN
int
186 size_t in_len, uint8_t *out,
size_t out_max);
205 LWS_VISIBLE LWS_EXTERN
int
207 enum lws_genhash_types hash_type,
208 const uint8_t *sig,
size_t sig_len);
226 LWS_VISIBLE LWS_EXTERN
int
228 enum lws_genhash_types hash_type,
229 uint8_t *sig,
size_t sig_len);
239 LWS_VISIBLE LWS_EXTERN
void
251 LWS_VISIBLE LWS_EXTERN
int
253 uint8_t *pkey_asn1,
size_t pkey_asn1_len);
LWS_VISIBLE LWS_EXTERN int lws_genrsa_public_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in, size_t in_len, uint8_t *out, size_t out_max)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_new_keypair(struct lws_context *context, struct lws_genrsa_ctx *ctx, enum enum_genrsa_mode mode, struct lws_gencrypto_keyelem *el, int bits)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_create(struct lws_genrsa_ctx *ctx, struct lws_gencrypto_keyelem *el, struct lws_context *context, enum enum_genrsa_mode mode, enum lws_genhash_types oaep_hashid)
LWS_VISIBLE LWS_EXTERN void lws_genrsa_destroy_elements(struct lws_gencrypto_keyelem *el)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_private_decrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in, size_t in_len, uint8_t *out, size_t out_max)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_render_pkey_asn1(struct lws_genrsa_ctx *ctx, int _private, uint8_t *pkey_asn1, size_t pkey_asn1_len)
LWS_VISIBLE LWS_EXTERN void lws_genrsa_destroy(struct lws_genrsa_ctx *ctx)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_public_encrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in, size_t in_len, uint8_t *out)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_private_encrypt(struct lws_genrsa_ctx *ctx, const uint8_t *in, size_t in_len, uint8_t *out)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_hash_sig_verify(struct lws_genrsa_ctx *ctx, const uint8_t *in, enum lws_genhash_types hash_type, const uint8_t *sig, size_t sig_len)
LWS_VISIBLE LWS_EXTERN int lws_genrsa_hash_sign(struct lws_genrsa_ctx *ctx, const uint8_t *in, enum lws_genhash_types hash_type, uint8_t *sig, size_t sig_len)
Definition: lws-gencrypto.h:92
Definition: lws-genrsa.h:45