Home
last modified time | relevance | path

Searched refs:authsize (Results 1 – 25 of 26) sorted by relevance

12

/drivers/crypto/nx/
Dnx-aes-ccm.c70 unsigned int authsize) in ccm_aes_nx_setauthsize() argument
72 switch (authsize) { in ccm_aes_nx_setauthsize()
89 unsigned int authsize) in ccm4309_aes_nx_setauthsize() argument
91 switch (authsize) { in ccm4309_aes_nx_setauthsize()
133 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument
136 unsigned int l, lp, m = authsize; in generate_b0()
159 unsigned int authsize, in generate_pat() argument
211 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat()
336 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in ccm_nx_decrypt() local
344 nbytes -= authsize; in ccm_nx_decrypt()
[all …]
Dnx-aes-gcm.c85 unsigned int authsize) in gcm4106_aes_nx_setauthsize() argument
87 switch (authsize) { in gcm4106_aes_nx_setauthsize()
/drivers/crypto/cavium/nitrox/
Dnitrox_aead.c62 unsigned int authsize) in nitrox_aead_setauthsize() argument
69 flags.w0.mac_len = authsize; in nitrox_aead_setauthsize()
72 aead->authsize = authsize; in nitrox_aead_setauthsize()
203 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc()
231 rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_aes_gcm_dec()
234 rctx->dstlen = rctx->srclen - aead->authsize; in nitrox_aes_gcm_dec()
349 unsigned int authsize) in nitrox_rfc4106_setauthsize() argument
351 switch (authsize) { in nitrox_rfc4106_setauthsize()
360 return nitrox_aead_setauthsize(aead, authsize); in nitrox_rfc4106_setauthsize()
422 aead_rctx->dstlen = aead_rctx->srclen + aead->authsize; in nitrox_rfc4106_enc()
[all …]
/drivers/crypto/caam/
Dcaamalg_qi.c66 unsigned int authsize; member
87 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
137 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
152 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
170 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
177 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
181 ctx->authsize = authsize; in aead_setauthsize()
300 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
316 ctx->authsize, true); in gcm_set_sh_desc()
331 ctx->authsize, true); in gcm_set_sh_desc()
[all …]
Dcaamalg.c114 unsigned int authsize; member
140 cnstr_shdsc_aead_null_encap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
159 cnstr_shdsc_aead_null_decap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
183 if (!ctx->authsize) in aead_set_sh_desc()
242 ctx->authsize, is_rfc3686, nonce, ctx1_iv_off, in aead_set_sh_desc()
264 ctx->authsize, alg->caam.geniv, is_rfc3686, in aead_set_sh_desc()
288 ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
298 unsigned int authsize) in aead_setauthsize() argument
302 ctx->authsize = authsize; in aead_setauthsize()
317 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
[all …]
Dcaamalg_qi2.c82 unsigned int authsize; member
181 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
233 ivsize, ctx->authsize, is_rfc3686, in aead_set_sh_desc()
238 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
259 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
270 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
274 ctx->authsize = authsize; in aead_setauthsize()
365 unsigned int authsize = ctx->authsize; in aead_edesc_alloc() local
379 dst_len = src_len + (encrypt ? authsize : (-authsize)); in aead_edesc_alloc()
424 (encrypt ? authsize : 0); in aead_edesc_alloc()
[all …]
/drivers/crypto/
Dixp4xx_crypto.c346 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac() local
347 int decryptlen = req->assoclen + req->cryptlen - authsize; in finish_scattered_hmac()
351 req->dst, decryptlen, authsize, 1); in finish_scattered_hmac()
654 static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize, in setup_auth() argument
670 cfgword = algo->cfgword | ( authsize << 6); /* (authsize/4) << 8 */ in setup_auth()
982 unsigned authsize = crypto_aead_authsize(tfm); in aead_perform() local
1005 cryptlen = req->cryptlen -authsize; in aead_perform()
1006 eff_cryptlen -= authsize; in aead_perform()
1033 if (lastlen >= authsize) in aead_perform()
1035 buf->buf_len - authsize; in aead_perform()
[all …]
Dtalitos.c998 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap() local
999 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp_unmap()
1009 cryptlen + authsize, areq->assoclen); in ipsec_esp_unmap()
1052 unsigned int authsize = crypto_aead_authsize(authenc); in ipsec_esp_decrypt_swauth_done() local
1063 icv = oicv - authsize; in ipsec_esp_decrypt_swauth_done()
1065 err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0; in ipsec_esp_decrypt_swauth_done()
1202 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp() local
1206 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp()
1217 dma_addr_t dma_icv = edesc->dma_link_tbl + edesc->dma_len - authsize; in ipsec_esp()
1254 elen = authsize; in ipsec_esp()
[all …]
Datmel-aes.c1580 u32 authsize; in atmel_aes_gcm_process() local
1583 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_process()
1584 ctx->textlen = req->cryptlen - (enc ? 0 : authsize); in atmel_aes_gcm_process()
1731 u32 offset, authsize, itag[4], *otag = ctx->tag; in atmel_aes_gcm_finalize() local
1741 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_finalize()
1743 scatterwalk_map_and_copy(otag, req->dst, offset, authsize, 1); in atmel_aes_gcm_finalize()
1746 scatterwalk_map_and_copy(itag, req->src, offset, authsize, 0); in atmel_aes_gcm_finalize()
1747 err = crypto_memneq(itag, otag, authsize) ? -EBADMSG : 0; in atmel_aes_gcm_finalize()
1793 unsigned int authsize) in atmel_aes_gcm_setauthsize() argument
1796 switch (authsize) { in atmel_aes_gcm_setauthsize()
[all …]
Domap-aes-gcm.c65 dd->authsize, 1); in omap_aes_gcm_done_task()
75 for (i = 0; i < dd->authsize; i++) { in omap_aes_gcm_done_task()
140 dd->authsize = authlen; in omap_aes_gcm_copy_buffers()
232 dd->authsize, 0); in omap_aes_gcm_dma_out_callback()
Domap-aes.h176 size_t authsize; member
Dpicoxcell_crypto.c499 unsigned int authsize) in spacc_aead_setauthsize() argument
503 return crypto_aead_setauthsize(ctx->sw_cipher, authsize); in spacc_aead_setauthsize()
560 unsigned int authsize = crypto_aead_authsize(aead); in spacc_aead_submit() local
585 proc_len -= authsize; in spacc_aead_submit()
589 writel(authsize, engine->regs + SPA_ICV_LEN_REG_OFFSET); in spacc_aead_submit()
/drivers/crypto/ccree/
Dcc_aead.c56 unsigned int authsize; /* Actual (reduced?) size of the MAC/ICv */ member
233 ctx->authsize) != 0) { in cc_aead_complete()
235 ctx->authsize, ctx->cipher_mode); in cc_aead_complete()
248 skip, (skip + ctx->authsize), in cc_aead_complete()
680 unsigned int authsize) in cc_aead_setauthsize() argument
686 if (authsize == 0 || in cc_aead_setauthsize()
687 authsize > crypto_aead_maxauthsize(authenc)) { in cc_aead_setauthsize()
691 ctx->authsize = authsize; in cc_aead_setauthsize()
692 dev_dbg(dev, "authlen=%d\n", ctx->authsize); in cc_aead_setauthsize()
698 unsigned int authsize) in cc_rfc4309_ccm_setauthsize() argument
[all …]
Dcc_buffer_mgr.c576 static bool cc_is_icv_frag(unsigned int sgl_nents, unsigned int authsize, in cc_is_icv_frag() argument
579 return ((sgl_nents > 1) && (last_entry_data_size < authsize)); in cc_is_icv_frag()
712 unsigned int authsize = areq_ctx->req_authsize; in cc_prepare_aead_data_dlli() local
720 offset = *src_last_bytes - authsize; in cc_prepare_aead_data_dlli()
723 offset = *dst_last_bytes - authsize; in cc_prepare_aead_data_dlli()
738 unsigned int authsize = areq_ctx->req_authsize; in cc_prepare_aead_data_mlli() local
750 cc_is_icv_frag(areq_ctx->src.nents, authsize, in cc_prepare_aead_data_mlli()
777 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli()
779 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli()
794 cc_is_icv_frag(areq_ctx->src.nents, authsize, in cc_prepare_aead_data_mlli()
[all …]
/drivers/crypto/chelsio/
Dchcr_algo.c180 int authsize = crypto_aead_authsize(tfm); in chcr_verify_tag() local
187 cmp = crypto_memneq(&fw6_pld->data[2], (fw6_pld + 1), authsize); in chcr_verify_tag()
191 authsize, req->assoclen + in chcr_verify_tag()
192 req->cryptlen - authsize); in chcr_verify_tag()
193 cmp = crypto_memneq(temp, (fw6_pld + 1), authsize); in chcr_verify_tag()
2267 unsigned int authsize = crypto_aead_authsize(tfm); in chcr_aead_common_init() local
2273 if (reqctx->op && req->cryptlen < authsize) in chcr_aead_common_init()
2296 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in chcr_aead_need_fallback() local
2298 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
2337 unsigned int authsize = crypto_aead_authsize(tfm); in create_authenc_wr() local
[all …]
Dchcr_ipsec.c112 int authsize = x->aead->alg_icv_len / 8; in chcr_ipsec_setauthsize() local
114 sa_entry->authsize = authsize; in chcr_ipsec_setauthsize()
116 switch (authsize) { in chcr_ipsec_setauthsize()
617 sa_entry->authsize, in chcr_crypto_wreq()
618 sa_entry->authsize); in chcr_crypto_wreq()
Dchcr_core.h189 unsigned int authsize; member
/drivers/crypto/stm32/
Dstm32-cryp.c143 size_t authsize; member
465 cryp->areq->cryptlen - cryp->authsize; in stm32_cryp_get_input_text_len()
505 b0[0] |= (8 * ((cryp->authsize - 2) / 2)); in stm32_cryp_ccm_init()
797 unsigned int authsize) in stm32_cryp_aes_gcm_setauthsize() argument
799 return authsize == AES_BLOCK_SIZE ? 0 : -EINVAL; in stm32_cryp_aes_gcm_setauthsize()
803 unsigned int authsize) in stm32_cryp_aes_ccm_setauthsize() argument
805 switch (authsize) { in stm32_cryp_aes_ccm_setauthsize()
968 cryp->authsize = crypto_aead_authsize(crypto_aead_reqtfm(areq)); in stm32_cryp_prepare_req()
972 cryp->total_out = cryp->total_in + cryp->authsize; in stm32_cryp_prepare_req()
975 cryp->total_out = cryp->total_in - cryp->authsize; in stm32_cryp_prepare_req()
[all …]
/drivers/crypto/ccp/
Dccp-crypto-aes-galois.c59 unsigned int authsize) in ccp_aes_gcm_setauthsize() argument
61 switch (authsize) { in ccp_aes_gcm_setauthsize()
120 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
Dccp-ops.c623 unsigned int authsize; in ccp_run_aes_gcm_cmd() local
646 authsize = aes->authsize ? aes->authsize : AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
647 switch (authsize) { in ccp_run_aes_gcm_cmd()
674 ilen = aes->src_len - authsize; in ccp_run_aes_gcm_cmd()
855 ccp_get_dm_area(&final_wa, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
858 ret = ccp_init_dm_workarea(&tag, cmd_q, authsize, in ccp_run_aes_gcm_cmd()
862 ret = ccp_set_dm_area(&tag, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
867 authsize) ? -EBADMSG : 0; in ccp_run_aes_gcm_cmd()
/drivers/crypto/mediatek/
Dmtk-aes.c137 u32 authsize; member
896 info->cmd[cnt++] = AES_GCM_CMD4 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
899 info->cmd[cnt++] = AES_GCM_CMD5 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
900 info->cmd[cnt++] = AES_GCM_CMD6 | cpu_to_le32(gctx->authsize); in mtk_aes_gcm_info_init()
972 aes->total = len + gctx->authsize; in mtk_aes_gcm_start()
974 scatterwalk_map_and_copy(tag, req->dst, len, gctx->authsize, 1); in mtk_aes_gcm_start()
996 gctx->textlen = req->cryptlen - (enc ? 0 : gctx->authsize); in mtk_aes_gcm_crypt()
1085 u32 authsize) in mtk_aes_gcm_setauthsize() argument
1091 switch (authsize) { in mtk_aes_gcm_setauthsize()
1100 gctx->authsize = authsize; in mtk_aes_gcm_setauthsize()
/drivers/crypto/axis/
Dartpec6_crypto.c2016 size_t authsize = crypto_aead_authsize(cipher); in artpec6_crypto_prepare_aead() local
2019 authsize); in artpec6_crypto_prepare_aead()
2023 if (authsize < AES_BLOCK_SIZE) { in artpec6_crypto_prepare_aead()
2024 count = AES_BLOCK_SIZE - authsize; in artpec6_crypto_prepare_aead()
2196 unsigned int authsize = crypto_aead_authsize(aead); in artpec6_crypto_complete_aead() local
2201 authsize, in artpec6_crypto_complete_aead()
2203 authsize); in artpec6_crypto_complete_aead()
2207 authsize)) { in artpec6_crypto_complete_aead()
2210 input_tag, authsize, true); in artpec6_crypto_complete_aead()
2213 authsize, true); in artpec6_crypto_complete_aead()
/drivers/crypto/amcc/
Dcrypto4xx_alg.c341 if (aead->authsize & 3) in crypto4xx_aead_need_fallback()
503 unsigned int authsize) in crypto4xx_setauthsize_aead() argument
508 return crypto_aead_setauthsize(ctx->sw_cipher.aead, authsize); in crypto4xx_setauthsize_aead()
Dcrypto4xx_core.h234 unsigned int authsize);
/drivers/crypto/inside-secure/
Dsafexcel_cipher.c2153 unsigned int authsize) in safexcel_aead_gcm_setauthsize() argument
2155 return crypto_gcm_check_authsize(authsize); in safexcel_aead_gcm_setauthsize()
2242 unsigned int authsize) in safexcel_aead_ccm_setauthsize() argument
2245 switch (authsize) { in safexcel_aead_ccm_setauthsize()

12