Home
last modified time | relevance | path

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

/crypto/
Dgcm.c250 unsigned int authsize) in crypto_gcm_setauthsize() argument
252 switch (authsize) { in crypto_gcm_setauthsize()
356 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_verify() local
357 unsigned int cryptlen = req->cryptlen - authsize; in crypto_gcm_verify()
361 authsize = crypto_aead_authsize(aead); in crypto_gcm_verify()
362 scatterwalk_map_and_copy(iauth_tag, req->src, cryptlen, authsize, 0); in crypto_gcm_verify()
363 return memcmp(iauth_tag, auth_tag, authsize) ? -EBADMSG : 0; in crypto_gcm_verify()
383 unsigned int authsize = crypto_aead_authsize(aead); in crypto_gcm_decrypt() local
386 if (cryptlen < authsize) in crypto_gcm_decrypt()
388 cryptlen -= authsize; in crypto_gcm_decrypt()
[all …]
Daead.c59 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument
64 if (authsize > crypto_aead_alg(tfm)->maxauthsize) in crypto_aead_setauthsize()
68 err = crypto_aead_alg(tfm)->setauthsize(crt->base, authsize); in crypto_aead_setauthsize()
73 crypto_aead_crt(crt->base)->authsize = authsize; in crypto_aead_setauthsize()
74 crt->authsize = authsize; in crypto_aead_setauthsize()
106 crt->authsize = alg->maxauthsize; in crypto_init_aead_ops()
162 crt->authsize = alg->maxauthsize; in crypto_init_nivaead_ops()
Dccm.c105 unsigned int authsize) in crypto_ccm_setauthsize() argument
107 switch (authsize) { in crypto_ccm_setauthsize()
361 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt_done() local
362 unsigned int cryptlen = req->cryptlen - authsize; in crypto_ccm_decrypt_done()
366 if (!err && memcmp(pctx->auth_tag, pctx->odata, authsize)) in crypto_ccm_decrypt_done()
379 unsigned int authsize = crypto_aead_authsize(aead); in crypto_ccm_decrypt() local
386 if (cryptlen < authsize) in crypto_ccm_decrypt()
388 cryptlen -= authsize; in crypto_ccm_decrypt()
396 scatterwalk_map_and_copy(authtag, req->src, cryptlen, authsize, 0); in crypto_ccm_decrypt()
425 if (memcmp(authtag, odata, authsize)) in crypto_ccm_decrypt()
[all …]
Dauthenc.c265 unsigned int authsize; in crypto_authenc_verify() local
272 authsize = crypto_aead_authsize(authenc); in crypto_authenc_verify()
273 ihash = ohash + authsize; in crypto_authenc_verify()
274 scatterwalk_map_and_copy(ihash, cipher, cryptlen, authsize, 0); in crypto_authenc_verify()
275 return memcmp(ihash, ohash, authsize) ? -EBADMSG: 0; in crypto_authenc_verify()
307 unsigned int authsize = crypto_aead_authsize(authenc); in crypto_authenc_decrypt() local
311 if (cryptlen < authsize) in crypto_authenc_decrypt()
313 cryptlen -= authsize; in crypto_authenc_decrypt()
Dtestmgr.c276 unsigned int authsize; in test_aead() local
333 authsize = abs(template[i].rlen - template[i].ilen); in test_aead()
334 ret = crypto_aead_setauthsize(tfm, authsize); in test_aead()
338 authsize, j, algo); in test_aead()
343 template[i].ilen + (enc ? authsize : 0)); in test_aead()
409 authsize = abs(template[i].rlen - template[i].ilen); in test_aead()
426 n += authsize; in test_aead()
434 ret = crypto_aead_setauthsize(tfm, authsize); in test_aead()
438 "%s\n", authsize, j, algo); in test_aead()
444 sg[k - 1].length + authsize > in test_aead()
[all …]