Lines Matching refs:el
559 static size_t qrx_get_cipher_ctx_idx(OSSL_QRX *qrx, OSSL_QRL_ENC_LEVEL *el, in qrx_get_cipher_ctx_idx() argument
600 idx = (el->state == QRL_EL_STATE_PROV_COOLDOWN ? el->key_epoch & 1 in qrx_get_cipher_ctx_idx()
609 switch (el->state) { in qrx_get_cipher_ctx_idx()
622 = el->key_epoch + ((el->key_epoch & 1) ^ (uint64_t)key_phase_bit); in qrx_get_cipher_ctx_idx()
633 *is_old_key = (el->key_epoch & 1) ^ (uint64_t)key_phase_bit; in qrx_get_cipher_ctx_idx()
634 *rx_key_epoch = el->key_epoch - (uint64_t)*is_old_key; in qrx_get_cipher_ctx_idx()
643 *rx_key_epoch = el->key_epoch; in qrx_get_cipher_ctx_idx()
670 OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(&qrx->el_set, in qrx_decrypt_pkt_body() local
678 if (!ossl_assert(el != NULL)) in qrx_decrypt_pkt_body()
681 if (el->tag_len >= src_len) in qrx_decrypt_pkt_body()
688 if (qrx->forged_pkt_count >= ossl_qrl_get_suite_max_forged_pkt(el->suite_id)) in qrx_decrypt_pkt_body()
691 cctx_idx = qrx_get_cipher_ctx_idx(qrx, el, enc_level, key_phase_bit, in qrx_decrypt_pkt_body()
693 if (!ossl_assert(cctx_idx < OSSL_NELEM(el->cctx))) in qrx_decrypt_pkt_body()
709 cctx = el->cctx[cctx_idx]; in qrx_decrypt_pkt_body()
716 memcpy(nonce, el->iv[cctx_idx], nonce_len); in qrx_decrypt_pkt_body()
727 el->tag_len, in qrx_decrypt_pkt_body()
728 (unsigned char *)src + src_len - el->tag_len) != 1) in qrx_decrypt_pkt_body()
736 if (EVP_CipherUpdate(cctx, dst, &l, src, src_len - el->tag_len) != 1) in qrx_decrypt_pkt_body()
795 OSSL_QRL_ENC_LEVEL *el = NULL; in qrx_process_pkt() local
939 el = ossl_qrl_enc_level_set_get(&qrx->el_set, enc_level, 1); in qrx_process_pkt()
940 assert(el != NULL); /* Already checked above */ in qrx_process_pkt()
943 if (!ossl_quic_hdr_protector_decrypt(&el->hpr, &ptrs)) in qrx_process_pkt()
1020 && rxe->hdr.key_phase != (el->key_epoch & 1)) in qrx_process_pkt()
1296 OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(&qrx->el_set, in ossl_qrx_get_key_epoch() local
1299 return el == NULL ? UINT64_MAX : el->key_epoch; in ossl_qrx_get_key_epoch()
1304 OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(&qrx->el_set, in ossl_qrx_key_update_timeout() local
1307 if (el == NULL) in ossl_qrx_key_update_timeout()
1310 if (el->state == QRL_EL_STATE_PROV_UPDATING in ossl_qrx_key_update_timeout()
1315 if (normal && el->state == QRL_EL_STATE_PROV_COOLDOWN in ossl_qrx_key_update_timeout()
1331 OSSL_QRL_ENC_LEVEL *el = ossl_qrl_enc_level_set_get(&qrx->el_set, in ossl_qrx_get_max_forged_pkt_count() local
1334 return el == NULL ? UINT64_MAX in ossl_qrx_get_max_forged_pkt_count()
1335 : ossl_qrl_get_suite_max_forged_pkt(el->suite_id); in ossl_qrx_get_max_forged_pkt_count()