Home
last modified time | relevance | path

Searched refs:assoclen (Results 1 – 25 of 30) sorted by relevance

12

/linux/crypto/
H A Dauthencesn.c91 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv_tail() local
98 scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0); in crypto_authenc_esn_genicv_tail()
101 scatterwalk_map_and_copy(hash, dst, assoclen + cryptlen, authsize, 1); in crypto_authenc_esn_genicv_tail()
123 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv() local
134 scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1); in crypto_authenc_esn_genicv()
140 ahash_request_set_crypt(ahreq, dst, hash, assoclen + cryptlen); in crypto_authenc_esn_genicv()
167 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_encrypt() local
172 if (assoclen < 8) in crypto_authenc_esn_encrypt()
176 src = scatterwalk_ffwd(areq_ctx->src, req->src, assoclen); in crypto_authenc_esn_encrypt()
180 memcpy_sglist(req->dst, req->src, assoclen); in crypto_authenc_esn_encrypt()
[all …]
H A Dseqiv.c70 req->assoclen + req->cryptlen); in seqiv_aead_encrypt()
88 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt()
91 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in seqiv_aead_encrypt()
119 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_decrypt()
121 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in seqiv_aead_decrypt()
H A Dauthenc.c119 req->assoclen + req->cryptlen, in authenc_geniv_ahash_finish()
160 req->assoclen + req->cryptlen); in crypto_authenc_genicv()
169 scatterwalk_map_and_copy(hash, req->dst, req->assoclen + req->cryptlen, in crypto_authenc_genicv()
201 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt()
205 memcpy_sglist(req->dst, req->src, req->assoclen); in crypto_authenc_encrypt()
206 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_encrypt()
249 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_decrypt_tail()
253 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_decrypt_tail()
293 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
H A Daegis128-neon.c53 unsigned int assoclen, in crypto_aegis128_final_simd() argument
58 return crypto_aegis128_final_neon(state, tag_xor, assoclen, in crypto_aegis128_final_simd()
H A Daegis-neon.h13 unsigned int assoclen,
H A Daegis128-neon-inner.c318 unsigned int assoclen, in crypto_aegis128_final_neon() argument
328 v = st.v[3] ^ (uint8x16_t)vcombine_u64(vmov_n_u64(8ULL * assoclen), in crypto_aegis128_final_neon()
H A Dessiv.c190 int ssize = req->assoclen - ivsize; in essiv_aead_crypt()
237 sg = scatterwalk_ffwd(rctx->sg + 2, req->src, req->assoclen); in essiv_aead_crypt()
245 aead_request_set_ad(subreq, req->assoclen); in essiv_aead_crypt()
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c166 creq->gph.param1 = cpu_to_be16(rctx->cryptlen + rctx->assoclen); in nitrox_set_creq()
167 creq->gph.param2 = cpu_to_be16(rctx->ivsize + rctx->assoclen); in nitrox_set_creq()
205 static inline bool nitrox_aes_gcm_assoclen_supported(unsigned int assoclen) in nitrox_aes_gcm_assoclen_supported() argument
207 if (assoclen <= 512) in nitrox_aes_gcm_assoclen_supported()
222 if (!nitrox_aes_gcm_assoclen_supported(areq->assoclen)) in nitrox_aes_gcm_enc()
228 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_enc()
229 rctx->srclen = areq->assoclen + areq->cryptlen; in nitrox_aes_gcm_enc()
256 if (!nitrox_aes_gcm_assoclen_supported(areq->assoclen)) in nitrox_aes_gcm_dec()
262 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_dec()
263 rctx->srclen = areq->cryptlen + areq->assoclen; in nitrox_aes_gcm_dec()
[all …]
/linux/arch/arm64/crypto/
H A Dsm4-ce-ccm-glue.c74 if (req->assoclen) in ccm_format_input()
95 u32 assoclen = req->assoclen; in ccm_calculate_auth_mac() local
99 if (assoclen < 0xff00) { in ccm_calculate_auth_mac()
100 aadlen.l = cpu_to_be16(assoclen); in ccm_calculate_auth_mac()
104 put_unaligned_be32(assoclen, &aadlen.h); in ccm_calculate_auth_mac()
117 orig_n = scatterwalk_next(&walk, assoclen); in ccm_calculate_auth_mac()
152 assoclen -= orig_n; in ccm_calculate_auth_mac()
153 } while (assoclen); in ccm_calculate_auth_mac()
170 if (req->assoclen) in ccm_crypt()
212 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
[all …]
H A Dsm4-ce-gcm-glue.c76 u32 assoclen = req->assoclen; in gcm_calculate_auth_mac() local
86 orig_n = scatterwalk_next(&walk, assoclen); in gcm_calculate_auth_mac()
120 assoclen -= orig_n; in gcm_calculate_auth_mac()
121 } while (assoclen); in gcm_calculate_auth_mac()
144 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_crypt()
151 if (req->assoclen) in gcm_crypt()
188 scatterwalk_map_and_copy(ghash, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
210 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
/linux/drivers/crypto/tegra/
H A Dtegra-se-aes.c60 unsigned int assoclen; member
617 data_count = (rctx->assoclen / AES_BLOCK_SIZE); in tegra_gmac_prep_cmd()
618 res_bits = (rctx->assoclen % AES_BLOCK_SIZE) * 8; in tegra_gmac_prep_cmd()
636 SE_ADDR_HI_SZ(rctx->assoclen); in tegra_gmac_prep_cmd()
666 if (!rctx->assoclen) in tegra_gcm_crypt_prep_cmd()
722 if (!rctx->assoclen && !rctx->cryptlen) in tegra_gcm_prep_final_cmd()
726 cpuvaddr[i++] = rctx->assoclen * 8; in tegra_gcm_prep_final_cmd()
767 rctx->src_sg, 0, rctx->assoclen, 0); in tegra_gcm_do_gmac()
784 rctx->assoclen, rctx->cryptlen, 0); in tegra_gcm_do_crypt()
798 rctx->assoclen, rctx->cryptlen, 1); in tegra_gcm_do_crypt()
[all …]
/linux/include/crypto/
H A Daead.h93 unsigned int assoclen; member
625 unsigned int assoclen) in aead_request_set_ad() argument
627 req->assoclen = assoclen; in aead_request_set_ad()
/linux/net/mac802154/
H A Dllsec.c662 int authlen, assoclen, datalen, rc; in llsec_do_encrypt_auth() local
673 assoclen = skb->mac_len; in llsec_do_encrypt_auth()
680 sg_init_one(&sg, skb_mac_header(skb), assoclen + datalen + authlen); in llsec_do_encrypt_auth()
683 assoclen += datalen; in llsec_do_encrypt_auth()
689 aead_request_set_ad(req, assoclen); in llsec_do_encrypt_auth()
871 int authlen, datalen, assoclen, rc; in llsec_do_decrypt_auth() local
882 assoclen = skb->mac_len; in llsec_do_decrypt_auth()
887 sg_init_one(&sg, skb_mac_header(skb), assoclen + datalen); in llsec_do_decrypt_auth()
890 assoclen += datalen - authlen; in llsec_do_decrypt_auth()
896 aead_request_set_ad(req, assoclen); in llsec_do_decrypt_auth()
/linux/net/ipv4/
H A Desp4.c501 int assoclen; in esp_output_tail() local
511 assoclen = sizeof(struct ip_esp_hdr); in esp_output_tail()
516 assoclen += sizeof(__be32); in esp_output_tail()
543 assoclen + ivlen + esp->clen + alen); in esp_output_tail()
571 assoclen + ivlen + esp->clen + alen); in esp_output_tail()
582 aead_request_set_ad(req, assoclen); in esp_output_tail()
849 int assoclen; in esp_input() local
863 assoclen = sizeof(struct ip_esp_hdr); in esp_input()
868 assoclen += seqhilen; in esp_input()
920 aead_request_set_ad(req, assoclen); in esp_input()
/linux/net/ipv6/
H A Desp6.c532 int assoclen; in esp6_output_tail() local
542 assoclen = sizeof(struct ip_esp_hdr); in esp6_output_tail()
547 assoclen += sizeof(__be32); in esp6_output_tail()
574 assoclen + ivlen + esp->clen + alen); in esp6_output_tail()
602 assoclen + ivlen + esp->clen + alen); in esp6_output_tail()
613 aead_request_set_ad(req, assoclen); in esp6_output_tail()
887 int assoclen; in esp6_input() local
905 assoclen = sizeof(struct ip_esp_hdr); in esp6_input()
910 assoclen += seqhilen; in esp6_input()
962 aead_request_set_ad(req, assoclen); in esp6_input()
/linux/drivers/crypto/ccree/
H A Dcc_buffer_mgr.c56 u32 skip = req->assoclen + req->cryptlen; in cc_copy_mac()
291 unsigned int assoclen) in cc_set_aead_conf_buf() argument
307 if (assoclen > 0) { in cc_set_aead_conf_buf()
519 areq_ctx->assoclen, req->cryptlen); in cc_unmap_aead_request()
599 if (areq_ctx->assoclen == 0) { in cc_aead_chain_assoc()
609 mapped_nents = sg_nents_for_len(req->src, areq_ctx->assoclen); in cc_aead_chain_assoc()
643 areq_ctx->assoclen, 0, is_last, in cc_aead_chain_assoc()
802 unsigned int size_for_map = req->assoclen + req->cryptlen; in cc_aead_chain_data()
804 u32 size_to_skip = req->assoclen; in cc_aead_chain_data()
841 size_for_map = req->assoclen + req->cryptlen; in cc_aead_chain_data()
[all …]
H A Dcc_aead.h69 u32 assoclen; /* size of AAD buffer to authenticate */ member
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c896 rctx->ctrl_word.e.enc_data_offset = req->assoclen; in create_aead_ctx_hdr()
924 rctx->ctrl_word.e.iv_offset = req->assoclen - AES_GCM_IV_OFFSET; in create_aead_ctx_hdr()
940 req_info->req.param2 = req->cryptlen + req->assoclen; in create_aead_ctx_hdr()
944 req_info->req.param2 = req->cryptlen + req->assoclen - mac_len; in create_aead_ctx_hdr()
1001 u32 inputlen = req->cryptlen + req->assoclen; in create_aead_input_list()
1021 outputlen = req->cryptlen + req->assoclen + mac_len; in create_aead_output_list()
1023 outputlen = req->cryptlen + req->assoclen - mac_len; in create_aead_output_list()
1039 inputlen = req->cryptlen + req->assoclen; in create_aead_null_input_list()
1041 inputlen = req->cryptlen + req->assoclen - mac_len; in create_aead_null_input_list()
1061 inputlen = req->cryptlen + req->assoclen; in create_aead_null_output_list()
[all …]
/linux/drivers/crypto/
H A Datmel-authenc.h41 struct scatterlist *assoc, unsigned int assoclen,
/linux/drivers/crypto/amcc/
H A Dcrypto4xx_core.c570 aead_req->assoclen + aead_req->cryptlen - in crypto4xx_aead_done()
649 const unsigned int assoclen, in crypto4xx_build_pd() argument
685 tmp = sg_nents_for_len(src, assoclen + datalen); in crypto4xx_build_pd()
694 if (assoclen) { in crypto4xx_build_pd()
695 nbytes += assoclen; in crypto4xx_build_pd()
696 dst = scatterwalk_ffwd(_dst, dst, assoclen); in crypto4xx_build_pd()
786 sa->sa_command_1.bf.hash_crypto_offset = (assoclen >> 2); in crypto4xx_build_pd()
884 pd->pd_ctl_len.w = 0x00400000 | (assoclen + datalen); in crypto4xx_build_pd()
/linux/drivers/crypto/qce/
H A Daead.h39 unsigned int assoclen; member
/linux/drivers/crypto/bcm/
H A Dcipher.c1314 aead_parms.assoc_size = req->assoclen; in handle_aead_req()
1387 spu->spu_ccm_update_iv(digestsize, &cipher_parms, req->assoclen, in handle_aead_req()
1416 req->assoclen + rctx->total_sent - in handle_aead_req()
1541 if (req->assoclen) in handle_aead_resp()
1543 req->assoclen); in handle_aead_resp()
1552 icv_offset = req->assoclen + rctx->total_sent; in handle_aead_resp()
1561 dump_sg(req->dst, req->assoclen, result_len); in handle_aead_resp()
2516 (req->assoclen == 0)) { in aead_need_fallback()
2540 (req->assoclen == 0)) { in aead_need_fallback()
2553 req->assoclen != 16 && req->assoclen != 20) { in aead_need_fallback()
[all …]
H A Dspu2.h213 unsigned int assoclen, unsigned int chunksize,
/linux/drivers/crypto/caam/
H A Dcaamalg.c1168 append_seq_in_ptr(desc, src_dma, req->assoclen + req->cryptlen, in init_aead_job()
1191 req->assoclen + req->cryptlen + authsize, in init_aead_job()
1195 req->assoclen + req->cryptlen - authsize, in init_aead_job()
1211 append_math_add_imm_u32(desc, REG3, ZERO, IMM, req->assoclen); in init_gcm_job()
1215 if (encrypt && generic_gcm && !(req->assoclen + req->cryptlen)) in init_gcm_job()
1235 unsigned int assoclen = req->assoclen; in init_chachapoly_job() local
1249 assoclen -= ivsize; in init_chachapoly_job()
1252 append_math_add_imm_u32(desc, REG3, ZERO, IMM, assoclen); in init_chachapoly_job()
1302 append_math_add_imm_u32(desc, REG3, ZERO, IMM, req->assoclen); in init_authenc_job()
1304 append_math_add_imm_u32(desc, DPOVRD, ZERO, IMM, req->assoclen); in init_authenc_job()
[all …]
H A Dcaamalg_qi.c808 unsigned int assoclen; member
974 src_len = req->assoclen + req->cryptlen + in aead_edesc_alloc()
993 src_len = req->assoclen + req->cryptlen; in aead_edesc_alloc()
1099 edesc->assoclen = cpu_to_caam32(req->assoclen); in aead_edesc_alloc()
1100 edesc->assoclen_dma = dma_map_single(qidev, &edesc->assoclen, 4, in aead_edesc_alloc()
1135 out_len = req->assoclen + req->cryptlen + in aead_edesc_alloc()
1137 in_len = 4 + ivsize + req->assoclen + req->cryptlen; in aead_edesc_alloc()
1200 return crypto_ipsec_check_assoclen(req->assoclen) ? : aead_crypt(req, in ipsec_gcm_encrypt()
1206 return crypto_ipsec_check_assoclen(req->assoclen) ? : aead_crypt(req, in ipsec_gcm_decrypt()

12