36 #if defined(LWS_WITH_MBEDTLS)
37 #include <mbedtls/aes.h>
38 #include <mbedtls/gcm.h>
65 #define LWS_AES_BLOCKSIZE 128
66 #define LWS_AES_CBC_BLOCKLEN 16
69 #if defined(LWS_WITH_MBEDTLS)
71 mbedtls_aes_context
ctx;
72 #if defined(MBEDTLS_CIPHER_MODE_XTS)
73 mbedtls_aes_xts_context ctx_xts;
75 mbedtls_gcm_context ctx_gcm;
83 unsigned char tag[16];
166 uint8_t *iv_or_nonce_ctr_or_data_unit_16,
168 size_t *nc_or_iv_off,
int taglen);
const EVP_CIPHER * cipher
enum enum_aes_operation op
struct lws_gencrypto_keyelem * k
enum enum_aes_padding padding
LWS_VISIBLE LWS_EXTERN int lws_genaes_crypt(struct lws_genaes_ctx *ctx, const uint8_t *in, size_t len, uint8_t *out, uint8_t *iv_or_nonce_ctr_or_data_unit_16, uint8_t *stream_block_16, size_t *nc_or_iv_off, int taglen)
LWS_VISIBLE LWS_EXTERN int lws_genaes_destroy(struct lws_genaes_ctx *ctx, unsigned char *tag, size_t tlen)
LWS_VISIBLE LWS_EXTERN int lws_genaes_create(struct lws_genaes_ctx *ctx, enum enum_aes_operation op, enum enum_aes_modes mode, struct lws_gencrypto_keyelem *el, enum enum_aes_padding padding, void *engine)