Home
last modified time | relevance | path

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

123

/linux-6.1.9/drivers/crypto/nx/
Dnx-aes-ccm.c133 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument
147 if (assoclen) in generate_b0()
158 unsigned int assoclen, in generate_pat() argument
185 if (!assoclen) { in generate_pat()
187 } else if (assoclen <= 14) { in generate_pat()
193 iauth_len = assoclen; in generate_pat()
194 } else if (assoclen <= 65280) { in generate_pat()
208 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat()
218 if (assoclen <= 65280) { in generate_pat()
219 *(u16 *)b1 = assoclen; in generate_pat()
[all …]
Dnx-aes-gcm.c102 unsigned int assoclen) in nx_gca() argument
108 unsigned int nbytes = assoclen; in nx_gca()
159 atomic64_add(assoclen, &(nx_ctx->stats->aes_bytes)); in nx_gca()
169 static int gmac(struct aead_request *req, const u8 *iv, unsigned int assoclen) in gmac() argument
176 unsigned int nbytes = assoclen; in gmac()
231 atomic64_add(assoclen, &(nx_ctx->stats->aes_bytes)); in gmac()
308 unsigned int assoclen) in gcm_aes_nx_crypt() argument
325 if (assoclen == 0) in gcm_aes_nx_crypt()
328 rc = gmac(req, rctx->iv, assoclen); in gcm_aes_nx_crypt()
336 csbcpb->cpb.aes_gcm.bit_length_aad = assoclen * 8; in gcm_aes_nx_crypt()
[all …]
/linux-6.1.9/drivers/crypto/
Domap-aes-gcm.c61 dd->aead_req->assoclen, dd->total, in omap_aes_gcm_done_task()
67 dd->total + dd->aead_req->assoclen, in omap_aes_gcm_done_task()
91 int alen, clen, cryptlen, assoclen, ret; in omap_aes_gcm_copy_buffers() local
98 assoclen = req->assoclen; in omap_aes_gcm_copy_buffers()
102 assoclen -= 8; in omap_aes_gcm_copy_buffers()
107 alen = ALIGN(assoclen, AES_BLOCK_SIZE); in omap_aes_gcm_copy_buffers()
110 nsg = !!(assoclen && cryptlen); in omap_aes_gcm_copy_buffers()
115 if (assoclen) { in omap_aes_gcm_copy_buffers()
117 ret = omap_crypto_align_sg(&tmp, assoclen, in omap_aes_gcm_copy_buffers()
129 tmp = scatterwalk_ffwd(sg_arr, req->src, req->assoclen); in omap_aes_gcm_copy_buffers()
[all …]
/linux-6.1.9/drivers/crypto/cavium/nitrox/
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-6.1.9/crypto/
Dauthencesn.c96 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv_tail() local
103 scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0); in crypto_authenc_esn_genicv_tail()
106 scatterwalk_map_and_copy(hash, dst, assoclen + cryptlen, authsize, 1); in crypto_authenc_esn_genicv_tail()
130 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv() local
141 scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1); in crypto_authenc_esn_genicv()
147 ahash_request_set_crypt(ahreq, dst, hash, assoclen + cryptlen); in crypto_authenc_esn_genicv()
189 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_encrypt() local
195 src = scatterwalk_ffwd(areq_ctx->src, req->src, assoclen); in crypto_authenc_esn_encrypt()
199 err = crypto_authenc_esn_copy(req, assoclen); in crypto_authenc_esn_encrypt()
204 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, assoclen); in crypto_authenc_esn_encrypt()
[all …]
Daegis128-core.c278 unsigned int assoclen, in crypto_aegis128_process_ad() argument
286 while (assoclen != 0) { in crypto_aegis128_process_ad()
287 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis128_process_ad()
310 assoclen -= size; in crypto_aegis128_process_ad()
313 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis128_process_ad()
346 u64 assoclen, u64 cryptlen) in crypto_aegis128_final() argument
348 u64 assocbits = assoclen * 8; in crypto_aegis128_final()
400 crypto_aegis128_process_ad(&state, req->src, req->assoclen, false); in crypto_aegis128_encrypt_generic()
403 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_encrypt_generic()
405 scatterwalk_map_and_copy(tag.bytes, req->dst, req->assoclen + cryptlen, in crypto_aegis128_encrypt_generic()
[all …]
Dchacha20poly1305.c38 __le64 assoclen; member
61 unsigned int assoclen; member
101 req->assoclen + rctx->cryptlen, in poly_verify_tag()
113 req->assoclen + rctx->cryptlen, in poly_copy_tag()
136 src = scatterwalk_ffwd(rctx->src, req->src, req->assoclen); in chacha_decrypt()
139 dst = scatterwalk_ffwd(rctx->dst, req->dst, req->assoclen); in chacha_decrypt()
177 preq->tail.assoclen = cpu_to_le64(rctx->assoclen); in poly_tail()
239 crypt = scatterwalk_ffwd(rctx->src, crypt, req->assoclen); in poly_cipher()
266 padlen = -rctx->assoclen % POLY1305_BLOCK_SIZE; in poly_adpad()
297 ahash_request_set_crypt(&preq->req, req->src, NULL, rctx->assoclen); in poly_ad()
[all …]
Dccm.c143 if (req->assoclen) in format_input()
175 unsigned int assoclen = req->assoclen; in crypto_ccm_auth() local
190 if (assoclen) { in crypto_ccm_auth()
191 ilen = format_adata(idata, assoclen); in crypto_ccm_auth()
201 ahash_request_set_crypt(ahreq, sg, NULL, assoclen + ilen + 16); in crypto_ccm_auth()
210 ilen = 16 - (assoclen + ilen) % 16; in crypto_ccm_auth()
236 req->assoclen + req->cryptlen, in crypto_ccm_encrypt_done()
270 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_ccm_init_crypt()
277 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_ccm_init_crypt()
621 scatterwalk_map_and_copy(iv + 16, req->src, 0, req->assoclen - 8, 0); in crypto_rfc4309_crypt()
[all …]
Dechainiv.c51 req->assoclen + req->cryptlen, in echainiv_encrypt()
63 aead_request_set_ad(subreq, req->assoclen); in echainiv_encrypt()
69 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in echainiv_encrypt()
105 aead_request_set_ad(subreq, req->assoclen + ivsize); in echainiv_decrypt()
107 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in echainiv_decrypt()
Daegis128-neon.c18 unsigned int assoclen,
67 unsigned int assoclen, in crypto_aegis128_final_simd() argument
74 ret = crypto_aegis128_final_neon(state, tag_xor, assoclen, cryptlen, in crypto_aegis128_final_simd()
Dseqiv.c75 req->assoclen + req->cryptlen, in seqiv_aead_encrypt()
98 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt()
101 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in seqiv_aead_encrypt()
129 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_decrypt()
131 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in seqiv_aead_decrypt()
Dgcm.c164 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common()
171 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common()
230 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_hash_len()
349 remain = gcm_remain(req->assoclen); in gcm_hash_assoc_continue()
375 if (req->assoclen) in gcm_hash_init_continue()
377 req->src, req->assoclen, flags) ?: in gcm_hash_init_continue()
419 req->assoclen + req->cryptlen, in gcm_enc_copy_hash()
476 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify()
733 scatterwalk_map_and_copy(iv + GCM_AES_IV_SIZE, req->src, 0, req->assoclen - 8, 0); in crypto_rfc4106_crypt()
739 sg_set_buf(rctx->src, iv + GCM_AES_IV_SIZE, req->assoclen - 8); in crypto_rfc4106_crypt()
[all …]
Dauthenc.c125 req->assoclen + req->cryptlen, in authenc_geniv_ahash_done()
149 req->assoclen + req->cryptlen); in crypto_authenc_genicv()
157 scatterwalk_map_and_copy(hash, req->dst, req->assoclen + req->cryptlen, in crypto_authenc_genicv()
186 skcipher_request_set_crypt(skreq, req->src, req->dst, req->assoclen, in crypto_authenc_copy_assoc()
206 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt()
214 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()
296 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
/linux-6.1.9/drivers/crypto/qce/
Daead.c54 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 …]
/linux-6.1.9/arch/x86/crypto/
Daegis128-aesni-glue.c45 unsigned int assoclen);
71 unsigned int assoclen) in crypto_aegis128_aesni_process_ad() argument
78 while (assoclen != 0) { in crypto_aegis128_aesni_process_ad()
79 unsigned int size = scatterwalk_clamp(&walk, assoclen); in crypto_aegis128_aesni_process_ad()
104 assoclen -= size; in crypto_aegis128_aesni_process_ad()
108 scatterwalk_done(&walk, 0, assoclen); in crypto_aegis128_aesni_process_ad()
180 crypto_aegis128_aesni_process_ad(&state, req->src, req->assoclen); in crypto_aegis128_aesni_crypt()
182 crypto_aegis128_aesni_final(&state, tag_xor, req->assoclen, cryptlen); in crypto_aegis128_aesni_crypt()
203 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt()
223 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt()
Daesni-intel_glue.c672 unsigned int assoclen, u8 *hash_subkey, in gcmaes_crypt_by_sg() argument
693 if (req->src->length >= assoclen && req->src->length) { in gcmaes_crypt_by_sg()
701 assocmem = kmalloc(assoclen, flags); in gcmaes_crypt_by_sg()
706 scatterwalk_map_and_copy(assoc, req->src, 0, assoclen, 0); in gcmaes_crypt_by_sg()
712 assoclen); in gcmaes_crypt_by_sg()
715 assoclen); in gcmaes_crypt_by_sg()
717 aesni_gcm_init(aes_ctx, data, iv, hash_subkey, assoc, assoclen); in gcmaes_crypt_by_sg()
781 static int gcmaes_encrypt(struct aead_request *req, unsigned int assoclen, in gcmaes_encrypt() argument
789 err = gcmaes_crypt_by_sg(true, req, assoclen, hash_subkey, iv, aes_ctx, in gcmaes_encrypt()
795 req->assoclen + req->cryptlen, in gcmaes_encrypt()
[all …]
/linux-6.1.9/include/crypto/
Dgcm.h51 static inline int crypto_ipsec_check_assoclen(unsigned int assoclen) in crypto_ipsec_check_assoclen() argument
53 switch (assoclen) { in crypto_ipsec_check_assoclen()
Daead.h92 unsigned int assoclen; member
525 unsigned int assoclen) in aead_request_set_ad() argument
527 req->assoclen = assoclen; in aead_request_set_ad()
/linux-6.1.9/arch/arm64/crypto/
Daes-ce-ccm-glue.c90 if (req->assoclen) in ccm_init_mac()
103 u32 len = req->assoclen; in ccm_calculate_auth_mac()
169 if (req->assoclen) in ccm_encrypt()
197 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
227 if (req->assoclen) in ccm_decrypt()
256 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
Dghash-ce-glue.c311 u32 len = req->assoclen; in gcm_calculate_auth_mac()
354 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_encrypt()
357 if (req->assoclen) in gcm_encrypt()
400 scatterwalk_map_and_copy(tag, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
422 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_decrypt()
425 if (req->assoclen) in gcm_decrypt()
432 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
/linux-6.1.9/drivers/crypto/chelsio/
Dchcr_algo.c186 authsize, req->assoclen + in chcr_verify_tag()
2410 (req->assoclen > aadmax) || in chcr_aead_need_fallback()
2427 aead_request_set_ad(subreq, req->assoclen); in chcr_aead_fallback()
2471 dnents = sg_nents_xlen(req->dst, req->assoclen + req->cryptlen + in create_authenc_wr()
2474 snents = sg_nents_xlen(req->src, req->assoclen + req->cryptlen, in create_authenc_wr()
2480 reqctx->imm = (transhdr_len + req->assoclen + req->cryptlen) < in create_authenc_wr()
2482 temp = reqctx->imm ? roundup(req->assoclen + req->cryptlen, 16) in create_authenc_wr()
2510 chcr_req->sec_cpl.pldlen = htonl(req->assoclen + IV + req->cryptlen); in create_authenc_wr()
2513 null ? 0 : IV + req->assoclen, in create_authenc_wr()
2514 req->assoclen + IV + 1, in create_authenc_wr()
[all …]
/linux-6.1.9/drivers/crypto/ccree/
Dcc_aead.c236 areq->cryptlen, areq->assoclen); in cc_aead_complete()
736 areq_ctx->assoclen, NS_BIT); in cc_set_assoc_desc()
1089 if (areq_ctx->assoclen > 0) in cc_proc_header_desc()
1317 unsigned int assoclen = areq_ctx->assoclen; in validate_data_size() local
1340 if (!IS_ALIGNED(assoclen, sizeof(u32))) in validate_data_size()
1351 if (!IS_ALIGNED(assoclen, DES_BLOCK_SIZE)) in validate_data_size()
1476 if (req_ctx->assoclen > 0) { in cc_ccm()
1568 if (req_ctx->assoclen > 0) in config_ccm_adata()
1579 req_ctx->ccm_hdr_size = format_ccm_a0(a0, req_ctx->assoclen); in config_ccm_adata()
1818 if (req_ctx->assoclen > 0) in cc_gcm()
[all …]
/linux-6.1.9/drivers/crypto/keembay/
Dkeembay-ocs-aes-core.c656 aead_request_set_ad(subreq, req->assoclen); in kmb_ocs_aead_common()
734 req->assoclen + req->cryptlen); in kmb_ocs_aead_dma_prepare()
754 dst_size = req->assoclen + out_size; in kmb_ocs_aead_dma_prepare()
762 tag_size, req->assoclen + in_size); in kmb_ocs_aead_dma_prepare()
781 dst_size = req->assoclen + in_size + tag_size; in kmb_ocs_aead_dma_prepare()
805 &rctx->aad_dst_dll, req->assoclen, in kmb_ocs_aead_dma_prepare()
813 out_size, req->assoclen); in kmb_ocs_aead_dma_prepare()
839 req->assoclen, 0); in kmb_ocs_aead_dma_prepare()
845 req->assoclen); in kmb_ocs_aead_dma_prepare()
865 req->assoclen, 0); in kmb_ocs_aead_dma_prepare()
[all …]
/linux-6.1.9/net/mac802154/
Dllsec.c654 int authlen, assoclen, datalen, rc; in llsec_do_encrypt_auth() local
665 assoclen = skb->mac_len; in llsec_do_encrypt_auth()
672 sg_init_one(&sg, skb_mac_header(skb), assoclen + datalen + authlen); in llsec_do_encrypt_auth()
675 assoclen += datalen; in llsec_do_encrypt_auth()
681 aead_request_set_ad(req, assoclen); in llsec_do_encrypt_auth()
860 int authlen, datalen, assoclen, rc; in llsec_do_decrypt_auth() local
871 assoclen = skb->mac_len; in llsec_do_decrypt_auth()
876 sg_init_one(&sg, skb_mac_header(skb), assoclen + datalen); in llsec_do_decrypt_auth()
879 assoclen += datalen - authlen; in llsec_do_decrypt_auth()
885 aead_request_set_ad(req, assoclen); in llsec_do_decrypt_auth()
/linux-6.1.9/drivers/crypto/marvell/octeontx2/
Dotx2_cptvf_algs.c1023 rctx->ctrl_word.e.enc_data_offset = req->assoclen; in create_aead_ctx_hdr()
1027 if (req->assoclen > 248 || !IS_ALIGNED(req->assoclen, 8)) in create_aead_ctx_hdr()
1047 if (crypto_ipsec_check_assoclen(req->assoclen)) in create_aead_ctx_hdr()
1057 rctx->ctrl_word.e.iv_offset = req->assoclen - AES_GCM_IV_OFFSET; in create_aead_ctx_hdr()
1073 req_info->req.param2 = req->cryptlen + req->assoclen; in create_aead_ctx_hdr()
1077 req_info->req.param2 = req->cryptlen + req->assoclen - mac_len; in create_aead_ctx_hdr()
1132 u32 inputlen = req->cryptlen + req->assoclen; in create_aead_input_list()
1152 outputlen = req->cryptlen + req->assoclen + mac_len; in create_aead_output_list()
1154 outputlen = req->cryptlen + req->assoclen - mac_len; in create_aead_output_list()
1168 inputlen = req->cryptlen + req->assoclen; in create_aead_null_input_list()
[all …]

123