33 #define LWS_JWE_RFC3394_OVERHEAD_BYTES 8
34 #define LWS_JWE_AES_IV_BYTES 16
36 #define LWS_JWE_LIMIT_RSA_KEY_BITS 4096
37 #define LWS_JWE_LIMIT_AES_KEY_BITS (512 + 64)
38 #define LWS_JWE_LIMIT_EC_KEY_BITS 528
39 #define LWS_JWE_LIMIT_HASH_BITS (LWS_GENHASH_LARGEST * 8)
42 #define LWS_JWE_LIMIT_KEY_ELEMENT_BYTES (LWS_JWE_LIMIT_RSA_KEY_BITS / 8)
87 char *temp,
int *temp_len);
152 const char *payload,
size_t len,
const char *nonce,
153 char *out,
size_t out_len,
struct lws_context *context);
LWS_VISIBLE LWS_EXTERN int lws_jwe_render_compact(struct lws_jwe *jwe, char *out, size_t out_len)
LWS_VISIBLE LWS_EXTERN void lws_jwe_be64(uint64_t c, uint8_t *p8)
uint8_t cek[LWS_JWE_LIMIT_KEY_ELEMENT_BYTES]
#define LWS_JWE_LIMIT_KEY_ELEMENT_BYTES
LWS_VISIBLE LWS_EXTERN int lws_jwe_auth_and_decrypt_cbc_hs(struct lws_jwe *jwe, uint8_t *enc_cek, uint8_t *aad, int aad_len)
LWS_VISIBLE LWS_EXTERN int lws_jwe_auth_and_decrypt(struct lws_jwe *jwe, char *temp, int *temp_len)
LWS_VISIBLE LWS_EXTERN int lws_jwe_encrypt(struct lws_jwe *jwe, char *temp, int *temp_len)
LWS_VISIBLE LWS_EXTERN int lws_jwe_json_parse(struct lws_jwe *jwe, const uint8_t *buf, int len, char *temp, int *temp_len)
LWS_VISIBLE LWS_EXTERN int lws_jwa_concat_kdf(struct lws_jwe *jwe, int direct, uint8_t *out, const uint8_t *shared_secret, int sslen)
LWS_VISIBLE LWS_EXTERN void lws_jwe_destroy(struct lws_jwe *jwe)
LWS_VISIBLE LWS_EXTERN int lws_jwe_create_packet(struct lws_jwe *jwe, const char *payload, size_t len, const char *nonce, char *out, size_t out_len, struct lws_context *context)
LWS_VISIBLE LWS_EXTERN void lws_jwe_init(struct lws_jwe *jwe, struct lws_context *context)
LWS_VISIBLE int lws_jwe_render_flattened(struct lws_jwe *jwe, char *out, size_t out_len)