| /linux/include/crypto/ |
| H A D | gcm.h | 16 static inline int crypto_gcm_check_authsize(unsigned int authsize) in crypto_gcm_check_authsize() argument 18 switch (authsize) { in crypto_gcm_check_authsize() 37 static inline int crypto_rfc4106_check_authsize(unsigned int authsize) in crypto_rfc4106_check_authsize() argument 39 switch (authsize) { in crypto_rfc4106_check_authsize() 70 unsigned int authsize; member 74 unsigned int keysize, unsigned int authsize);
|
| H A D | aead.h | 142 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/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_aead.c | 59 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 D | sm4-ce-ccm-glue.c | 45 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 D | aes-ce-ccm-glue.c | 56 static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in ccm_setauthsize() argument 58 if ((authsize & 1) || authsize < 4) in ccm_setauthsize() 235 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt() local 239 u32 len = req->cryptlen - authsize; in ccm_decrypt() 291 req->assoclen + req->cryptlen - authsize, in ccm_decrypt() 292 authsize, 0); in ccm_decrypt() 294 if (crypto_memneq(mac, orig_iv, authsize)) in ccm_decrypt()
|
| H A D | sm4-ce-gcm-glue.c | 59 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()
|
| H A D | ghash-ce-glue.c | 60 const u8 tag[], u64 authsize); 233 static int gcm_aes_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_aes_setauthsize() argument 235 return crypto_gcm_check_authsize(authsize); in gcm_aes_setauthsize() 361 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 373 lengths.b = cpu_to_be64((req->cryptlen - authsize) * 8); in gcm_decrypt() 381 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 382 authsize, 0); in gcm_decrypt() 405 nrounds, tag, otag, authsize); in gcm_decrypt() 454 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 456 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|
| /linux/crypto/ |
| H A D | aead.c | 65 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument 69 if ((!authsize && crypto_aead_maxauthsize(tfm)) || in crypto_aead_setauthsize() 70 authsize > crypto_aead_maxauthsize(tfm)) in crypto_aead_setauthsize() 74 err = crypto_aead_alg(tfm)->setauthsize(tfm, authsize); in crypto_aead_setauthsize() 79 tfm->authsize = authsize; in crypto_aead_setauthsize() 125 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
|
| H A D | authenc.c | 239 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 D | aegis128-neon.c | 55 unsigned int authsize) in crypto_aegis128_final_simd() argument 59 cryptlen, authsize); in crypto_aegis128_final_simd()
|
| H A D | aegis128-neon-inner.c | 320 unsigned int authsize) in crypto_aegis128_final_neon() argument 336 if (authsize > 0) { in crypto_aegis128_final_neon() 338 vld1q_u8(permute + authsize)); in crypto_aegis128_final_neon()
|
| H A D | aegis-neon.h | 15 unsigned int authsize);
|
| /linux/drivers/crypto/caam/ |
| H A D | caamalg_qi.c | 73 unsigned int authsize; member 100 if (!ctx->cdata.keylen || !ctx->authsize) in aead_set_sh_desc() 150 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc() 165 ivsize, ctx->authsize, alg->caam.geniv, in aead_set_sh_desc() 183 ivsize, ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc() 190 static int aead_setauthsize(struct crypto_aead *authenc, unsigned int authsize) in aead_setauthsize() argument 194 ctx->authsize = authsize; in aead_setauthsize() 312 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc() 328 ctx->authsize, true); in gcm_set_sh_desc() 343 ctx->authsize, true); in gcm_set_sh_desc() [all …]
|
| H A D | caamalg.c | 131 unsigned int authsize; member 169 cnstr_shdsc_aead_null_encap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc() 188 cnstr_shdsc_aead_null_decap(desc, &ctx->adata, ctx->authsize, in aead_null_set_sh_desc() 213 if (!ctx->authsize) in aead_set_sh_desc() 272 ctx->authsize, is_rfc3686, nonce, ctx1_iv_off, in aead_set_sh_desc() 294 ctx->authsize, alg->caam.geniv, is_rfc3686, in aead_set_sh_desc() 318 ctx->authsize, is_rfc3686, nonce, in aead_set_sh_desc() 328 unsigned int authsize) in aead_setauthsize() argument 332 ctx->authsize = authsize; in aead_setauthsize() 347 if (!ctx->cdata.keylen || !ctx->authsize) in gcm_set_sh_desc() [all …]
|
| /linux/drivers/crypto/ccree/ |
| H A D | cc_buffer_mgr.c | 538 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/tools/testing/selftests/bpf/progs/ |
| H A D | crypto_bench.c | 15 u32 key_len, authsize; variable 28 .authsize = authsize, in crypto_setup()
|
| H A D | crypto_sanity.c | 15 u32 authsize, key_len; variable 59 .authsize = authsize, in skb_crypto_setup()
|
| /linux/lib/crypto/ |
| H A D | aesgcm.c | 46 unsigned int keysize, unsigned int authsize) in aesgcm_expandkey() argument 51 ret = crypto_gcm_check_authsize(authsize) ?: in aesgcm_expandkey() 56 ctx->authsize = authsize; in aesgcm_expandkey() 101 crypto_xor_cpy(authtag, buf, (u8 *)&ghash, ctx->authsize); in aesgcm_mac() 188 if (crypto_memneq(authtag, tagbuf, ctx->authsize)) { in aesgcm_decrypt()
|
| /linux/drivers/crypto/tegra/ |
| H A D | tegra-se-aes.c | 47 unsigned int authsize; member 61 unsigned int authsize; member 819 offset, rctx->authsize, 1); in tegra_gcm_do_final() 831 scatterwalk_map_and_copy(mac, rctx->src_sg, offset, rctx->authsize, 0); in tegra_gcm_do_verify() 833 if (crypto_memneq(rctx->outbuf.buf, mac, rctx->authsize)) in tegra_gcm_do_verify() 974 t = rctx->authsize; in tegra_ccm_format_nonce() 1062 memcpy(rctx->authdata, result, rctx->authsize); in tegra_ccm_mac_result() 1064 ret = crypto_memneq(rctx->authdata, result, rctx->authsize); in tegra_ccm_mac_result() 1081 rctx->authsize, 1); in tegra_ccm_ctr_result() 1083 memcpy(rctx->authdata, rctx->outbuf.buf, rctx->authsize); in tegra_ccm_ctr_result() [all …]
|
| /linux/drivers/crypto/marvell/octeontx/ |
| H A D | otx_cptvf_algs.c | 632 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/kernel/bpf/ |
| H A D | crypto.c | 36 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/ccp/ |
| H A D | ccp-crypto-aes-galois.c | 58 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()
|
| /linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/ |
| H A D | chcr_ipsec.c | 146 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 D | chcr_ipsec.h | 50 unsigned int authsize; member
|
| /linux/include/linux/ |
| H A D | bpf_crypto.h | 11 int (*setauthsize)(void *tfm, unsigned int authsize);
|