Home
last modified time | relevance | path

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

1234

/linux-6.15/drivers/crypto/nx/
H A Dnx-aes-ccm.c147 if (assoclen) in generate_b0()
185 if (!assoclen) { in generate_pat()
187 } else if (assoclen <= 14) { in generate_pat()
193 iauth_len = assoclen; in generate_pat()
218 if (assoclen <= 65280) { in generate_pat()
219 *(u16 *)b1 = assoclen; in generate_pat()
223 *(u32 *)&b1[2] = assoclen; in generate_pat()
229 if (!assoclen) { in generate_pat()
231 } else if (assoclen <= 14) { in generate_pat()
326 unsigned int assoclen) in ccm_nx_decrypt() argument
[all …]
H A Dnx-aes-gcm.c102 unsigned int assoclen) in nx_gca() argument
107 unsigned int nbytes = assoclen; in nx_gca()
173 unsigned int nbytes = assoclen; in gmac()
305 unsigned int assoclen) in gcm_aes_nx_crypt() argument
322 if (assoclen == 0) in gcm_aes_nx_crypt()
334 if (assoclen) { in gcm_aes_nx_crypt()
336 assoclen); in gcm_aes_nx_crypt()
356 processed + req->assoclen, in gcm_aes_nx_crypt()
392 req->dst, req->assoclen + nbytes, in gcm_aes_nx_crypt()
442 if (req->assoclen < 8) in gcm4106_aes_nx_encrypt()
[all …]
/linux-6.15/drivers/crypto/
H A Domap-aes-gcm.c64 dd->aead_req->assoclen, dd->total, in omap_aes_gcm_done_task()
101 assoclen = req->assoclen; in omap_aes_gcm_copy_buffers()
105 assoclen -= 8; in omap_aes_gcm_copy_buffers()
110 alen = ALIGN(assoclen, AES_BLOCK_SIZE); in omap_aes_gcm_copy_buffers()
113 nsg = !!(assoclen && cryptlen); in omap_aes_gcm_copy_buffers()
118 if (assoclen) { in omap_aes_gcm_copy_buffers()
150 dd->assoc_len = assoclen; in omap_aes_gcm_copy_buffers()
246 int err, assoclen; in omap_aes_gcm_crypt() local
256 assoclen = req->assoclen - 8; in omap_aes_gcm_crypt()
258 assoclen = req->assoclen; in omap_aes_gcm_crypt()
[all …]
/linux-6.15/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c207 if (assoclen <= 512) in nitrox_aes_gcm_assoclen_supported()
228 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_enc()
229 rctx->srclen = areq->assoclen + areq->cryptlen; in nitrox_aes_gcm_enc()
262 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_dec()
263 rctx->srclen = areq->cryptlen + areq->assoclen; in nitrox_aes_gcm_dec()
397 unsigned int assoclen = areq->assoclen - GCM_RFC4106_IV_SIZE; in nitrox_rfc4106_set_aead_rctx_sglist() local
400 if (areq->assoclen != 16 && areq->assoclen != 20) in nitrox_rfc4106_set_aead_rctx_sglist()
405 sg_set_buf(rctx->src, rctx->assoc, assoclen); in nitrox_rfc4106_set_aead_rctx_sglist()
412 sg_set_buf(rctx->dst, rctx->assoc, assoclen); in nitrox_rfc4106_set_aead_rctx_sglist()
450 aead_rctx->assoclen = areq->assoclen - GCM_RFC4106_IV_SIZE; in nitrox_rfc4106_enc()
[all …]
/linux-6.15/crypto/
H A Dauthencesn.c93 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv_tail() local
125 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv() local
142 ahash_request_set_crypt(ahreq, dst, hash, assoclen + cryptlen); in crypto_authenc_esn_genicv()
183 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_encrypt() local
189 src = scatterwalk_ffwd(areq_ctx->src, req->src, assoclen); in crypto_authenc_esn_encrypt()
193 err = crypto_authenc_esn_copy(req, assoclen); in crypto_authenc_esn_encrypt()
198 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, assoclen); in crypto_authenc_esn_encrypt()
225 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_decrypt_tail() local
244 dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen); in crypto_authenc_esn_decrypt_tail()
271 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_decrypt() local
[all …]
H A 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_next(&walk, assoclen); in crypto_aegis128_process_ad()
309 assoclen -= size; in crypto_aegis128_process_ad()
344 u64 assoclen, u64 cryptlen) in crypto_aegis128_final() argument
346 u64 assocbits = assoclen * 8; in crypto_aegis128_final()
398 crypto_aegis128_process_ad(&state, req->src, req->assoclen, false); in crypto_aegis128_encrypt_generic()
401 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_encrypt_generic()
427 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_decrypt_generic()
462 crypto_aegis128_process_ad(&state, req->src, req->assoclen, true); in crypto_aegis128_encrypt_simd()
[all …]
H A 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()
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()
368 rctx->assoclen = req->assoclen; in poly_genkey()
371 if (rctx->assoclen < 8) in poly_genkey()
[all …]
H A Dccm.c144 if (req->assoclen) in format_input()
176 unsigned int assoclen = req->assoclen; in crypto_ccm_auth() local
191 if (assoclen) { in crypto_ccm_auth()
192 ilen = format_adata(idata, assoclen); in crypto_ccm_auth()
211 ilen = 16 - (assoclen + ilen) % 16; in crypto_ccm_auth()
237 req->assoclen + req->cryptlen, in crypto_ccm_encrypt_done()
622 sg_set_buf(rctx->src, iv + 16, req->assoclen - 8); in crypto_rfc4309_crypt()
629 sg_set_buf(rctx->dst, iv + 16, req->assoclen - 8); in crypto_rfc4309_crypt()
641 aead_request_set_ad(subreq, req->assoclen - 8); in crypto_rfc4309_crypt()
648 if (req->assoclen != 16 && req->assoclen != 20) in crypto_rfc4309_encrypt()
[all …]
H A 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()
H A Dseqiv.c74 req->assoclen + req->cryptlen, in seqiv_aead_encrypt()
97 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_encrypt()
100 scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1); in seqiv_aead_encrypt()
128 aead_request_set_ad(subreq, req->assoclen + ivsize); in seqiv_aead_decrypt()
130 scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0); in seqiv_aead_decrypt()
H A Dgcm.c230 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_hash_len()
347 remain = gcm_remain(req->assoclen); in gcm_hash_assoc_continue()
373 if (req->assoclen) in gcm_hash_init_continue()
375 req->src, req->assoclen, flags) ?: in gcm_hash_init_continue()
417 req->assoclen + req->cryptlen, in gcm_enc_copy_hash()
474 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify()
754 aead_request_set_ad(subreq, req->assoclen - 8); in crypto_rfc4106_crypt()
763 err = crypto_ipsec_check_assoclen(req->assoclen); in crypto_rfc4106_encrypt()
776 err = crypto_ipsec_check_assoclen(req->assoclen); in crypto_rfc4106_decrypt()
973 return crypto_ipsec_check_assoclen(req->assoclen) ?: in crypto_rfc4543_encrypt()
[all …]
H A Dauthenc.c125 req->assoclen + req->cryptlen, in authenc_geniv_ahash_done()
146 req->assoclen + req->cryptlen); in crypto_authenc_genicv()
154 scatterwalk_map_and_copy(hash, req->dst, req->assoclen + req->cryptlen, in crypto_authenc_genicv()
182 skcipher_request_set_crypt(skreq, req->src, req->dst, req->assoclen, in crypto_authenc_copy_assoc()
202 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt()
210 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_encrypt()
245 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_decrypt_tail()
249 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_decrypt_tail()
288 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
/linux-6.15/drivers/crypto/qce/
H A Daead.c54 if (req->assoclen) { in qce_aead_done()
120 unsigned int assoclen = req->assoclen; in qce_aead_prepare_dst_buf() local
146 rctx->assoclen); in qce_aead_prepare_dst_buf()
191 unsigned int assoclen = rctx->assoclen; in qce_aead_ccm_prepare_buf_assoclen() local
230 assoclen) != assoclen) in qce_aead_ccm_prepare_buf_assoclen()
234 rctx->assoclen = ALIGN(assoclen + adata_header_len, 16); in qce_aead_ccm_prepare_buf_assoclen()
251 rctx->assoclen); in qce_aead_ccm_prepare_buf_assoclen()
338 if (rctx->assoclen) in qce_aead_ccm_prepare_buf()
397 if (rctx->assoclen) in qce_aead_create_ccm_nonce()
432 rctx->assoclen = req->assoclen - 8; in qce_aead_async_req_handle()
[all …]
/linux-6.15/arch/powerpc/crypto/
H A Daes-gcm-p10-glue.c121 struct Hash_ctx *hash, u8 *assoc, unsigned int assoclen) in gcmp10_init() argument
142 gctx->aadLen = assoclen; in gcmp10_init()
144 if (assoclen) in gcmp10_init()
145 set_aad(gctx, hash, assoc, assoclen); in gcmp10_init()
209 int assoclen, int enc) in p10_aes_gcm_crypt() argument
235 if (req->src->length >= assoclen && req->src->length) { in p10_aes_gcm_crypt()
242 assocmem = kmalloc(assoclen, flags); in p10_aes_gcm_crypt()
303 req->assoclen + cryptlen - auth_tag_len, in p10_aes_gcm_crypt()
344 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
357 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_decrypt()
[all …]
/linux-6.15/arch/arm64/crypto/
H A Dsm4-ce-ccm-glue.c75 if (req->assoclen) in ccm_format_input()
96 u32 assoclen = req->assoclen; in ccm_calculate_auth_mac() local
100 if (assoclen < 0xff00) { in ccm_calculate_auth_mac()
101 aadlen.l = cpu_to_be16(assoclen); in ccm_calculate_auth_mac()
105 put_unaligned_be32(assoclen, &aadlen.h); in ccm_calculate_auth_mac()
118 orig_n = scatterwalk_next(&walk, assoclen); in ccm_calculate_auth_mac()
153 assoclen -= orig_n; in ccm_calculate_auth_mac()
154 } while (assoclen); in ccm_calculate_auth_mac()
172 if (req->assoclen) in ccm_crypt()
229 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
[all …]
H A Dsm4-ce-gcm-glue.c78 u32 assoclen = req->assoclen; in gcm_calculate_auth_mac() local
88 orig_n = scatterwalk_next(&walk, assoclen); in gcm_calculate_auth_mac()
122 assoclen -= orig_n; in gcm_calculate_auth_mac()
123 } while (assoclen); in gcm_calculate_auth_mac()
146 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_crypt()
154 if (req->assoclen) in gcm_crypt()
206 scatterwalk_map_and_copy(ghash, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
228 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
H A Dghash-ce-glue.c338 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
341 if (assoclen) in gcm_encrypt()
342 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
404 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
407 if (assoclen) in gcm_decrypt()
408 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
413 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
460 return gcm_encrypt(req, iv, req->assoclen); in gcm_aes_encrypt()
468 return gcm_decrypt(req, iv, req->assoclen); in gcm_aes_decrypt()
500 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
[all …]
H A Daes-ce-ccm-glue.c93 if (req->assoclen) in ccm_init_mac()
141 u32 len = req->assoclen; in ccm_calculate_auth_mac()
192 if (req->assoclen) in ccm_encrypt()
229 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
259 if (req->assoclen) in ccm_decrypt()
297 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
/linux-6.15/arch/x86/crypto/
H A Daegis128-aesni-glue.c61 unsigned int assoclen,
66 unsigned int assoclen) in crypto_aegis128_aesni_process_ad() argument
73 while (assoclen != 0) { in crypto_aegis128_aesni_process_ad()
74 unsigned int size = scatterwalk_next(&walk, assoclen); in crypto_aegis128_aesni_process_ad()
97 assoclen -= size; in crypto_aegis128_aesni_process_ad()
187 crypto_aegis128_aesni_process_ad(&state, req->src, req->assoclen); in crypto_aegis128_aesni_crypt()
189 aegis128_aesni_final(&state, tag_xor, req->assoclen, cryptlen); in crypto_aegis128_aesni_crypt()
204 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt()
218 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt()
/linux-6.15/arch/arm/crypto/
H A Dghash-ce-glue.c327 if (assoclen) in gcm_encrypt()
328 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
360 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
416 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
423 if (assoclen) in gcm_decrypt()
424 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
455 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
482 return gcm_encrypt(req, req->iv, req->assoclen); in gcm_aes_encrypt()
487 return gcm_decrypt(req, req->iv, req->assoclen); in gcm_aes_decrypt()
519 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
[all …]
/linux-6.15/drivers/crypto/starfive/
H A Djh7110-aes.c211 if (cryp->assoclen) in starfive_aes_ccm_init()
378 total_len = cryp->assoclen; in starfive_aes_ccm_write_adata()
581 cryp->assoclen = 0; in starfive_aes_do_one_req()
649 cryp->assoclen = req->assoclen; in starfive_aes_aead_do_one_req()
665 cryp->total_in + cryp->assoclen, in starfive_aes_aead_do_one_req()
669 if (cryp->assoclen) { in starfive_aes_aead_do_one_req()
676 rctx->adata, cryp->assoclen) != cryp->assoclen) in starfive_aes_aead_do_one_req()
691 if (!cryp->assoclen) in starfive_aes_aead_do_one_req()
820 aead_request_set_ad(subreq, req->assoclen); in starfive_aes_aead_do_fallback()
841 src = scatterwalk_ffwd(_src, req->src, req->assoclen); in starfive_aes_aead_crypt()
[all …]
/linux-6.15/include/crypto/
H A Daead.h93 unsigned int assoclen; member
538 unsigned int assoclen) in aead_request_set_ad() argument
540 req->assoclen = assoclen; in aead_request_set_ad()
/linux-6.15/drivers/crypto/chelsio/
H A Dchcr_algo.c2919 if (req->assoclen) in generate_b0()
2956 if (assoclen) in ccm_format_packet()
2980 unsigned int assoclen; in fill_sec_cpl_for_aead() local
2985 assoclen = req->assoclen - 8; in fill_sec_cpl_for_aead()
2987 assoclen = req->assoclen; in fill_sec_cpl_for_aead()
3032 if (req->assoclen != 16 && req->assoclen != 20) { in aead_ccm_validate_input()
3054 unsigned int sub_type, assoclen = req->assoclen; in create_aead_ccm_wr() local
3064 assoclen -= 8; in create_aead_ccm_wr()
3152 unsigned int dst_size = 0, temp = 0, kctx_len, assoclen = req->assoclen; in create_gcm_wr() local
3163 assoclen = req->assoclen - 8; in create_gcm_wr()
[all …]
/linux-6.15/drivers/crypto/ccree/
H A Dcc_aead.c1317 unsigned int assoclen = areq_ctx->assoclen; in validate_data_size() local
1568 if (req_ctx->assoclen > 0) in config_ccm_adata()
1818 if (req_ctx->assoclen > 0) in cc_gcm()
2029 areq_ctx->assoclen = req->assoclen; in cc_aead_encrypt()
2053 areq_ctx->assoclen = req->assoclen - CCM_BLOCK_IV_SIZE; in cc_rfc4309_ccm_encrypt()
2073 areq_ctx->assoclen = req->assoclen; in cc_aead_decrypt()
2095 areq_ctx->assoclen = req->assoclen - CCM_BLOCK_IV_SIZE; in cc_rfc4309_ccm_decrypt()
2207 areq_ctx->assoclen = req->assoclen - GCM_BLOCK_RFC4_IV_SIZE; in cc_rfc4106_gcm_encrypt()
2234 areq_ctx->assoclen = req->assoclen; in cc_rfc4543_gcm_encrypt()
2258 areq_ctx->assoclen = req->assoclen - GCM_BLOCK_RFC4_IV_SIZE; in cc_rfc4106_gcm_decrypt()
[all …]
/linux-6.15/drivers/crypto/tegra/
H A Dtegra-se-aes.c59 unsigned int assoclen; member
632 SE_ADDR_HI_SZ(rctx->assoclen); in tegra_gmac_prep_cmd()
662 if (!rctx->assoclen) in tegra_gcm_crypt_prep_cmd()
978 if (rctx->assoclen) in tegra_ccm_format_nonce()
1033 if (rctx->assoclen) { in tegra_ccm_format_blocks()
1041 offset += rctx->assoclen; in tegra_ccm_format_blocks()
1043 rctx->assoclen + alen); in tegra_ccm_format_blocks()
1102 sg, rctx->assoclen, in tegra_ccm_compute_auth()
1166 rctx->assoclen = req->assoclen; in tegra_ccm_crypt_init()
1279 rctx->assoclen = req->assoclen; in tegra_gcm_do_one_req()
[all …]

1234