Lines Matching full:hmac
9 #include <crypto/hmac.h>
42 bool hmac; member
161 /* Hash continuation or HMAC, setup (inner) digest from state */ in safexcel_context_control()
165 /* Compute digest count for hash/HMAC finish operations */ in safexcel_context_control()
183 /* Special case: zero length HMAC */ in safexcel_context_control()
185 /* PE HW < 4.4 cannot do HMAC continue, fake using hash */ in safexcel_context_control()
192 /* For zero-len HMAC, don't finalize, already padded! */ in safexcel_context_control()
202 /* Clear zero-length HMAC flag for next operation! */ in safexcel_context_control()
204 } else { /* HMAC */ in safexcel_context_control()
205 /* Need outer digest for HMAC finalization */ in safexcel_context_control()
209 /* Single pass HMAC - no digest count */ in safexcel_context_control()
270 if (sreq->hmac && in safexcel_handle_req_result()
272 /* Faking HMAC using hash - need to do outer hash */ in safexcel_handle_req_result()
281 sreq->hmac = 0; in safexcel_handle_req_result()
704 /* invalidate for HMAC finish with odigest changed */ in safexcel_ahash_enqueue()
705 (req->finish && req->hmac && in safexcel_ahash_enqueue()
758 * Also go process immediately for an HMAC IV precompute, which in safexcel_ahash_update()
829 } else if (unlikely(req->hmac && in safexcel_ahash_final()
833 * If we have an overall 0 length *HMAC* request: in safexcel_ahash_final()
834 * For HMAC, we need to finalize the inner digest in safexcel_ahash_final()
858 /* Set special zero-length HMAC flag */ in safexcel_ahash_final()
861 /* Finalize HMAC */ in safexcel_ahash_final()
863 } else if (req->hmac) { in safexcel_ahash_final()
864 /* Finalize HMAC */ in safexcel_ahash_final()
1030 req->hmac = true; in safexcel_hmac_sha1_init()
1128 req->hmac = true; in safexcel_hmac_init_iv()
1248 .cra_name = "hmac(sha1)",
1249 .cra_driver_name = "safexcel-hmac-sha1",
1403 req->hmac = true; in safexcel_hmac_sha224_init()
1434 .cra_name = "hmac(sha224)",
1435 .cra_driver_name = "safexcel-hmac-sha224",
1475 req->hmac = true; in safexcel_hmac_sha256_init()
1506 .cra_name = "hmac(sha256)",
1507 .cra_driver_name = "safexcel-hmac-sha256",
1661 req->hmac = true; in safexcel_hmac_sha512_init()
1692 .cra_name = "hmac(sha512)",
1693 .cra_driver_name = "safexcel-hmac-sha512",
1733 req->hmac = true; in safexcel_hmac_sha384_init()
1764 .cra_name = "hmac(sha384)",
1765 .cra_driver_name = "safexcel-hmac-sha384",
1856 req->hmac = true; in safexcel_hmac_md5_init()
1894 .cra_name = "hmac(md5)",
1895 .cra_driver_name = "safexcel-hmac-md5",
2355 req->hmac = true; in safexcel_hmac_sm3_init()
2386 .cra_name = "hmac(sm3)",
2387 .cra_driver_name = "safexcel-hmac-sm3",
2435 /* Set fallback cipher HMAC key */ in safexcel_sha3_fbcheck()
2820 * move the rest to opad due to the way our HMAC infra works. in safexcel_hmac_sha3_setkey()
2832 * to match the existing HMAC driver infrastructure. in safexcel_hmac_sha3_setkey()
2871 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_224_init()
2879 req->hmac = true; in safexcel_hmac_sha3_224_init()
2891 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_224_digest()
2916 .cra_name = "hmac(sha3-224)",
2917 .cra_driver_name = "safexcel-hmac-sha3-224",
2942 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_256_init()
2950 req->hmac = true; in safexcel_hmac_sha3_256_init()
2962 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_256_digest()
2987 .cra_name = "hmac(sha3-256)",
2988 .cra_driver_name = "safexcel-hmac-sha3-256",
3013 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_384_init()
3021 req->hmac = true; in safexcel_hmac_sha3_384_init()
3033 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_384_digest()
3058 .cra_name = "hmac(sha3-384)",
3059 .cra_driver_name = "safexcel-hmac-sha3-384",
3084 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_512_init()
3092 req->hmac = true; in safexcel_hmac_sha3_512_init()
3104 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_512_digest()
3128 .cra_name = "hmac(sha3-512)",
3129 .cra_driver_name = "safexcel-hmac-sha3-512",