| /linux/crypto/ |
| H A D | authencesn.c | 91 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 D | seqiv.c | 70 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 D | gcm.c | 160 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common() 167 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common() 226 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_hash_len() 343 remain = gcm_remain(req->assoclen); in gcm_hash_assoc_continue() 369 if (req->assoclen) in gcm_hash_init_continue() 371 req->src, req->assoclen, flags) ?: in gcm_hash_init_continue() 413 req->assoclen + req->cryptlen, in gcm_enc_copy_hash() 470 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify() 725 scatterwalk_map_and_copy(iv + GCM_AES_IV_SIZE, req->src, 0, req->assoclen - 8, 0); in crypto_rfc4106_crypt() 731 sg_set_buf(rctx->src, iv + GCM_AES_IV_SIZE, req->assoclen - 8); in crypto_rfc4106_crypt() [all …]
|
| H A D | authenc.c | 119 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 D | aegis128-neon.c | 53 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 D | aegis-neon.h | 13 unsigned int assoclen,
|
| H A D | aegis128-neon-inner.c | 318 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()
|
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_aead.c | 166 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/drivers/crypto/qce/ |
| H A D | aead.c | 54 if (req->assoclen) { in qce_aead_done() 71 totallen = req->cryptlen + req->assoclen; in qce_aead_done() 80 totallen = req->cryptlen + req->assoclen - ctx->authsize; in qce_aead_done() 120 unsigned int assoclen = req->assoclen; in qce_aead_prepare_dst_buf() local 124 totallen = rctx->cryptlen + assoclen; in qce_aead_prepare_dst_buf() 141 if (IS_CCM(rctx->flags) && assoclen) { in qce_aead_prepare_dst_buf() 143 msg_sg = scatterwalk_ffwd(__sg, req->dst, assoclen); in qce_aead_prepare_dst_buf() 146 rctx->assoclen); in qce_aead_prepare_dst_buf() 157 totallen = rctx->cryptlen + rctx->assoclen; in qce_aead_prepare_dst_buf() 191 unsigned int assoclen = rctx->assoclen; in qce_aead_ccm_prepare_buf_assoclen() local [all …]
|
| H A D | aead.h | 39 unsigned int assoclen; member
|
| /linux/arch/arm64/crypto/ |
| H A D | sm4-ce-ccm-glue.c | 74 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 D | sm4-ce-gcm-glue.c | 76 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 D | tegra-se-aes.c | 59 unsigned int assoclen; member 613 data_count = (rctx->assoclen / AES_BLOCK_SIZE); in tegra_gmac_prep_cmd() 614 res_bits = (rctx->assoclen % AES_BLOCK_SIZE) * 8; in tegra_gmac_prep_cmd() 632 SE_ADDR_HI_SZ(rctx->assoclen); in tegra_gmac_prep_cmd() 662 if (!rctx->assoclen) in tegra_gcm_crypt_prep_cmd() 718 if (!rctx->assoclen && !rctx->cryptlen) in tegra_gcm_prep_final_cmd() 722 cpuvaddr[i++] = rctx->assoclen * 8; in tegra_gcm_prep_final_cmd() 763 rctx->src_sg, 0, rctx->assoclen, 0); in tegra_gcm_do_gmac() 780 rctx->assoclen, rctx->cryptlen, 0); in tegra_gcm_do_crypt() 794 rctx->assoclen, rctx->cryptlen, 1); in tegra_gcm_do_crypt() [all …]
|
| /linux/drivers/crypto/inside-secure/eip93/ |
| H A D | eip93-aead.c | 181 req->assoclen / sizeof(u32)); in eip93_aead_setassoc() 183 ctx->assoclen = req->assoclen; in eip93_aead_setassoc() 202 rctx->assoclen = req->assoclen; in eip93_aead_crypt() 228 if (req->assoclen != ctx->assoclen) { in eip93_aead_encrypt() 252 if (req->assoclen != ctx->assoclen) { in eip93_aead_decrypt()
|
| H A D | eip93-common.c | 208 u32 totlen_src = rctx->assoclen + rctx->textsize; in check_valid_request() 209 u32 totlen_dst = rctx->assoclen + rctx->textsize; in check_valid_request() 522 u32 datalen = rctx->assoclen + rctx->textsize; in eip93_send_req() 643 u32 len = rctx->assoclen + rctx->textsize; in eip93_unmap_dma()
|
| /linux/include/crypto/ |
| H A D | aead.h | 93 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 D | llsec.c | 662 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/drivers/crypto/ccree/ |
| H A D | cc_buffer_mgr.c | 56 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 D | cc_aead.h | 69 u32 assoclen; /* size of AAD buffer to authenticate */ member
|
| /linux/drivers/crypto/marvell/octeontx/ |
| H A D | otx_cptvf_algs.c | 896 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/hisilicon/sec2/ |
| H A D | sec_crypto.c | 980 copy_size = aead_req->cryptlen + aead_req->assoclen; in GEN_SEC_SETKEY_FUNC() 1024 copy_size = c_req->c_len + aead_req->assoclen; in sec_cipher_pbuf_unmap() 1051 skip_size = aead_req->assoclen + aead_req->cryptlen - authsize; in sec_aead_mac_init() 1713 if (aead_req->assoclen) in set_aead_auth_iv() 1776 sec_sqe->type2.alen_ivllen = cpu_to_le32(aq->assoclen); in sec_auth_bd_fill_xcm() 1778 sec_sqe->type2.cipher_src_offset = cpu_to_le16((u16)aq->assoclen); in sec_auth_bd_fill_xcm() 1804 sqe3->a_len_key = cpu_to_le32(aq->assoclen); in sec_auth_bd_fill_xcm_v3() 1806 sqe3->cipher_src_offset = cpu_to_le16((u16)aq->assoclen); in sec_auth_bd_fill_xcm_v3() 1836 sec_sqe->type2.alen_ivllen = cpu_to_le32(c_req->c_len + aq->assoclen); in sec_auth_bd_fill_ex() 1838 sec_sqe->type2.cipher_src_offset = cpu_to_le16((u16)aq->assoclen); in sec_auth_bd_fill_ex() [all …]
|
| /linux/drivers/crypto/ |
| H A D | atmel-authenc.h | 41 struct scatterlist *assoc, unsigned int assoclen,
|
| /linux/drivers/crypto/amcc/ |
| H A D | crypto4xx_core.c | 570 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/bcm/ |
| H A D | cipher.c | 1314 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 …]
|
| /linux/drivers/crypto/caam/ |
| H A D | caamalg.c | 1168 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 …]
|