| /arch/x86/crypto/ |
| A D | aegis128-aesni-glue.c | 167 unsigned int authsize) in crypto_aegis128_aesni_setauthsize() argument 169 if (authsize > AEGIS128_MAX_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize() 171 if (authsize < AEGIS128_MIN_AUTH_SIZE) in crypto_aegis128_aesni_setauthsize() 209 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_encrypt() local 218 req->assoclen + cryptlen, authsize, 1); in crypto_aegis128_aesni_encrypt() 228 unsigned int authsize = crypto_aead_authsize(tfm); in crypto_aegis128_aesni_decrypt() local 229 unsigned int cryptlen = req->cryptlen - authsize; in crypto_aegis128_aesni_decrypt() 233 req->assoclen + cryptlen, authsize, 0); in crypto_aegis128_aesni_decrypt() 239 return crypto_memneq(tag.bytes, zeros.bytes, authsize) ? -EBADMSG : 0; in crypto_aegis128_aesni_decrypt()
|
| A D | aesni-intel_glue.c | 1144 unsigned int authsize) in common_rfc4106_set_authsize() argument 1146 switch (authsize) { in common_rfc4106_set_authsize() 1159 unsigned int authsize) in generic_gcmaes_set_authsize() argument 1161 switch (authsize) { in generic_gcmaes_set_authsize()
|
| /arch/arm64/crypto/ |
| 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()
|
| 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()
|
| 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()
|
| A D | ghash-ce-glue.c | 59 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() 362 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 374 lengths.b = cpu_to_be64((req->cryptlen - authsize) * 8); in gcm_decrypt() 382 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 383 authsize, 0); in gcm_decrypt() 405 nrounds, tag, otag, authsize); in gcm_decrypt() 455 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 457 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|
| /arch/arm/crypto/ |
| A D | ghash-ce-glue.c | 201 const char *otag, int authsize); 237 static int gcm_aes_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_aes_setauthsize() argument 239 return crypto_gcm_check_authsize(authsize); in gcm_aes_setauthsize() 394 int authsize = crypto_aead_authsize(aead); in gcm_decrypt() local 406 req->assoclen + req->cryptlen - authsize, in gcm_decrypt() 407 authsize, 0); in gcm_decrypt() 446 lengths.b = cpu_to_be64((req->cryptlen - authsize) * 8); in gcm_decrypt() 455 ctx->rounds, counter, otag, authsize); in gcm_decrypt() 495 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 497 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|
| /arch/powerpc/crypto/ |
| A D | aes-gcm-p10-glue.c | 176 static int set_authsize(struct crypto_aead *tfm, unsigned int authsize) in set_authsize() argument 178 switch (authsize) { in set_authsize() 330 static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in rfc4106_setauthsize() argument 332 return crypto_rfc4106_check_authsize(authsize); in rfc4106_setauthsize()
|
| /arch/s390/crypto/ |
| A D | aes_s390.c | 761 static int gcm_aes_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in gcm_aes_setauthsize() argument 763 switch (authsize) { in gcm_aes_setauthsize()
|
| /arch/x86/coco/sev/ |
| A D | core.c | 1911 if (unlikely((resp_msg_hdr->msg_sz + ctx->authsize) > req->resp_sz)) in verify_and_dec_payload() 1948 if (WARN_ON((req->req_sz + ctx->authsize) > sizeof(msg->payload))) in enc_payload()
|