| /linux-6.15/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 255 return tfm->authsize; in crypto_aead_authsize() 332 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
|
| /linux-6.15/drivers/crypto/nx/ |
| H A D | nx-aes-ccm.c | 70 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() 136 unsigned int l, lp, m = authsize; in generate_b0() 156 unsigned int authsize, in generate_pat() argument 208 rc = generate_b0(iv, assoclen, authsize, nbytes, b0); in generate_pat() 339 nbytes -= authsize; in ccm_nx_decrypt() 343 authsize); in ccm_nx_decrypt() 395 authsize) ? -EBADMSG : 0; in ccm_nx_decrypt() [all …]
|
| /linux-6.15/arch/x86/crypto/ |
| H A D | aegis128-aesni-glue.c | 160 unsigned int authsize) in crypto_aegis128_aesni_setauthsize() argument 162 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize() 164 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize() 198 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_encrypt() local 204 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt() 214 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_decrypt() local 215 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_aesni_decrypt() 218 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt() 222 return crypto_memneq(tag.bytes, zeros.bytes, authsize) ? -EBADMSG : 0; in crypto_aegis128_aesni_decrypt()
|
| /linux-6.15/crypto/ |
| H A D | authencesn.c | 50 unsigned int authsize) in crypto_authenc_esn_setauthsize() argument 52 if (authsize > 0 && authsize < 4) in crypto_authenc_esn_setauthsize() 92 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv_tail() local 124 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv() local 130 if (!authsize) in crypto_authenc_esn_genicv() 224 unsigned int cryptlen = req->cryptlen - authsize; in crypto_authenc_esn_decrypt_tail() 230 if (!authsize) in crypto_authenc_esn_decrypt_tail() 238 if (crypto_memneq(ihash, ohash, authsize)) in crypto_authenc_esn_decrypt_tail() 278 cryptlen -= authsize; in crypto_authenc_esn_decrypt() 287 authsize, 0); in crypto_authenc_esn_decrypt() [all …]
|
| H A D | aegis128-core.c | 377 unsigned int authsize) in crypto_aegis128_setauthsize() argument 379 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_setauthsize() 381 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_setauthsize() 390 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_encrypt_generic() local 404 authsize, 1); in crypto_aegis128_encrypt_generic() 414 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt_generic() 420 authsize, 0); in crypto_aegis128_decrypt_generic() 468 authsize, 1); in crypto_aegis128_encrypt_simd() 477 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt_simd() 486 authsize, 0); in crypto_aegis128_decrypt_simd() [all …]
|
| 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() 124 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
|
| H A D | gcm.c | 147 unsigned int authsize) in crypto_gcm_setauthsize() argument 149 return crypto_gcm_check_authsize(authsize); in crypto_gcm_setauthsize() 470 unsigned int cryptlen = req->cryptlen - authsize; in crypto_gcm_verify() 474 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify() 508 cryptlen -= authsize; in crypto_gcm_decrypt() 706 unsigned int authsize) in crypto_rfc4106_setauthsize() argument 711 err = crypto_rfc4106_check_authsize(authsize); in crypto_rfc4106_setauthsize() 914 unsigned int authsize) in crypto_rfc4543_setauthsize() argument 918 if (authsize != 16) in crypto_rfc4543_setauthsize() 948 enc ? 0 : authsize, iv); in crypto_rfc4543_crypt() [all …]
|
| H A D | krb5enc.c | 252 unsigned int authsize = crypto_aead_authsize(krb5enc); in krb5enc_verify_hash() local 254 u8 *msg_hash = areq_ctx->tail + authsize; in krb5enc_verify_hash() 256 scatterwalk_map_and_copy(msg_hash, req->src, ahreq->nbytes, authsize, 0); in krb5enc_verify_hash() 258 if (crypto_memneq(msg_hash, calc_hash, authsize)) in krb5enc_verify_hash() 286 unsigned int authsize = crypto_aead_authsize(krb5enc); in krb5enc_dispatch_decrypt_hash() local 292 req->assoclen + req->cryptlen - authsize); in krb5enc_dispatch_decrypt_hash() 315 unsigned int authsize = crypto_aead_authsize(krb5enc); in krb5enc_dispatch_decrypt() local 328 req->cryptlen - authsize, req->iv); in krb5enc_dispatch_decrypt()
|
| /linux-6.15/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() 264 rctx->dstlen = rctx->srclen - aead->authsize; in nitrox_aes_gcm_dec() 379 unsigned int authsize) in nitrox_rfc4106_setauthsize() argument 381 switch (authsize) { in nitrox_rfc4106_setauthsize() [all …]
|
| /linux-6.15/arch/arm64/crypto/ |
| H A D | sm4-ce-ccm-glue.c | 46 static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in ccm_setauthsize() argument 48 if ((authsize & 1) || authsize < 4) in ccm_setauthsize() 238 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt() local 245 err = ccm_format_input(mac, req, req->cryptlen - authsize); in ccm_decrypt() 259 req->assoclen + req->cryptlen - authsize, in ccm_decrypt() 260 authsize, 0); in ccm_decrypt() 262 if (crypto_memneq(authtag, mac, authsize)) in ccm_decrypt()
|
| H A D | aes-ce-ccm-glue.c | 55 static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in ccm_setauthsize() argument 57 if ((authsize & 1) || authsize < 4) in ccm_setauthsize() 239 unsigned int authsize = crypto_aead_authsize(aead); in ccm_decrypt() local 243 u32 len = req->cryptlen - authsize; in ccm_decrypt() 297 req->assoclen + req->cryptlen - authsize, in ccm_decrypt() 298 authsize, 0); in ccm_decrypt() 300 if (crypto_memneq(mac, orig_iv, authsize)) in ccm_decrypt()
|
| H A D | sm4-ce-gcm-glue.c | 61 static int gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_setauthsize() argument 63 switch (authsize) { in gcm_setauthsize() 215 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 228 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 229 authsize, 0); in gcm_decrypt() 231 if (crypto_memneq(authtag, ghash, authsize)) in gcm_decrypt()
|
| H A D | ghash-ce-glue.c | 64 const u8 tag[], u64 authsize); 264 static int gcm_aes_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_aes_setauthsize() argument 266 return crypto_gcm_check_authsize(authsize); in gcm_aes_setauthsize() 393 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 405 lengths.b = cpu_to_be64((req->cryptlen - authsize) * 8); in gcm_decrypt() 413 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 414 authsize, 0); in gcm_decrypt() 436 nrounds, tag, otag, authsize); in gcm_decrypt() 486 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 488 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|
| /linux-6.15/drivers/crypto/qce/ |
| H A D | aead.c | 74 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() 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() 657 if (authsize < 4 || authsize > 16 || authsize % 2) in qce_aead_setauthsize() 659 if (IS_CCM_RFC4309(flags) && (authsize < 8 || authsize % 4)) in qce_aead_setauthsize() [all …]
|
| /linux-6.15/drivers/crypto/inside-secure/eip93/ |
| H A D | eip93-common.c | 206 u32 authsize = rctx->authsize; in check_valid_request() local 220 if (authsize) { in check_valid_request() 222 totlen_dst += authsize; in check_valid_request() 224 totlen_src += authsize; in check_valid_request() 249 if (authsize) { in check_valid_request() 644 u32 authsize = rctx->authsize; in eip93_unmap_dma() local 667 authsize = 0; in eip93_unmap_dma() 669 if (authsize) { in eip93_unmap_dma() 672 for (i = 0; i < (authsize / 4); i++) in eip93_unmap_dma() 679 sg_virt(rctx->sg_dst), len + authsize); in eip93_unmap_dma() [all …]
|
| /linux-6.15/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-6.15/drivers/crypto/ |
| H A D | omap-aes-gcm.c | 71 dd->authsize, 1); in omap_aes_gcm_done_task() 81 for (i = 0; i < dd->authsize; i++) { in omap_aes_gcm_done_task() 151 dd->authsize = authlen; in omap_aes_gcm_copy_buffers() 195 dd->authsize, 0); in omap_aes_gcm_dma_out_callback() 349 int omap_aes_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in omap_aes_gcm_setauthsize() argument 351 return crypto_gcm_check_authsize(authsize); in omap_aes_gcm_setauthsize() 355 unsigned int authsize) in omap_aes_4106gcm_setauthsize() argument 357 return crypto_rfc4106_check_authsize(authsize); in omap_aes_4106gcm_setauthsize()
|
| /linux-6.15/drivers/crypto/caam/ |
| H A D | caamalg_qi.c | 73 unsigned int authsize; member 194 ctx->authsize = authsize; in aead_setauthsize() 357 ctx->authsize = authsize; in gcm_setauthsize() 432 ctx->authsize, true); in rfc4106_set_sh_desc() 446 ctx->authsize, true); in rfc4106_set_sh_desc() 461 ctx->authsize = authsize; in rfc4106_setauthsize() 564 if (authsize != 16) in rfc4543_setauthsize() 567 ctx->authsize = authsize; in rfc4543_setauthsize() 956 unsigned int authsize = ctx->authsize; in aead_edesc_alloc() local 994 dst_len = src_len + (encrypt ? authsize : (-authsize)); in aead_edesc_alloc() [all …]
|
| H A D | caamalg.c | 126 unsigned int authsize; member 207 if (!ctx->authsize) in aead_set_sh_desc() 326 ctx->authsize = authsize; in aead_setauthsize() 391 ctx->authsize = authsize; in gcm_setauthsize() 459 ctx->authsize = authsize; in rfc4106_setauthsize() 522 if (authsize != 16) in rfc4543_setauthsize() 525 ctx->authsize = authsize; in rfc4543_setauthsize() 564 ctx->authsize = authsize; in chachapoly_setauthsize() 1077 int authsize = ctx->authsize; in init_aead_job() local 1319 unsigned int authsize = ctx->authsize; in aead_edesc_alloc() local [all …]
|
| /linux-6.15/drivers/crypto/ccree/ |
| H A D | cc_aead.c | 229 ctx->authsize) != 0) { in cc_aead_complete() 670 unsigned int authsize) in cc_aead_setauthsize() argument 676 if (authsize == 0 || in cc_aead_setauthsize() 681 ctx->authsize = authsize; in cc_aead_setauthsize() 690 switch (authsize) { in cc_rfc4309_ccm_setauthsize() 703 unsigned int authsize) in cc_ccm_setauthsize() argument 705 switch (authsize) { in cc_ccm_setauthsize() 1521 ctx->authsize, NS_BIT); in cc_ccm() 2144 switch (authsize) { in cc_gcm_setauthsize() 2168 switch (authsize) { in cc_rfc4106_gcm_setauthsize() [all …]
|
| H A D | cc_buffer_mgr.c | 722 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli() 724 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli() 754 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli() 756 (*src_last_bytes - authsize); in cc_prepare_aead_data_mlli() 778 (*dst_last_bytes - authsize); in cc_prepare_aead_data_mlli() 780 (*dst_last_bytes - authsize); in cc_prepare_aead_data_mlli() 816 authsize : 0; in cc_aead_chain_data() 844 size_for_map += authsize; in cc_aead_chain_data() 846 size_for_map -= authsize; in cc_aead_chain_data() 975 (req->cryptlen - authsize); in cc_map_aead_request() [all …]
|
| /linux-6.15/lib/crypto/ |
| H A D | aesgcm.c | 47 unsigned int keysize, unsigned int authsize) in aesgcm_expandkey() argument 52 ret = crypto_gcm_check_authsize(authsize) ?: in aesgcm_expandkey() 57 ctx->authsize = authsize; in aesgcm_expandkey() 102 crypto_xor_cpy(authtag, buf, (u8 *)&ghash, ctx->authsize); in aesgcm_mac() 189 if (crypto_memneq(authtag, tagbuf, ctx->authsize)) { in aesgcm_decrypt()
|
| /linux-6.15/arch/arm/crypto/ |
| H A D | ghash-ce-glue.c | 205 const char *otag, int authsize); 241 static int gcm_aes_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_aes_setauthsize() argument 243 return crypto_gcm_check_authsize(authsize); in gcm_aes_setauthsize() 401 int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 416 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 417 authsize, 0); in gcm_decrypt() 456 lengths.b = cpu_to_be64((req->cryptlen - authsize) * 8); in gcm_decrypt() 465 ctx->rounds, counter, otag, authsize); in gcm_decrypt() 505 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 507 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|