/crypto/ |
D | authencesn.c | 50 unsigned int authsize) in crypto_authenc_esn_setauthsize() argument 52 if (authsize > 0 && authsize < 4) in crypto_authenc_esn_setauthsize() 95 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv_tail() local 106 scatterwalk_map_and_copy(hash, dst, assoclen + cryptlen, authsize, 1); in crypto_authenc_esn_genicv_tail() 129 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_genicv() local 135 if (!authsize) in crypto_authenc_esn_genicv() 223 unsigned int authsize = crypto_aead_authsize(authenc_esn); in crypto_authenc_esn_decrypt_tail() local 231 unsigned int cryptlen = req->cryptlen - authsize; in crypto_authenc_esn_decrypt_tail() 237 if (!authsize) in crypto_authenc_esn_decrypt_tail() 245 if (crypto_memneq(ihash, ohash, authsize)) in crypto_authenc_esn_decrypt_tail() [all …]
|
D | aead.c | 64 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument 68 if ((!authsize && crypto_aead_maxauthsize(tfm)) || in crypto_aead_setauthsize() 69 authsize > crypto_aead_maxauthsize(tfm)) in crypto_aead_setauthsize() 73 err = crypto_aead_alg(tfm)->setauthsize(tfm, authsize); in crypto_aead_setauthsize() 78 tfm->authsize = authsize; in crypto_aead_setauthsize() 134 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
|
D | aegis128-core.c | 383 unsigned int authsize) in crypto_aegis128_setauthsize() argument 385 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_setauthsize() 387 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_setauthsize() 396 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_encrypt() local 419 authsize, 1); in crypto_aegis128_encrypt() 428 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_decrypt() local 429 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_decrypt() 435 authsize, 0); in crypto_aegis128_decrypt() 453 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; in crypto_aegis128_decrypt()
|
D | gcm.c | 147 unsigned int authsize) in crypto_gcm_setauthsize() argument 149 return crypto_gcm_check_authsize(authsize); in crypto_gcm_setauthsize() 471 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_verify() local 472 unsigned int cryptlen = req->cryptlen - authsize; in crypto_gcm_verify() 476 req->assoclen + cryptlen, authsize, 0); in crypto_gcm_verify() 477 return crypto_memneq(iauth_tag, auth_tag, authsize) ? -EBADMSG : 0; in crypto_gcm_verify() 506 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_decrypt() local 510 cryptlen -= authsize; in crypto_gcm_decrypt() 710 unsigned int authsize) in crypto_rfc4106_setauthsize() argument 715 err = crypto_rfc4106_check_authsize(authsize); in crypto_rfc4106_setauthsize() [all …]
|
D | ccm.c | 109 unsigned int authsize) in crypto_ccm_setauthsize() argument 111 switch (authsize) { in crypto_ccm_setauthsize() 329 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt_done() local 330 unsigned int cryptlen = req->cryptlen - authsize; in crypto_ccm_decrypt_done() 339 if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize)) in crypto_ccm_decrypt_done() 352 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt() local 359 cryptlen -= authsize; in crypto_ccm_decrypt() 366 authsize, 0); in crypto_ccm_decrypt() 387 if (crypto_memneq(authtag, odata, authsize)) in crypto_ccm_decrypt() 588 unsigned int authsize) in crypto_rfc4309_setauthsize() argument [all …]
|
D | authenc.c | 240 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() 259 req->cryptlen - authsize, req->iv); in crypto_authenc_decrypt_tail() 281 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt() local 296 req->assoclen + req->cryptlen - authsize); in crypto_authenc_decrypt()
|
D | geniv.c | 28 unsigned int authsize) in aead_geniv_setauthsize() argument 32 return crypto_aead_setauthsize(ctx->child, authsize); in aead_geniv_setauthsize()
|
D | tcrypt.c | 253 unsigned int tcount, u8 authsize, in test_mb_aead_speed() argument 292 ret = crypto_aead_setauthsize(tfm, authsize); in test_mb_aead_speed() 340 if (*b_size + authsize > XBUFSIZE * PAGE_SIZE) { in test_mb_aead_speed() 342 authsize + *b_size, in test_mb_aead_speed() 383 *b_size + (enc ? 0 : authsize), in test_mb_aead_speed() 387 *b_size + (enc ? authsize : 0), in test_mb_aead_speed() 410 (enc ? 0 : authsize), in test_mb_aead_speed() 521 unsigned int tcount, u8 authsize, in test_aead_speed() argument 611 ret = crypto_aead_setauthsize(tfm, authsize); in test_aead_speed() 630 sg_init_aead(sg, xbuf, *b_size + (enc ? 0 : authsize), in test_aead_speed() [all …]
|
D | pcrypt.c | 51 unsigned int authsize) in pcrypt_aead_setauthsize() argument 55 return crypto_aead_setauthsize(ctx->child, authsize); in pcrypt_aead_setauthsize()
|
D | testmgr.c | 1939 const unsigned int authsize = vec->clen - vec->plen; in test_aead_vec_cfg() local 1971 err = crypto_aead_setauthsize(tfm, authsize); in test_aead_vec_cfg() 2179 const unsigned int authsize = vec->clen - vec->plen; in mutate_aead_message() local 2189 flip_random_bit((u8 *)vec->ctext + vec->plen, authsize); in mutate_aead_message() 2210 const unsigned int authsize = vec->clen - vec->plen; in generate_aead_message() local 2211 const bool inauthentic = (authsize >= MIN_COLLISION_FREE_AUTHSIZE) && in generate_aead_message() 2279 unsigned int authsize; in generate_random_aead_testvec() local 2293 authsize = maxauthsize; in generate_random_aead_testvec() 2295 authsize = prandom_u32() % (maxauthsize + 1); in generate_random_aead_testvec() 2296 if (prefer_inauthentic && authsize < MIN_COLLISION_FREE_AUTHSIZE) in generate_random_aead_testvec() [all …]
|
D | simd.c | 302 static int simd_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in simd_aead_setauthsize() argument 307 return crypto_aead_setauthsize(child, authsize); in simd_aead_setauthsize()
|
D | algif_aead.c | 505 static int aead_setauthsize(void *private, unsigned int authsize) in aead_setauthsize() argument 509 return crypto_aead_setauthsize(tfm->aead, authsize); in aead_setauthsize()
|
D | essiv.c | 127 unsigned int authsize) in essiv_aead_setauthsize() argument 131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize()
|
D | chacha20poly1305.c | 492 unsigned int authsize) in chachapoly_setauthsize() argument 494 if (authsize != POLY1305_DIGEST_SIZE) in chachapoly_setauthsize()
|
D | cryptd.c | 706 unsigned int authsize) in cryptd_aead_setauthsize() argument 711 return crypto_aead_setauthsize(child, authsize); in cryptd_aead_setauthsize()
|