• Home
  • Raw
  • Download

Lines Matching refs:jwe

53 lws_jwe_encrypt_gcm(struct lws_jwe *jwe,  in lws_jwe_encrypt_gcm()  argument
64 if (jwe->jws.map.len[LJWE_ATAG] != LWS_AESGCM_TAG) { in lws_jwe_encrypt_gcm()
66 __func__, jwe->jws.map.len[LJWE_ATAG]); in lws_jwe_encrypt_gcm()
70 if (jwe->jws.map.len[LJWE_IV] != LWS_AESGCM_IV) { /* MUST be 96-bit */ in lws_jwe_encrypt_gcm()
72 jwe->jws.map.len[LJWE_IV]); in lws_jwe_encrypt_gcm()
78 el.len = jwe->jose.enc_alg->keybits_fixed / 8; in lws_jwe_encrypt_gcm()
90 (uint8_t *)jwe->jws.map.buf[LJWE_IV], in lws_jwe_encrypt_gcm()
91 (uint8_t *)jwe->jws.map.buf[LJWE_ATAG], &ivs, in lws_jwe_encrypt_gcm()
99 n = lws_genaes_crypt(&aesctx, (uint8_t *)jwe->jws.map.buf[LJWE_CTXT], in lws_jwe_encrypt_gcm()
100 jwe->jws.map.len[LJWE_CTXT], in lws_jwe_encrypt_gcm()
101 (uint8_t *)jwe->jws.map.buf[LJWE_CTXT], in lws_jwe_encrypt_gcm()
102 (uint8_t *)jwe->jws.map.buf[LJWE_IV], in lws_jwe_encrypt_gcm()
106 n |= lws_genaes_destroy(&aesctx, (uint8_t *)jwe->jws.map.buf[LJWE_ATAG], in lws_jwe_encrypt_gcm()
113 return (int)jwe->jws.map.len[LJWE_CTXT]; in lws_jwe_encrypt_gcm()
117 lws_jwe_auth_and_decrypt_gcm(struct lws_jwe *jwe, in lws_jwe_auth_and_decrypt_gcm() argument
129 if (jwe->jws.map.len[LJWE_ATAG] != LWS_AESGCM_TAG) { in lws_jwe_auth_and_decrypt_gcm()
131 __func__, jwe->jws.map.len[LJWE_ATAG]); in lws_jwe_auth_and_decrypt_gcm()
135 if (jwe->jws.map.len[LJWE_IV] != LWS_AESGCM_IV) { /* MUST be 96-bit */ in lws_jwe_auth_and_decrypt_gcm()
137 jwe->jws.map.len[LJWE_IV]); in lws_jwe_auth_and_decrypt_gcm()
143 el.len = jwe->jose.enc_alg->keybits_fixed / 8; in lws_jwe_auth_and_decrypt_gcm()
154 (uint8_t *)jwe->jws.map.buf[LJWE_IV], in lws_jwe_auth_and_decrypt_gcm()
155 (uint8_t *)jwe->jws.map.buf[LJWE_ATAG], &ivs, 16); in lws_jwe_auth_and_decrypt_gcm()
160 n = lws_genaes_crypt(&aesctx, (uint8_t *)jwe->jws.map.buf[LJWE_CTXT], in lws_jwe_auth_and_decrypt_gcm()
161 jwe->jws.map.len[LJWE_CTXT], in lws_jwe_auth_and_decrypt_gcm()
162 (uint8_t *)jwe->jws.map.buf[LJWE_CTXT], in lws_jwe_auth_and_decrypt_gcm()
163 (uint8_t *)jwe->jws.map.buf[LJWE_IV], in lws_jwe_auth_and_decrypt_gcm()
164 (uint8_t *)jwe->jws.map.buf[LJWE_ATAG], &ivs, 16); in lws_jwe_auth_and_decrypt_gcm()
172 return (int)jwe->jws.map.len[LJWE_CTXT]; in lws_jwe_auth_and_decrypt_gcm()