Home
last modified time | relevance | path

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

12

/linux/drivers/crypto/cavium/nitrox/
H A 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 …]
/linux/arch/arm64/crypto/
H A Dsm4-ce-ccm-glue.c45 static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in ccm_setauthsize() argument
47 if ((authsize & 1) || authsize < 4) in ccm_setauthsize()
221 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt() local
228 err = ccm_format_input(mac, req, req->cryptlen - authsize); in ccm_decrypt()
242 req->assoclen + req->cryptlen - authsize, in ccm_decrypt()
243 authsize, 0); in ccm_decrypt()
245 if (crypto_memneq(authtag, mac, authsize)) in ccm_decrypt()
H A Dsm4-ce-gcm-glue.c59 static int gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_setauthsize() argument
61 switch (authsize) { in gcm_setauthsize()
197 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local
210 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
211 authsize, 0); in gcm_decrypt()
213 if (crypto_memneq(authtag, ghash, authsize)) in gcm_decrypt()
/linux/include/crypto/
H A Daead.h142 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
156 unsigned int authsize; member
287 return tfm->authsize; in crypto_aead_authsize()
400 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
403 unsigned int authsize) in crypto_sync_aead_setauthsize() argument
405 return crypto_aead_setauthsize(&tfm->base, authsize); in crypto_sync_aead_setauthsize()
/linux/tools/testing/selftests/bpf/progs/
H A Dcrypto_bench.c23 u32 key_len, authsize; in crypto_setup()
45 params.authsize = authsize; in crypto_setup()
15 u32 key_len, authsize; global() variable
H A Dcrypto_sanity.c23 u32 authsize, key_len; in skb_dynptr_validate()
76 params.authsize = authsize; in skb_crypto_setup()
15 u32 authsize, key_len; global() variable
/linux/drivers/crypto/ccree/
H A 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 …]
/linux/crypto/
H A Daegis128-neon.c55 unsigned int authsize) in crypto_aegis128_final_simd() argument
59 cryptlen, authsize); in crypto_aegis128_final_simd()
H A Dauthenc.c239 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt_tail() local
241 u8 *ihash = ahreq->result + authsize; in crypto_authenc_decrypt_tail()
244 scatterwalk_map_and_copy(ihash, req->src, ahreq->nbytes, authsize, 0); in crypto_authenc_decrypt_tail()
246 if (crypto_memneq(ihash, ahreq->result, authsize)) in crypto_authenc_decrypt_tail()
261 req->cryptlen - authsize, req->iv); in crypto_authenc_decrypt_tail()
281 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt() local
293 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
H A Dccm.c106 unsigned int authsize) in crypto_ccm_setauthsize() argument
108 switch (authsize) { in crypto_ccm_setauthsize()
325 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt_done() local
326 unsigned int cryptlen = req->cryptlen - authsize; in crypto_ccm_decrypt_done()
335 if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize)) in crypto_ccm_decrypt_done()
348 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt() local
355 cryptlen -= authsize; in crypto_ccm_decrypt()
362 authsize, 0); in crypto_ccm_decrypt()
383 if (crypto_memneq(authtag, odata, authsize)) in crypto_ccm_decrypt()
582 unsigned int authsize) in crypto_rfc4309_setauthsize() argument
[all …]
H A Daegis-neon.h15 unsigned int authsize);
/linux/drivers/crypto/starfive/
H A Djh7110-aes.c209 b0[0] |= (8 * ((cryp->authsize - 2) / 2)); in starfive_aes_ccm_init()
314 cryp->total_in, cryp->authsize, 1); in starfive_aes_read_authtag()
316 if (crypto_memneq(cryp->tag_in, cryp->tag_out, cryp->authsize)) in starfive_aes_read_authtag()
328 if (!err && cryp->authsize) in starfive_aes_finish_req()
335 if (cryp->authsize) in starfive_aes_finish_req()
579 cryp->authsize = 0; in starfive_aes_do_one_req()
647 cryp->authsize = crypto_aead_authsize(crypto_aead_reqtfm(req)); in starfive_aes_aead_do_one_req()
659 cryp->total_in = req->cryptlen - cryp->authsize; in starfive_aes_aead_do_one_req()
663 cryp->authsize, 0); in starfive_aes_aead_do_one_req()
894 unsigned int authsize) in starfive_aes_gcm_setauthsize() argument
[all …]
/linux/drivers/crypto/tegra/
H A Dtegra-se-aes.c61 unsigned int authsize; member
822 offset, rctx->authsize, 1); in tegra_gcm_do_final()
834 scatterwalk_map_and_copy(mac, rctx->src_sg, offset, rctx->authsize, 0); in tegra_gcm_do_verify()
836 if (crypto_memneq(rctx->outbuf.buf, mac, rctx->authsize)) in tegra_gcm_do_verify()
977 t = rctx->authsize; in tegra_ccm_format_nonce()
1065 memcpy(rctx->authdata, result, rctx->authsize); in tegra_ccm_mac_result()
1067 ret = crypto_memneq(rctx->authdata, result, rctx->authsize); in tegra_ccm_mac_result()
1084 rctx->authsize, 1); in tegra_ccm_ctr_result()
1086 memcpy(rctx->authdata, rctx->outbuf.buf, rctx->authsize); in tegra_ccm_ctr_result()
1132 memcpy(rctx->inbuf.buf, rctx->authdata, rctx->authsize); in tegra_ccm_do_ctr()
[all …]
/linux/kernel/bpf/
H A Dcrypto.c36 u32 authsize; member
169 if (!!params->authsize ^ !!type->setauthsize) { in bpf_crypto_ctx_create()
192 if (params->authsize) { in bpf_crypto_ctx_create()
193 *err = type->setauthsize(ctx->tfm, params->authsize); in bpf_crypto_ctx_create()
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_algs.c632 unsigned int authsize) in otx_cpt_aead_set_authsize() argument
638 if (authsize != SHA1_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
639 authsize != SHA1_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
642 if (authsize == SHA1_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
647 if (authsize != SHA256_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
648 authsize != SHA256_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
651 if (authsize == SHA256_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
656 if (authsize != SHA384_DIGEST_SIZE && in otx_cpt_aead_set_authsize()
657 authsize != SHA384_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
660 if (authsize == SHA384_TRUNC_DIGEST_SIZE) in otx_cpt_aead_set_authsize()
[all …]
/linux/drivers/crypto/
H A Dtalitos.c1069 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp_unmap() local
1070 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp_unmap()
1080 cryptlen + authsize, areq->assoclen); in ipsec_esp_unmap()
1123 unsigned int authsize = crypto_aead_authsize(authenc); in ipsec_esp_decrypt_swauth_done() local
1134 icv = oicv - authsize; in ipsec_esp_decrypt_swauth_done()
1136 err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0; in ipsec_esp_decrypt_swauth_done()
1275 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp() local
1279 unsigned int cryptlen = areq->cryptlen - (encrypt ? 0 : authsize); in ipsec_esp()
1290 dma_addr_t dma_icv = edesc->dma_link_tbl + edesc->dma_len - authsize; in ipsec_esp()
1327 elen = authsize; in ipsec_esp()
[all …]
H A Datmel-aes.c1349 u32 authsize; in atmel_aes_gcm_process() local
1352 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_process()
1353 ctx->textlen = req->cryptlen - (enc ? 0 : authsize); in atmel_aes_gcm_process()
1500 u32 offset, authsize, itag[4], *otag = ctx->tag; in atmel_aes_gcm_finalize() local
1510 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_finalize()
1512 scatterwalk_map_and_copy(otag, req->dst, offset, authsize, 1); in atmel_aes_gcm_finalize()
1515 scatterwalk_map_and_copy(itag, req->src, offset, authsize, 0); in atmel_aes_gcm_finalize()
1516 err = crypto_memneq(itag, otag, authsize) ? -EBADMSG : 0; in atmel_aes_gcm_finalize()
1555 unsigned int authsize) in atmel_aes_gcm_setauthsize() argument
1557 return crypto_gcm_check_authsize(authsize); in atmel_aes_gcm_setauthsize()
[all …]
/linux/fs/afs/
H A Dcm_security.c189 size_t keysize, uuidsize, authsize, toksize, encsize, contsize, adatasize, offset; in afs_create_yfs_cm_token() local
226 authsize = 4 + xdr_len_object(uuidsize) + xdr_len_object(0); in afs_create_yfs_cm_token()
238 toksize = keysize + 8 + 4 + 4 + 8 + xdr_len_object(authsize); in afs_create_yfs_cm_token()
/linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
H A 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()
647 sa_entry->authsize, in ch_ipsec_crypto_wreq()
648 sa_entry->authsize); in ch_ipsec_crypto_wreq()
H A Dchcr_ipsec.h50 unsigned int authsize; member
/linux/drivers/crypto/xilinx/
H A Dzynqmp-aes-gcm.c78 u32 authsize; member
381 if (tfm_ctx->authsize != XILINX_AES_AUTH_SIZE && rq_ctx->op == XILINX_AES_DECRYPT) in zynqmp_fallback_check()
406 if (tfm_ctx->authsize != XILINX_AES_AUTH_SIZE && rq_ctx->op == XILINX_AES_DECRYPT) in versal_fallback_check()
573 unsigned int authsize) in xilinx_aes_aead_setauthsize() argument
578 tfm_ctx->authsize = authsize; in xilinx_aes_aead_setauthsize()
579 return tfm_ctx->fbk_cipher ? crypto_aead_setauthsize(tfm_ctx->fbk_cipher, authsize) : 0; in xilinx_aes_aead_setauthsize()
/linux/include/linux/
H A Dbpf_crypto.h11 int (*setauthsize)(void *tfm, unsigned int authsize);
/linux/drivers/crypto/qce/
H A Daead.h21 unsigned int authsize; member
/linux/drivers/crypto/ccp/
H A Dccp-ops.c647 unsigned int authsize; in ccp_run_aes_gcm_cmd() local
674 authsize = aes->authsize ? aes->authsize : AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
675 switch (authsize) { in ccp_run_aes_gcm_cmd()
702 ilen = aes->src_len - authsize; in ccp_run_aes_gcm_cmd()
883 ccp_get_dm_area(&wa->final, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
886 ret = ccp_init_dm_workarea(&wa->tag, cmd_q, authsize, in ccp_run_aes_gcm_cmd()
890 ret = ccp_set_dm_area(&wa->tag, 0, p_tag, 0, authsize); in ccp_run_aes_gcm_cmd()
897 authsize) ? -EBADMSG : 0; in ccp_run_aes_gcm_cmd()
/linux/tools/testing/selftests/bpf/benchs/
H A Dbench_bpf_crypto.c102 ctx.skel->bss->authsize = 0; in crypto_setup()

12