Home
last modified time | relevance | path

Searched refs:cryptlen (Results 1 – 25 of 52) sorted by relevance

123

/linux/drivers/crypto/qce/
H A Daead.c71 totallen = req->cryptlen + req->assoclen; in qce_aead_done()
80 totallen = req->cryptlen + req->assoclen - ctx->authsize; in qce_aead_done()
124 totallen = rctx->cryptlen + assoclen; in qce_aead_prepare_dst_buf()
152 sg = qce_sgtable_add(&rctx->dst_tbl, msg_sg, rctx->cryptlen); in qce_aead_prepare_dst_buf()
157 totallen = rctx->cryptlen + rctx->assoclen; in qce_aead_prepare_dst_buf()
192 unsigned int adata_header_len, cryptlen, totallen; in qce_aead_ccm_prepare_buf_assoclen() local
198 cryptlen = rctx->cryptlen + ctx->authsize; in qce_aead_ccm_prepare_buf_assoclen()
200 cryptlen = rctx->cryptlen; in qce_aead_ccm_prepare_buf_assoclen()
201 totallen = cryptlen + req->assoclen; in qce_aead_ccm_prepare_buf_assoclen()
257 sg = qce_sgtable_add(&rctx->src_tbl, msg_sg, cryptlen); in qce_aead_ccm_prepare_buf_assoclen()
[all …]
H A Dskcipher.c79 rctx->cryptlen = req->cryptlen; in qce_skcipher_async_req_handle()
85 rctx->src_nents = sg_nents_for_len(req->src, req->cryptlen); in qce_skcipher_async_req_handle()
87 rctx->dst_nents = sg_nents_for_len(req->dst, req->cryptlen); in qce_skcipher_async_req_handle()
110 sg = qce_sgtable_add(&rctx->dst_tbl, req->dst, req->cryptlen); in qce_skcipher_async_req_handle()
271 if (!req->cryptlen) in qce_skcipher_crypt()
279 if (!IS_ALIGNED(req->cryptlen, blocksize)) in qce_skcipher_crypt()
292 (IS_XTS(rctx->flags) && ((req->cryptlen <= aes_sw_max_len) || in qce_skcipher_crypt()
293 (req->cryptlen > QCE_SECTOR_SIZE && in qce_skcipher_crypt()
294 req->cryptlen % QCE_SECTOR_SIZE))))) { in qce_skcipher_crypt()
301 req->dst, req->cryptlen, req->iv); in qce_skcipher_crypt()
H A Dcommon.c299 unsigned int enckeylen, unsigned int cryptlen) in qce_xtskey() argument
311 qce_write(qce, REG_ENCR_XTS_DU_SIZE, cryptlen); in qce_xtskey()
352 rctx->cryptlen); in qce_setup_regs_skcipher()
373 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_skcipher()
383 qce_write(qce, REG_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_skcipher()
514 totallen = rctx->cryptlen + rctx->assoclen; in qce_setup_regs_aead()
518 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen + ctx->authsize); in qce_setup_regs_aead()
520 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_aead()
/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c30 unsigned int ileft = areq->cryptlen; in sun4i_ss_opti_poll()
31 unsigned int oleft = areq->cryptlen; in sun4i_ss_opti_poll()
41 if (!areq->cryptlen) in sun4i_ss_opti_poll()
51 areq->cryptlen - ivsize, ivsize, 0); in sun4i_ss_opti_poll()
57 algt->stat_bytes += areq->cryptlen; in sun4i_ss_opti_poll()
74 ileft = areq->cryptlen / 4; in sun4i_ss_opti_poll()
75 oleft = areq->cryptlen / 4; in sun4i_ss_opti_poll()
137 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize, in sun4i_ss_opti_poll()
166 areq->cryptlen, areq->iv); in sun4i_ss_cipher_poll_fallback()
196 unsigned int ileft = areq->cryptlen; in sun4i_ss_cipher_poll()
[all …]
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c165 creq->gph.param0 = cpu_to_be16(rctx->cryptlen); in nitrox_set_creq()
166 creq->gph.param1 = cpu_to_be16(rctx->cryptlen + rctx->assoclen); in nitrox_set_creq()
227 rctx->cryptlen = areq->cryptlen; in nitrox_aes_gcm_enc()
229 rctx->srclen = areq->assoclen + areq->cryptlen; in nitrox_aes_gcm_enc()
261 rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_aes_gcm_dec()
263 rctx->srclen = areq->cryptlen + areq->assoclen; in nitrox_aes_gcm_dec()
449 aead_rctx->cryptlen = areq->cryptlen; in nitrox_rfc4106_enc()
451 aead_rctx->srclen = aead_rctx->assoclen + aead_rctx->cryptlen; in nitrox_rfc4106_enc()
481 aead_rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_rfc4106_dec()
484 areq->cryptlen - GCM_RFC4106_IV_SIZE + areq->assoclen; in nitrox_rfc4106_dec()
H A Dnitrox_skcipher.c85 unsigned int start = skreq->cryptlen - ivsize; in nitrox_cbc_cipher_callback()
221 skreq->cryptlen); in alloc_src_sglist()
242 skreq->cryptlen); in alloc_dst_sglist()
266 creq->gph.param0 = cpu_to_be16(skreq->cryptlen); in nitrox_skcipher_crypt()
297 unsigned int start = skreq->cryptlen - ivsize; in nitrox_cbc_decrypt()
/linux/crypto/
H A Dgcm.c56 unsigned int cryptlen; member
174 unsigned int cryptlen) in crypto_gcm_init_crypt() argument
186 cryptlen + sizeof(pctx->auth_tag), in crypto_gcm_init_crypt()
227 lengths.b = cpu_to_be64(gctx->cryptlen * 8); in gcm_hash_len()
287 remain = gcm_remain(gctx->cryptlen); in gcm_hash_crypt_continue()
316 if (gctx->cryptlen) in gcm_hash_assoc_remain_continue()
318 gctx->src, gctx->cryptlen, flags) ?: in gcm_hash_assoc_remain_continue()
413 req->assoclen + req->cryptlen, in gcm_enc_copy_hash()
424 gctx->cryptlen = req->cryptlen; in gcm_encrypt_continue()
452 crypto_gcm_init_crypt(req, req->cryptlen); in crypto_gcm_encrypt()
[all …]
H A Dseqiv.c59 if (req->cryptlen < ivsize) in seqiv_aead_encrypt()
70 req->assoclen + req->cryptlen); in seqiv_aead_encrypt()
87 req->cryptlen - ivsize, info); in seqiv_aead_encrypt()
108 if (req->cryptlen < ivsize + crypto_aead_authsize(geniv)) in seqiv_aead_decrypt()
118 req->cryptlen - ivsize, req->iv); 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()
195 unsigned int cryptlen = req->cryptlen; in crypto_authenc_encrypt() local
212 skcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv); in crypto_authenc_encrypt()
261 req->cryptlen - authsize, req->iv); in crypto_authenc_decrypt_tail()
293 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
H A Daegis128-neon.c54 unsigned int cryptlen, in crypto_aegis128_final_simd() argument
59 cryptlen, authsize); in crypto_aegis128_final_simd()
H A Dhctr2.c140 bool has_remainder = req->cryptlen % POLYVAL_BLOCK_SIZE; in hctr2_hash_tweak()
159 const unsigned int bulk_len = req->cryptlen - BLOCKCIPHER_BLOCK_SIZE; in hctr2_hash_message()
173 if (req->cryptlen % BLOCKCIPHER_BLOCK_SIZE) in hctr2_hash_message()
215 int bulk_len = req->cryptlen - BLOCKCIPHER_BLOCK_SIZE; in hctr2_crypt()
218 if (req->cryptlen < BLOCKCIPHER_BLOCK_SIZE) in hctr2_crypt()
/linux/drivers/crypto/gemini/
H A Dsl3516-ce-cipher.c34 if (areq->cryptlen == 0 || areq->cryptlen % 16) { in sl3516_ce_need_fallback()
119 areq->cryptlen, areq->iv); in sl3516_ce_cipher_fallback()
147 areq->cryptlen, in sl3516_ce_cipher()
179 len = areq->cryptlen; in sl3516_ce_cipher()
189 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sl3516_ce_cipher()
196 dev_err(ce->dev, "remaining len %d/%u nr_sgs=%d\n", len, areq->cryptlen, nr_sgs); in sl3516_ce_cipher()
201 len = areq->cryptlen; in sl3516_ce_cipher()
211 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo); in sl3516_ce_cipher()
234 ecb->cipher.algorithm_len = areq->cryptlen; in sl3516_ce_cipher()
/linux/drivers/crypto/virtio/
H A Dvirtio_crypto_skcipher_algs.c341 src_nents = sg_nents_for_len(req->src, req->cryptlen); in __virtio_crypto_skcipher_do_req()
383 cpu_to_le32(req->cryptlen); in __virtio_crypto_skcipher_do_req()
392 dst_len = min_t(unsigned int, req->cryptlen, dst_len); in __virtio_crypto_skcipher_do_req()
394 req->cryptlen, dst_len); in __virtio_crypto_skcipher_do_req()
396 if (unlikely(req->cryptlen + dst_len + ivsize + in __virtio_crypto_skcipher_do_req()
425 req->cryptlen - AES_BLOCK_SIZE, in __virtio_crypto_skcipher_do_req()
475 if (!req->cryptlen) in virtio_crypto_skcipher_encrypt()
477 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_encrypt()
498 if (!req->cryptlen) in virtio_crypto_skcipher_decrypt()
500 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_decrypt()
[all …]
/linux/drivers/crypto/stm32/
H A Dstm32-cryp.c573 return is_encrypt(cryp) ? cryp->areq->cryptlen : in stm32_cryp_get_input_text_len()
574 cryp->areq->cryptlen - cryp->authsize; in stm32_cryp_get_input_text_len()
1236 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_ecb_encrypt()
1239 if (req->cryptlen == 0) in stm32_cryp_aes_ecb_encrypt()
1247 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_ecb_decrypt()
1250 if (req->cryptlen == 0) in stm32_cryp_aes_ecb_decrypt()
1258 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_cbc_encrypt()
1261 if (req->cryptlen == 0) in stm32_cryp_aes_cbc_encrypt()
1269 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_cbc_decrypt()
1272 if (req->cryptlen == 0) in stm32_cryp_aes_cbc_decrypt()
[all …]
/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c30 if (areq->cryptlen == 0) in meson_cipher_need_fallback()
75 areq->cryptlen, areq->iv); in meson_cipher_do_fallback()
108 areq->cryptlen, in meson_cipher()
131 if (ivsize > areq->cryptlen) { in meson_cipher()
132 dev_err(mc->dev, "invalid ivsize=%d vs len=%d\n", ivsize, areq->cryptlen); in meson_cipher()
144 offset = areq->cryptlen - ivsize; in meson_cipher()
205 len = areq->cryptlen; in meson_cipher()
250 areq->cryptlen - ivsize, in meson_cipher()
/linux/arch/arm64/crypto/
H A Dsm4-ce-glue.c211 if (req->cryptlen < SM4_BLOCK_SIZE) in sm4_cbc_cts_crypt()
214 if (req->cryptlen == SM4_BLOCK_SIZE) in sm4_cbc_cts_crypt()
222 cbc_blocks = DIV_ROUND_UP(req->cryptlen, SM4_BLOCK_SIZE) - 2; in sm4_cbc_cts_crypt()
232 dst = src = scatterwalk_ffwd(sg_src, src, subreq.cryptlen); in sm4_cbc_cts_crypt()
235 subreq.cryptlen); in sm4_cbc_cts_crypt()
240 req->cryptlen - cbc_blocks * SM4_BLOCK_SIZE, in sm4_cbc_cts_crypt()
314 int tail = req->cryptlen % SM4_BLOCK_SIZE; in sm4_xts_crypt()
323 if (req->cryptlen < SM4_BLOCK_SIZE) in sm4_xts_crypt()
331 int nblocks = DIV_ROUND_UP(req->cryptlen, SM4_BLOCK_SIZE) - 2; in sm4_xts_crypt()
375 dst = src = scatterwalk_ffwd(sg_src, req->src, subreq.cryptlen); in sm4_xts_crypt()
[all …]
H A Dsm4-ce-ccm-glue.c199 err = ccm_format_input(mac, req, req->cryptlen); in ccm_encrypt()
212 scatterwalk_map_and_copy(mac, req->dst, req->assoclen + req->cryptlen, in ccm_encrypt()
228 err = ccm_format_input(mac, req, req->cryptlen - authsize); in ccm_decrypt()
242 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
H A Daes-neonbs-glue.c290 int tail = req->cryptlen % (8 * AES_BLOCK_SIZE); in __xts_crypt()
300 if (req->cryptlen < AES_BLOCK_SIZE) in __xts_crypt()
305 int xts_blocks = DIV_ROUND_UP(req->cryptlen, in __xts_crypt()
363 dst = src = scatterwalk_ffwd(sg_src, req->src, req->cryptlen); in __xts_crypt()
365 dst = scatterwalk_ffwd(sg_dst, req->dst, req->cryptlen); in __xts_crypt()
/linux/include/crypto/
H A Daead.h94 unsigned int cryptlen; member
608 unsigned int cryptlen, u8 *iv) in aead_request_set_crypt() argument
612 req->cryptlen = cryptlen; in aead_request_set_crypt()
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c162 start = sreq->cryptlen - ivsize; in output_iv_copyback()
243 u32 start = req->cryptlen - ivsize; in create_ctx_hdr()
269 req_info->req.param1 = req->cryptlen; in create_ctx_hdr()
316 update_input_data(req_info, req->src, req->cryptlen, &argcnt); in create_input_list()
337 update_output_data(req_info, req->dst, 0, req->cryptlen, &argcnt); in create_output_list()
351 if (req->cryptlen > OTX_CPT_MAX_REQ_SIZE) in cpt_enc_dec()
939 req_info->req.param1 = req->cryptlen; in create_aead_ctx_hdr()
940 req_info->req.param2 = req->cryptlen + req->assoclen; in create_aead_ctx_hdr()
943 req_info->req.param1 = req->cryptlen - mac_len; in create_aead_ctx_hdr()
944 req_info->req.param2 = req->cryptlen + req->assoclen - mac_len; in create_aead_ctx_hdr()
[all …]
/linux/drivers/crypto/ti/
H A Ddthev2-aes.c269 unsigned int len = req->cryptlen; in dthe_aes_run()
356 writel_relaxed(lower_32_bits(req->cryptlen), aes_base_reg + DTHE_P_AES_C_LENGTH_0); in dthe_aes_run()
357 writel_relaxed(upper_32_bits(req->cryptlen), aes_base_reg + DTHE_P_AES_C_LENGTH_1); in dthe_aes_run()
412 if (req->cryptlen % AES_BLOCK_SIZE) { in dthe_aes_crypt()
419 req->cryptlen, req->iv); in dthe_aes_crypt()
431 if (req->cryptlen == 0) { in dthe_aes_crypt()
/linux/drivers/crypto/hisilicon/sec2/
H A Dsec_crypto.c980 copy_size = aead_req->cryptlen + aead_req->assoclen; in GEN_SEC_SETKEY_FUNC()
1051 skip_size = aead_req->assoclen + aead_req->cryptlen - authsize; in sec_aead_mac_init()
1648 unsigned int cryptlen; in sec_update_iv() local
1655 cryptlen = sk_req->cryptlen; in sec_update_iv()
1659 cryptlen = aead_req->cryptlen; in sec_update_iv()
1664 cryptlen - iv_size); in sec_update_iv()
1668 sz = (cryptlen + iv_size - 1) / iv_size; in sec_update_iv()
1697 u32 data_size = aead_req->cryptlen; in set_aead_auth_iv()
1725 data_size = aead_req->cryptlen - authsize; in set_aead_auth_iv()
1934 authsize, a_req->cryptlen + a_req->assoclen); in sec_aead_callback()
[all …]
/linux/drivers/crypto/ccree/
H A Dcc_buffer_mgr.c56 u32 skip = req->assoclen + req->cryptlen; in cc_copy_mac()
519 areq_ctx->assoclen, req->cryptlen); in cc_unmap_aead_request()
690 areq_ctx->src_sgl, areq_ctx->cryptlen, in cc_prepare_aead_data_mlli()
730 areq_ctx->src_sgl, areq_ctx->cryptlen, in cc_prepare_aead_data_mlli()
734 areq_ctx->dst_sgl, areq_ctx->cryptlen, in cc_prepare_aead_data_mlli()
762 areq_ctx->dst_sgl, areq_ctx->cryptlen, in cc_prepare_aead_data_mlli()
766 areq_ctx->src_sgl, areq_ctx->cryptlen, in cc_prepare_aead_data_mlli()
802 unsigned int size_for_map = req->assoclen + req->cryptlen; in cc_aead_chain_data()
841 size_for_map = req->assoclen + req->cryptlen; in cc_aead_chain_data()
972 areq_ctx->cryptlen = (areq_ctx->gen_ctx.op_type == in cc_map_aead_request()
[all …]
/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c32 if (!req->cryptlen) in rk_cipher_need_fallback()
35 len = req->cryptlen; in rk_cipher_need_fallback()
83 areq->cryptlen, areq->iv); in rk_cipher_fallback()
311 unsigned int len = areq->cryptlen; in rk_cipher_run()
326 offset = areq->cryptlen - ivsize; in rk_cipher_run()
404 offset = areq->cryptlen - ivsize; in rk_cipher_run()
/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes-xts.c130 if (req->cryptlen == xts_unit_sizes[unit].size) { in ccp_aes_xts_crypt()
158 req->dst, req->cryptlen, req->iv); in ccp_aes_xts_crypt()
179 rctx->cmd.u.xts.src_len = req->cryptlen; in ccp_aes_xts_crypt()

123