Home
last modified time | relevance | path

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

12

/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 Dghash-ce-glue.c295 static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen) in gcm_encrypt() argument
307 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
310 if (assoclen) in gcm_encrypt()
311 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
351 scatterwalk_map_and_copy(tag, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
357 static int gcm_decrypt(struct aead_request *req, char *iv, int assoclen) in gcm_decrypt() argument
372 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
375 if (assoclen) in gcm_decrypt()
376 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
381 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
[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()
H A Daes-ce-ccm-glue.c94 if (req->assoclen) in ccm_init_mac()
139 u32 len = req->assoclen; in ccm_calculate_auth_mac()
189 if (req->assoclen) in ccm_encrypt()
225 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
254 if (req->assoclen) in ccm_decrypt()
291 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
/linux/crypto/
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 Daegis.h42 unsigned int assoclen,
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/tegra/
H A Dtegra-se-aes.c59 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/include/crypto/
H 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()
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/arch/x86/crypto/
H A Daesni-intel_glue.c1333 struct scatterlist *sg_src, unsigned int assoclen, in gcm_process_assoc() argument
1348 while (assoclen) { in gcm_process_assoc()
1350 &walk, assoclen); in gcm_process_assoc()
1367 if (unlikely(assoclen)) /* Not the last segment yet? */ in gcm_process_assoc()
1382 assoclen -= orig_len_this_step; in gcm_process_assoc()
1395 unsigned int assoclen = req->assoclen; in gcm_crypt() local
1406 if (unlikely(assoclen != 16 && assoclen != 20)) in gcm_crypt()
1408 assoclen -= 8; in gcm_crypt()
1437 gcm_process_assoc(key, ghash_acc, req->src, assoclen, flags); in gcm_crypt()
1470 aes_gcm_enc_final(key, le_ctr, ghash_acc, assoclen, in gcm_crypt()
[all …]
/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/inside-secure/
H A Dsafexcel_cipher.c164 u32 cryptlen, u32 assoclen, u32 digestsize) in safexcel_aead_token() argument
168 int assocadj = assoclen - ctx->aadskip, aadalign; in safexcel_aead_token()
676 unsigned int cryptlen, unsigned int assoclen, in safexcel_send_req() argument
689 unsigned int totlen_src = cryptlen + assoclen; in safexcel_send_req()
826 assoclen, digestsize); in safexcel_send_req()
844 if (assoclen) { in safexcel_send_req()
845 if (assoclen >= len) { in safexcel_send_req()
846 assoclen -= len; in safexcel_send_req()
851 assoclen, in safexcel_send_req()
852 len - assoclen); in safexcel_send_req()
[all …]
/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/qce/
H A Daead.h39 unsigned int assoclen; member
/linux/drivers/crypto/caam/
H A Dcaamalg_qi2.h114 unsigned int assoclen; member
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 …]

12