/freebsd/sys/crypto/openssl/ |
H A D | ossl_chacha20.c | 192 Poly1305_Update(&auth_ctx, crp->crp_aad, crp->crp_aad_length); in ossl_chacha20_poly1305_encrypt() 194 crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in ossl_chacha20_poly1305_encrypt() 196 if (crp->crp_aad_length % 16 != 0) { in ossl_chacha20_poly1305_encrypt() 200 16 - crp->crp_aad_length % 16); in ossl_chacha20_poly1305_encrypt() 284 le64enc(block, crp->crp_aad_length); in ossl_chacha20_poly1305_encrypt() 339 Poly1305_Update(&auth_ctx, crp->crp_aad, crp->crp_aad_length); in ossl_chacha20_poly1305_decrypt() 341 crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in ossl_chacha20_poly1305_decrypt() 343 if (crp->crp_aad_length % 16 != 0) { in ossl_chacha20_poly1305_decrypt() 347 16 - crp->crp_aad_length % 16); in ossl_chacha20_poly1305_decrypt() 361 le64enc(block, crp->crp_aad_length); in ossl_chacha20_poly1305_decrypt()
|
H A D | ossl_aes.c | 208 if (ctx.ops->aad(&ctx, crp->crp_aad, crp->crp_aad_length) != 0) in ossl_aes_gcm() 213 for (size_t alen = crp->crp_aad_length; alen > 0; in ossl_aes_gcm()
|
H A D | ossl.c | 336 error = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); in ossl_process_hash() 339 crp->crp_aad_length, axf->Update, &ctx); in ossl_process_hash()
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t4_crypto.c | 845 if (crp->crp_aad_length + iv_len > MAX_AAD_LEN) in ccr_eta() 865 if (iv_len + crp->crp_aad_length + crp->crp_payload_length + in ccr_eta() 869 if (iv_len + crp->crp_aad_length + crp->crp_payload_length > in ccr_eta() 875 iv_len + crp->crp_aad_length); in ccr_eta() 922 input_len = crp->crp_aad_length + crp->crp_payload_length; in ccr_eta() 944 if (crp->crp_aad_length != 0) { in ccr_eta() 947 crp->crp_aad, crp->crp_aad_length); in ccr_eta() 951 crp->crp_aad_length); in ccr_eta() 970 if (crp->crp_aad_length != 0) { in ccr_eta() 972 aad_stop = aad_start + crp->crp_aad_length in ccr_eta() [all...] |
/freebsd/sys/dev/qat/qat/ |
H A D | qat_ocf_utils.c | 134 ocf_dsession->encSession.aadLen != crp->crp_aad_length) || in qat_ocf_handle_session_update() 136 ocf_dsession->decSession.aadLen != crp->crp_aad_length)) { in qat_ocf_handle_session_update() 137 newAADLength = crp->crp_aad_length; in qat_ocf_handle_session_update()
|
H A D | qat_ocf_mem_pool.c | 143 if (crp->crp_aad_length == 0 || in qat_ocf_crypto_load_obuf_cb() 159 to_copy = crp->crp_aad_length; in qat_ocf_crypto_load_obuf_cb()
|
/freebsd/sys/crypto/aesni/ |
H A D | aesni.c | 639 if (crp->crp_aad_length == 0) { in aesni_cipher_crypt() 645 crp->crp_aad_length, &authallocated); in aesni_cipher_crypt() 717 crp->crp_payload_length, crp->crp_aad_length, in aesni_cipher_crypt() 725 crp->crp_payload_length, crp->crp_aad_length, in aesni_cipher_crypt() 734 crp->crp_payload_length, crp->crp_aad_length, in aesni_cipher_crypt() 743 crp->crp_payload_length, crp->crp_aad_length, in aesni_cipher_crypt() 803 crp->crp_aad_length); in aesni_cipher_mac() 806 crp->crp_aad_length, ses->hash_update, &sctx); in aesni_cipher_mac() 837 crp->crp_aad_length); in aesni_cipher_mac() 840 crp->crp_aad_length, ses->hash_update, &sctx); in aesni_cipher_mac()
|
/freebsd/sys/netipsec/ |
H A D | xform_esp.c | 377 crp->crp_aad_length = 8; /* RFC4106 5, SPI + SN */ in esp_input() 379 crp->crp_aad_length = hlen; in esp_input() 386 crp->crp_aad_length += sizeof(seqh); in esp_input() 387 crp->crp_aad = malloc(crp->crp_aad_length, M_ESP, M_NOWAIT); in esp_input() 403 if (crp->crp_aad_length - aad_skip > 0) in esp_input() 405 crp->crp_aad_length - aad_skip, in esp_input() 930 crp->crp_aad_length = 8; /* RFC4106 5, SPI + SN */ in esp_output() 932 crp->crp_aad_length = hlen; in esp_output() 939 crp->crp_aad_length += sizeof(seqh); in esp_output() 940 crp->crp_aad = malloc(crp->crp_aad_length, M_ESP, M_NOWAIT); in esp_output() [all …]
|
/freebsd/sys/opencrypto/ |
H A D | cryptosoft.c | 271 err = axf->Update(&s.ctx, crp->crp_aad, crp->crp_aad_length); in swcr_authcompute() 273 err = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in swcr_authcompute() 440 inlen = rounddown2(crp->crp_aad_length, blksz); in swcr_gcm() 443 if (crp->crp_aad_length != inlen) { in swcr_gcm() 446 crp->crp_aad_length - inlen); in swcr_gcm() 452 for (resid = crp->crp_aad_length; resid >= blksz; in swcr_gcm() 539 *blkp = htobe32(crp->crp_aad_length * 8); in swcr_gcm() 779 build_ccm_b0(crp->crp_iv, ivlen, crp->crp_aad_length, in swcr_ccm() 784 if (crp->crp_aad_length != 0) { in swcr_ccm() 785 len = build_ccm_aad_length(crp->crp_aad_length, blk); in swcr_ccm() [all …]
|
H A D | crypto.c | 1330 KASSERT(crp->crp_aad_length != 0 || in crp_sanity() 1333 KASSERT(crp->crp_aad_length == 0 || in crp_sanity() 1334 crp->crp_aad_start + crp->crp_aad_length <= ilen, in crp_sanity() 1341 KASSERT(crp->crp_aad_length != 0, in crp_sanity() 1346 crp->crp_aad_length == 0, in crp_sanity()
|
H A D | ktls_ocf.c | 590 crp->crp_aad_length = sizeof(*ad); in ktls_ocf_tls12_aead_encrypt() 677 crp.crp_aad_length = sizeof(ad); in ktls_ocf_tls12_aead_decrypt() 814 crp->crp_aad_length = sizeof(*ad); in ktls_ocf_tls13_aead_encrypt() 892 crp.crp_aad_length = sizeof(ad); in ktls_ocf_tls13_aead_decrypt()
|
H A D | cryptodev.h | 448 int crp_aad_length; /* 0 => no AAD. */ member
|
/freebsd/sys/crypto/armv8/ |
H A D | armv8_crypto.c | 325 crp->crp_aad_length, &authallocated); in armv8_crypto_cipher_process() 376 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process() 384 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process()
|
/freebsd/sys/dev/qat_c2xxx/ |
H A D | qat_hw15.c | 888 roundup2(crp->crp_aad_length, QAT_AES_GCM_AAD_ALIGN) >> 3; in qat_hw15_crypto_setup_req_params() 889 auth_req->u1.aad_addr = crp->crp_aad_length > 0 ? in qat_hw15_crypto_setup_req_params() 897 aad_sz = htobe32(crp->crp_aad_length); in qat_hw15_crypto_setup_req_params() 905 *aad_szp2 = (uint8_t)roundup2(crp->crp_aad_length, in qat_hw15_crypto_setup_req_params() 926 if (crp->crp_aad_length == 0) { in qat_hw15_crypto_setup_req_params() 932 cipher_req->cipher_off = crp->crp_aad_length; in qat_hw15_crypto_setup_req_params() 956 crp->crp_payload_length + crp->crp_aad_length; in qat_hw15_crypto_setup_req_params()
|
H A D | qat.c | 1391 } else if (crp->crp_aad == NULL && crp->crp_aad_length > 0) { in qat_crypto_load_buf_cb() 1432 crp->crp_aad_length > 0) { in qat_crypto_load_obuf_cb() 1435 crp->crp_aad_length; in qat_crypto_load_obuf_cb() 1470 crp->crp_aad_length > 0) { in qat_crypto_load() 1481 crp->crp_aad_length, qsc->qsc_gcm_aad); in qat_crypto_load() 1484 crp->crp_aad_length); in qat_crypto_load() 1490 crp->crp_aad, crp->crp_aad_length, in qat_crypto_load() 2151 if (crp->crp_aad_length > QAT_GCM_AAD_SIZE_MAX) { in qat_process() 2166 if (__predict_false(crp->crp_aad_length != qs->qs_aad_length)) { in qat_process() 2172 qs->qs_aad_length = crp->crp_aad_length; in qat_process()
|
/freebsd/sys/dev/safexcel/ |
H A D | safexcel.c | 1629 instr->length = crp->crp_aad_length; in safexcel_instr_eta() 1719 instr->length = blen + (crp->crp_aad_length > 0 ? 2 : 0); in safexcel_instr_ccm() 1730 (crp->crp_aad_length > 0 ? 1 : 0) << 6 /* AAD present bit */; in safexcel_instr_ccm() 1737 if (crp->crp_aad_length > 0) { in safexcel_instr_ccm() 1739 alenp[0] = crp->crp_aad_length >> 8; in safexcel_instr_ccm() 1740 alenp[1] = crp->crp_aad_length & 0xff; in safexcel_instr_ccm() 1746 instr->length = crp->crp_aad_length; in safexcel_instr_ccm() 1752 aalign = (crp->crp_aad_length + 2) & (blen - 1); in safexcel_instr_ccm() 1755 blen - ((crp->crp_aad_length + 2) & (blen - 1)); in safexcel_instr_ccm() 1813 instr->length = crp->crp_aad_length; in safexcel_instr_gcm() [all …]
|
/freebsd/sys/dev/cesa/ |
H A D | cesa.c | 580 crp->crp_aad_length != 0 && in cesa_create_chain_cb() 581 (crp->crp_aad_length & (cr->cr_cs->cs_ivlen - 1)) != 0) { in cesa_create_chain_cb() 611 if (crp->crp_aad_length == 0) { in cesa_create_chain_cb() 645 len = crp->crp_aad_length + crp->crp_payload_length; in cesa_create_chain_cb() 651 len = crp->crp_aad_length + crp->crp_payload_length; in cesa_create_chain_cb() 1720 if (crp->crp_aad_length != 0 && in cesa_process() 1721 (crp->crp_aad_start + crp->crp_aad_length) != in cesa_process()
|
/freebsd/sys/dev/glxsb/ |
H A D | glxsb_hash.c | 72 error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in glxsb_authcompute()
|
/freebsd/sys/crypto/ccp/ |
H A D | ccp_hardware.c | 1276 if (crp->crp_aad_length != 0) { in ccp_do_hmac() 1278 crp->crp_aad_start, crp->crp_aad_length); in ccp_do_hmac() 1891 be64enc(s->gmac.final_block, (uint64_t)crp->crp_aad_length * 8); in ccp_gcm() 1910 if (crp->crp_aad_length != 0) { in ccp_gcm() 1913 crp->crp_aad_start, crp->crp_aad_length); in ccp_gcm() 1961 (i == 0 && crp->crp_aad_length == 0), in ccp_gcm()
|
/freebsd/sys/dev/safe/ |
H A D | safe.c | 897 if (crp->crp_aad_length != 0 && in safe_process() 898 crp->crp_aad_start + crp->crp_aad_length != in safe_process() 904 if (crp->crp_aad_length != 0) in safe_process() 908 coffset = crp->crp_aad_length; in safe_process() 913 crp->crp_aad_start, crp->crp_aad_length, in safe_process()
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/ |
H A D | crypto_os.c | 365 crp->crp_aad_length = auth_len; in freebsd_crypt_uio()
|
/freebsd/sys/crypto/via/ |
H A D | padlock_hash.c | 286 error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in padlock_authcompute()
|
/freebsd/sys/dev/hifn/ |
H A D | hifn7751.c | 1571 dlen = crp->crp_aad_length + crp->crp_payload_length; in hifn_write_command() 1576 if (crp->crp_aad_length != 0) in hifn_write_command() 2400 if (csp->csp_mode == CSP_MODE_ETA && crp->crp_aad_length != 0 && in hifn_process() 2401 crp->crp_aad_start + crp->crp_aad_length != in hifn_process()
|
/freebsd/sys/net/ |
H A D | if_ovpn.c | 1935 crp->crp_aad_length = sizeof(*ohdr) - sizeof(ohdr->auth_tag); in ovpn_transmit_to_peer() 2334 crp->crp_aad_length = sizeof(*ohdr) - sizeof(ohdr->auth_tag); in ovpn_udp_input()
|
/freebsd/sys/dev/sec/ |
H A D | sec.c | 1392 crp->crp_aad_length); in sec_build_common_s_desc()
|