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",
2334 req->hmac = true; in safexcel_hmac_sm3_init()
2365 .cra_name = "hmac(sm3)",
2366 .cra_driver_name = "safexcel-hmac-sm3",
2414 /* Set fallback cipher HMAC key */ in safexcel_sha3_fbcheck()
2799 * move the rest to opad due to the way our HMAC infra works. in safexcel_hmac_sha3_setkey()
2811 * to match the existing HMAC driver infrastructure. in safexcel_hmac_sha3_setkey()
2850 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_224_init()
2858 req->hmac = true; in safexcel_hmac_sha3_224_init()
2870 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_224_digest()
2895 .cra_name = "hmac(sha3-224)",
2896 .cra_driver_name = "safexcel-hmac-sha3-224",
2921 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_256_init()
2929 req->hmac = true; in safexcel_hmac_sha3_256_init()
2941 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_256_digest()
2966 .cra_name = "hmac(sha3-256)",
2967 .cra_driver_name = "safexcel-hmac-sha3-256",
2992 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_384_init()
3000 req->hmac = true; in safexcel_hmac_sha3_384_init()
3012 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_384_digest()
3037 .cra_name = "hmac(sha3-384)",
3038 .cra_driver_name = "safexcel-hmac-sha3-384",
3063 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_512_init()
3071 req->hmac = true; in safexcel_hmac_sha3_512_init()
3083 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_512_digest()
3107 .cra_name = "hmac(sha3-512)",
3108 .cra_driver_name = "safexcel-hmac-sha3-512",