Home
last modified time | relevance | path

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

123

/linux-6.3-rc2/drivers/crypto/nx/
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()
224 *(u32 *)&b1[2] = assoclen; in generate_pat()
231 if (!assoclen) { in generate_pat()
233 } else if (assoclen <= 14) { in generate_pat()
328 unsigned int assoclen) in ccm_nx_decrypt() argument
[all …]
A Dnx-aes-gcm.c102 unsigned int assoclen) in nx_gca() argument
108 unsigned int nbytes = assoclen; in nx_gca()
176 unsigned int nbytes = assoclen; in gmac()
308 unsigned int assoclen) in gcm_aes_nx_crypt() argument
325 if (assoclen == 0) in gcm_aes_nx_crypt()
337 if (assoclen) { in gcm_aes_nx_crypt()
339 assoclen); in gcm_aes_nx_crypt()
359 processed + req->assoclen, in gcm_aes_nx_crypt()
396 req->dst, req->assoclen + nbytes, in gcm_aes_nx_crypt()
447 if (req->assoclen < 8) in gcm4106_aes_nx_encrypt()
[all …]
/linux-6.3-rc2/drivers/crypto/
A 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()
98 assoclen = req->assoclen; in omap_aes_gcm_copy_buffers()
102 assoclen -= 8; 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()
147 dd->assoc_len = assoclen; in omap_aes_gcm_copy_buffers()
245 int err, assoclen; in omap_aes_gcm_crypt() local
255 assoclen = req->assoclen - 8; in omap_aes_gcm_crypt()
257 assoclen = req->assoclen; in omap_aes_gcm_crypt()
[all …]
/linux-6.3-rc2/drivers/crypto/cavium/nitrox/
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.3-rc2/crypto/
A Dauthencesn.c96 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv_tail() local
129 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_genicv() local
146 ahash_request_set_crypt(ahreq, dst, hash, assoclen + cryptlen); in crypto_authenc_esn_genicv()
187 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_encrypt() local
193 src = scatterwalk_ffwd(areq_ctx->src, req->src, assoclen); in crypto_authenc_esn_encrypt()
197 err = crypto_authenc_esn_copy(req, assoclen); in crypto_authenc_esn_encrypt()
202 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, assoclen); in crypto_authenc_esn_encrypt()
230 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_decrypt_tail() local
249 dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen); in crypto_authenc_esn_decrypt_tail()
277 unsigned int assoclen = req->assoclen; in crypto_authenc_esn_decrypt() local
[all …]
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_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()
403 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_encrypt_generic()
429 crypto_aegis128_final(&state, &tag, req->assoclen, cryptlen); in crypto_aegis128_decrypt_generic()
464 crypto_aegis128_process_ad(&state, req->src, req->assoclen, true); in crypto_aegis128_encrypt_simd()
[all …]
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 …]
A 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()
210 ilen = 16 - (assoclen + ilen) % 16; in crypto_ccm_auth()
236 req->assoclen + req->cryptlen, in crypto_ccm_encrypt_done()
623 sg_set_buf(rctx->src, iv + 16, req->assoclen - 8); in crypto_rfc4309_crypt()
630 sg_set_buf(rctx->dst, iv + 16, req->assoclen - 8); in crypto_rfc4309_crypt()
642 aead_request_set_ad(subreq, req->assoclen - 8); in crypto_rfc4309_crypt()
649 if (req->assoclen != 16 && req->assoclen != 20) in crypto_rfc4309_encrypt()
[all …]
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()
A 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()
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()
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()
756 aead_request_set_ad(subreq, req->assoclen - 8); in crypto_rfc4106_crypt()
765 err = crypto_ipsec_check_assoclen(req->assoclen); in crypto_rfc4106_encrypt()
778 err = crypto_ipsec_check_assoclen(req->assoclen); in crypto_rfc4106_decrypt()
975 return crypto_ipsec_check_assoclen(req->assoclen) ?: in crypto_rfc4543_encrypt()
[all …]
A 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()
185 skcipher_request_set_crypt(skreq, req->src, req->dst, req->assoclen, in crypto_authenc_copy_assoc()
205 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_encrypt()
213 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_encrypt()
248 src = scatterwalk_ffwd(areq_ctx->src, req->src, req->assoclen); in crypto_authenc_decrypt_tail()
252 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); in crypto_authenc_decrypt_tail()
294 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
/linux-6.3-rc2/arch/arm64/crypto/
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()
115 u32 n = scatterwalk_clamp(&walk, assoclen); in ccm_calculate_auth_mac()
120 n = scatterwalk_clamp(&walk, assoclen); in ccm_calculate_auth_mac()
124 assoclen -= n; in ccm_calculate_auth_mac()
158 scatterwalk_done(&walk, 0, assoclen); in ccm_calculate_auth_mac()
159 } while (assoclen); in ccm_calculate_auth_mac()
[all …]
A Dsm4-ce-gcm-glue.c78 u32 assoclen = req->assoclen; in gcm_calculate_auth_mac() local
85 u32 n = scatterwalk_clamp(&walk, assoclen); in gcm_calculate_auth_mac()
90 n = scatterwalk_clamp(&walk, assoclen); in gcm_calculate_auth_mac()
94 assoclen -= n; in gcm_calculate_auth_mac()
127 scatterwalk_done(&walk, 0, assoclen); in gcm_calculate_auth_mac()
128 } while (assoclen); in gcm_calculate_auth_mac()
151 lengths.a = cpu_to_be64(req->assoclen * 8); in gcm_crypt()
159 if (req->assoclen) in gcm_crypt()
211 scatterwalk_map_and_copy(ghash, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
233 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
A Dghash-ce-glue.c347 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
350 if (assoclen) in gcm_encrypt()
351 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
413 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
416 if (assoclen) in gcm_decrypt()
417 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
422 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
469 return gcm_encrypt(req, iv, req->assoclen); in gcm_aes_encrypt()
477 return gcm_decrypt(req, iv, req->assoclen); in gcm_aes_decrypt()
509 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
[all …]
A Daes-ce-ccm-glue.c90 if (req->assoclen) in ccm_init_mac()
103 u32 len = req->assoclen; in ccm_calculate_auth_mac()
167 if (req->assoclen) in ccm_encrypt()
193 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
221 if (req->assoclen) in ccm_decrypt()
251 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
/linux-6.3-rc2/drivers/crypto/qce/
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.3-rc2/arch/x86/crypto/
A 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()
A 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()
795 req->assoclen + req->cryptlen, in gcmaes_encrypt()
816 req->assoclen + req->cryptlen - auth_tag_len, in gcmaes_decrypt()
840 if (unlikely(req->assoclen != 16 && req->assoclen != 20)) in helper_rfc4106_encrypt()
864 if (unlikely(req->assoclen != 16 && req->assoclen != 20)) in helper_rfc4106_decrypt()
[all …]
/linux-6.3-rc2/arch/arm/crypto/
A Dghash-ce-glue.c510 if (assoclen) in gcm_encrypt()
511 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
543 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
599 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
606 if (assoclen) in gcm_decrypt()
607 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
638 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
665 return gcm_encrypt(req, req->iv, req->assoclen); in gcm_aes_encrypt()
670 return gcm_decrypt(req, req->iv, req->assoclen); in gcm_aes_decrypt()
702 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
[all …]
/linux-6.3-rc2/include/crypto/
A 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()
A Dgcm.h54 static inline int crypto_ipsec_check_assoclen(unsigned int assoclen) in crypto_ipsec_check_assoclen() argument
56 switch (assoclen) { in crypto_ipsec_check_assoclen()
/linux-6.3-rc2/drivers/crypto/chelsio/
A Dchcr_algo.c2911 if (req->assoclen) in generate_b0()
2948 if (assoclen) in ccm_format_packet()
2972 unsigned int assoclen; in fill_sec_cpl_for_aead() local
2977 assoclen = req->assoclen - 8; in fill_sec_cpl_for_aead()
2979 assoclen = req->assoclen; in fill_sec_cpl_for_aead()
3024 if (req->assoclen != 16 && req->assoclen != 20) { in aead_ccm_validate_input()
3046 unsigned int sub_type, assoclen = req->assoclen; in create_aead_ccm_wr() local
3056 assoclen -= 8; in create_aead_ccm_wr()
3144 unsigned int dst_size = 0, temp = 0, kctx_len, assoclen = req->assoclen; in create_gcm_wr() local
3155 assoclen = req->assoclen - 8; in create_gcm_wr()
[all …]
/linux-6.3-rc2/drivers/crypto/ccree/
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 …]

Completed in 47 milliseconds

123