Home
last modified time | relevance | path

Searched refs:authsize (Results 1 – 25 of 33) 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 …]
/drivers/crypto/cavium/nitrox/
Dnitrox_aead.c59 unsigned int authsize) in nitrox_aead_setauthsize() argument
66 flags.w0.mac_len = authsize; in nitrox_aead_setauthsize()
69 aead->authsize = authsize; in nitrox_aead_setauthsize()
75 unsigned int authsize) in nitrox_aes_gcm_setauthsize() argument
77 switch (authsize) { in nitrox_aes_gcm_setauthsize()
90 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize()
230 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc()
261 rctx->cryptlen = areq->cryptlen - aead->authsize; in nitrox_aes_gcm_dec()
264 rctx->dstlen = rctx->srclen - aead->authsize; in nitrox_aes_gcm_dec()
379 unsigned int authsize) in nitrox_rfc4106_setauthsize() argument
[all …]
/drivers/crypto/qce/
Daead.c74 totallen, ctx->authsize, 1); in qce_aead_done()
77 totallen, ctx->authsize, 1); in qce_aead_done()
80 totallen = req->cryptlen + req->assoclen - ctx->authsize; in qce_aead_done()
81 scatterwalk_map_and_copy(tag, req->src, totallen, ctx->authsize, 0); in qce_aead_done()
82 ret = memcmp(result_buf->auth_iv, tag, ctx->authsize); in qce_aead_done()
198 cryptlen = rctx->cryptlen + ctx->authsize; in qce_aead_ccm_prepare_buf_assoclen()
344 cryptlen = rctx->cryptlen + ctx->authsize; in qce_aead_ccm_prepare_buf()
399 rctx->ccm_nonce[0] |= ((ctx->authsize - 2) / 2) << in qce_aead_create_ccm_nonce()
516 rctx->cryptlen = req->cryptlen - ctx->authsize; in qce_aead_crypt()
651 static int qce_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in qce_aead_setauthsize() argument
[all …]
Daead.h21 unsigned int authsize; member
/drivers/crypto/caam/
Dcaamalg.c118 unsigned int authsize; member
155 cnstr_shdsc_aead_null_encap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
174 cnstr_shdsc_aead_null_decap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc()
198 if (!ctx->authsize) in aead_set_sh_desc()
257 ctx->authsize, is_rfc3686, nonce, ctx1_iv_off, in aead_set_sh_desc()
279 ctx->authsize, alg->caam.geniv, is_rfc3686, in aead_set_sh_desc()
303 ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
313 unsigned int authsize) in aead_setauthsize() argument
317 ctx->authsize = authsize; in aead_setauthsize()
332 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
[all …]
Dcaamalg_qi.c68 unsigned int authsize; member
95 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
145 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
160 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
178 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
185 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
189 ctx->authsize = authsize; in aead_setauthsize()
307 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc()
323 ctx->authsize, true); in gcm_set_sh_desc()
338 ctx->authsize, true); in gcm_set_sh_desc()
[all …]
Dcaamalg_qi2.c87 unsigned int authsize; member
188 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc()
240 ivsize, ctx->authsize, is_rfc3686, in aead_set_sh_desc()
245 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc()
266 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc()
277 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument
281 ctx->authsize = authsize; in aead_setauthsize()
367 unsigned int authsize = ctx->authsize; in aead_edesc_alloc() local
381 dst_len = src_len + (encrypt ? authsize : (-authsize)); in aead_edesc_alloc()
426 (encrypt ? authsize : 0); in aead_edesc_alloc()
[all …]
/drivers/crypto/ccree/
Dcc_aead.c57 unsigned int authsize; /* Actual (reduced?) size of the MAC/ICv */ member
229 ctx->authsize) != 0) { in cc_aead_complete()
231 ctx->authsize, ctx->cipher_mode); in cc_aead_complete()
244 skip, (skip + ctx->authsize), in cc_aead_complete()
670 unsigned int authsize) in cc_aead_setauthsize() argument
676 if (authsize == 0 || in cc_aead_setauthsize()
677 authsize > crypto_aead_maxauthsize(authenc)) { in cc_aead_setauthsize()
681 ctx->authsize = authsize; in cc_aead_setauthsize()
682 dev_dbg(dev, "authlen=%d\n", ctx->authsize); in cc_aead_setauthsize()
688 unsigned int authsize) in cc_rfc4309_ccm_setauthsize() argument
[all …]
Dcc_buffer_mgr.c538 static bool cc_is_icv_frag(unsigned int sgl_nents, unsigned int authsize, in cc_is_icv_frag() argument
541 return ((sgl_nents > 1) && (last_entry_data_size < authsize)); in cc_is_icv_frag()
657 unsigned int authsize = areq_ctx->req_authsize; in cc_prepare_aead_data_dlli() local
665 offset = *src_last_bytes - authsize; in cc_prepare_aead_data_dlli()
668 offset = *dst_last_bytes - authsize; in cc_prepare_aead_data_dlli()
683 unsigned int authsize = areq_ctx->req_authsize; in cc_prepare_aead_data_mlli() local
695 cc_is_icv_frag(areq_ctx->src.nents, authsize, in cc_prepare_aead_data_mlli()
722 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli()
724 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli()
739 cc_is_icv_frag(areq_ctx->src.nents, authsize, in cc_prepare_aead_data_mlli()
[all …]
/drivers/crypto/
Domap-aes-gcm.c68 dd->authsize, 1); in omap_aes_gcm_done_task()
78 for (i = 0; i < dd->authsize; i++) { in omap_aes_gcm_done_task()
148 dd->authsize = authlen; in omap_aes_gcm_copy_buffers()
192 dd->authsize, 0); in omap_aes_gcm_dma_out_callback()
348 int omap_aes_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in omap_aes_gcm_setauthsize() argument
350 return crypto_gcm_check_authsize(authsize); in omap_aes_gcm_setauthsize()
354 unsigned int authsize) in omap_aes_4106gcm_setauthsize() argument
356 return crypto_rfc4106_check_authsize(authsize); in omap_aes_4106gcm_setauthsize()
Dixp4xx_crypto.c355 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac() local
356 int decryptlen = req->assoclen + req->cryptlen - authsize; in finish_scattered_hmac()
360 decryptlen, authsize, 1); in finish_scattered_hmac()
735 static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize, in setup_auth() argument
751 cfgword = algo->cfgword | (authsize << 6); /* (authsize/4) << 8 */ in setup_auth()
1093 unsigned int authsize = crypto_aead_authsize(tfm); in aead_perform() local
1116 cryptlen = req->cryptlen - authsize; in aead_perform()
1117 eff_cryptlen -= authsize; in aead_perform()
1144 if (lastlen >= authsize) in aead_perform()
1146 buf->buf_len - authsize; in aead_perform()
[all …]
Domap-aes.h181 size_t authsize; member
210 int omap_aes_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
214 unsigned int authsize);
Dtalitos.c994 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap() local
995 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp_unmap()
1005 cryptlen + authsize, areq->assoclen); in ipsec_esp_unmap()
1048 unsigned int authsize = crypto_aead_authsize(authenc); in ipsec_esp_decrypt_swauth_done() local
1059 icv = oicv - authsize; in ipsec_esp_decrypt_swauth_done()
1061 err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0; in ipsec_esp_decrypt_swauth_done()
1200 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp() local
1204 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp()
1215 dma_addr_t dma_icv = edesc->dma_link_tbl + edesc->dma_len - authsize; in ipsec_esp()
1252 elen = authsize; in ipsec_esp()
[all …]
Datmel-aes.c1553 u32 authsize; in atmel_aes_gcm_process() local
1556 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_process()
1557 ctx->textlen = req->cryptlen - (enc ? 0 : authsize); in atmel_aes_gcm_process()
1704 u32 offset, authsize, itag[4], *otag = ctx->tag; in atmel_aes_gcm_finalize() local
1714 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_finalize()
1716 scatterwalk_map_and_copy(otag, req->dst, offset, authsize, 1); in atmel_aes_gcm_finalize()
1719 scatterwalk_map_and_copy(itag, req->src, offset, authsize, 0); in atmel_aes_gcm_finalize()
1720 err = crypto_memneq(itag, otag, authsize) ? -EBADMSG : 0; in atmel_aes_gcm_finalize()
1759 unsigned int authsize) in atmel_aes_gcm_setauthsize() argument
1761 return crypto_gcm_check_authsize(authsize); in atmel_aes_gcm_setauthsize()
[all …]
Dsa2ul.c1357 unsigned int authsize; in sa_sha_dma_in_callback() local
1366 authsize = crypto_ahash_digestsize(tfm); in sa_sha_dma_in_callback()
1371 for (i = 0; i < (authsize / 4); i++) in sa_sha_dma_in_callback()
1696 unsigned int authsize; in sa_aead_dma_in_callback() local
1707 authsize = crypto_aead_authsize(tfm); in sa_aead_dma_in_callback()
1710 for (i = 0; i < (authsize / 4); i++) in sa_aead_dma_in_callback()
1714 scatterwalk_map_and_copy(&mdptr[4], req->dst, start, authsize, in sa_aead_dma_in_callback()
1717 start -= authsize; in sa_aead_dma_in_callback()
1718 scatterwalk_map_and_copy(auth_tag, req->src, start, authsize, in sa_aead_dma_in_callback()
1721 err = memcmp(&mdptr[4], auth_tag, authsize) ? -EBADMSG : 0; in sa_aead_dma_in_callback()
[all …]
/drivers/crypto/chelsio/
Dchcr_algo.c175 int authsize = crypto_aead_authsize(tfm); in chcr_verify_tag() local
182 cmp = crypto_memneq(&fw6_pld->data[2], (fw6_pld + 1), authsize); in chcr_verify_tag()
186 authsize, req->assoclen + in chcr_verify_tag()
187 req->cryptlen - authsize); in chcr_verify_tag()
188 cmp = crypto_memneq(temp, (fw6_pld + 1), authsize); in chcr_verify_tag()
2377 unsigned int authsize = crypto_aead_authsize(tfm); in chcr_aead_common_init() local
2383 if (reqctx->op && req->cryptlen < authsize) in chcr_aead_common_init()
2406 unsigned int authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in chcr_aead_need_fallback() local
2408 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
2449 unsigned int authsize = crypto_aead_authsize(tfm); in create_authenc_wr() local
[all …]
/drivers/crypto/xilinx/
Dzynqmp-aes-gcm.c68 u32 authsize; member
183 if (tfm_ctx->authsize != ZYNQMP_AES_AUTH_SIZE) in zynqmp_fallback_check()
271 unsigned int authsize) in zynqmp_aes_aead_setauthsize() argument
277 tfm_ctx->authsize = authsize; in zynqmp_aes_aead_setauthsize()
278 return crypto_aead_setauthsize(tfm_ctx->fbk_cipher, authsize); in zynqmp_aes_aead_setauthsize()
/drivers/crypto/hisilicon/sec2/
Dsec_crypto.c853 size_t authsize; in GEN_SEC_SETKEY_FUNC() local
869 authsize = crypto_aead_authsize(tfm); in GEN_SEC_SETKEY_FUNC()
870 mac_offset = qp_ctx->res[req_id].pbuf + copy_size - authsize; in GEN_SEC_SETKEY_FUNC()
871 memcpy(a_req->out_mac, mac_offset, authsize); in GEN_SEC_SETKEY_FUNC()
904 size_t authsize = crypto_aead_authsize(tfm); in sec_aead_mac_init() local
911 skip_size = aead_req->assoclen + aead_req->cryptlen - authsize; in sec_aead_mac_init()
913 authsize, skip_size); in sec_aead_mac_init()
914 if (unlikely(copy_size != authsize)) in sec_aead_mac_init()
1070 static int sec_aead_setauthsize(struct crypto_aead *aead, unsigned int authsize) in sec_aead_setauthsize() argument
1077 return crypto_aead_setauthsize(a_ctx->fallback_aead_tfm, authsize); in sec_aead_setauthsize()
[all …]
/drivers/crypto/marvell/octeontx/
Dotx_cptvf_algs.c620 unsigned int authsize) in otx_cpt_aead_set_authsize() argument
626 if (authsize != SHA1_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
627 authsize != SHA1_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
630 if (authsize == SHA1_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
635 if (authsize != SHA256_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
636 authsize != SHA256_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
639 if (authsize == SHA256_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
644 if (authsize != SHA384_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
645 authsize != SHA384_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
648 if (authsize == SHA384_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
[all …]
/drivers/crypto/stm32/
Dstm32-cryp.c141 size_t authsize; member
357 cryp->areq->cryptlen - cryp->authsize; in stm32_cryp_get_input_text_len()
481 b0[0] |= (8 * ((cryp->authsize - 2) / 2)); in stm32_cryp_ccm_init()
757 unsigned int authsize) in stm32_cryp_aes_gcm_setauthsize() argument
759 switch (authsize) { in stm32_cryp_aes_gcm_setauthsize()
776 unsigned int authsize) in stm32_cryp_aes_ccm_setauthsize() argument
778 switch (authsize) { in stm32_cryp_aes_ccm_setauthsize()
1018 cryp->authsize = 0; in stm32_cryp_prepare_req()
1038 cryp->authsize = crypto_aead_authsize(crypto_aead_reqtfm(areq)); in stm32_cryp_prepare_req()
1044 cryp->payload_in = areq->cryptlen - cryp->authsize; in stm32_cryp_prepare_req()
[all …]
/drivers/crypto/ccp/
Dccp-crypto-aes-galois.c58 unsigned int authsize) in ccp_aes_gcm_setauthsize() argument
60 switch (authsize) { in ccp_aes_gcm_setauthsize()
119 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
Dchcr_ipsec.c146 int authsize = x->aead->alg_icv_len / 8; in ch_ipsec_setauthsize() local
148 sa_entry->authsize = authsize; in ch_ipsec_setauthsize()
150 switch (authsize) { in ch_ipsec_setauthsize()
648 sa_entry->authsize, in ch_ipsec_crypto_wreq()
649 sa_entry->authsize); in ch_ipsec_crypto_wreq()
Dchcr_ipsec.h51 unsigned int authsize; member
/drivers/crypto/marvell/octeontx2/
Dotx2_cptvf_algs.c699 unsigned int authsize) in otx2_cpt_aead_gcm_set_authsize() argument
703 if (crypto_rfc4106_check_authsize(authsize)) in otx2_cpt_aead_gcm_set_authsize()
706 tfm->authsize = authsize; in otx2_cpt_aead_gcm_set_authsize()
709 ctx->fbk_cipher->authsize = authsize; in otx2_cpt_aead_gcm_set_authsize()
715 unsigned int authsize) in otx2_cpt_aead_set_authsize() argument
717 tfm->authsize = authsize; in otx2_cpt_aead_set_authsize()
723 unsigned int authsize) in otx2_cpt_aead_null_set_authsize() argument
728 tfm->authsize = authsize; in otx2_cpt_aead_null_set_authsize()
/drivers/crypto/axis/
Dartpec6_crypto.c2011 size_t authsize = crypto_aead_authsize(cipher); in artpec6_crypto_prepare_aead() local
2014 authsize); in artpec6_crypto_prepare_aead()
2018 if (authsize < AES_BLOCK_SIZE) { in artpec6_crypto_prepare_aead()
2019 count = AES_BLOCK_SIZE - authsize; in artpec6_crypto_prepare_aead()
2191 unsigned int authsize = crypto_aead_authsize(aead); in artpec6_crypto_complete_aead() local
2196 authsize, in artpec6_crypto_complete_aead()
2198 authsize); in artpec6_crypto_complete_aead()
2202 authsize)) { in artpec6_crypto_complete_aead()
2205 input_tag, authsize, true); in artpec6_crypto_complete_aead()
2208 authsize, true); in artpec6_crypto_complete_aead()

12