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()
1107 req->hmac = true; in safexcel_hmac_init_iv()
1222 .cra_name = "hmac(sha1)",
1223 .cra_driver_name = "safexcel-hmac-sha1",
1377 req->hmac = true; in safexcel_hmac_sha224_init()
1408 .cra_name = "hmac(sha224)",
1409 .cra_driver_name = "safexcel-hmac-sha224",
1449 req->hmac = true; in safexcel_hmac_sha256_init()
1480 .cra_name = "hmac(sha256)",
1481 .cra_driver_name = "safexcel-hmac-sha256",
1635 req->hmac = true; in safexcel_hmac_sha512_init()
1666 .cra_name = "hmac(sha512)",
1667 .cra_driver_name = "safexcel-hmac-sha512",
1707 req->hmac = true; in safexcel_hmac_sha384_init()
1738 .cra_name = "hmac(sha384)",
1739 .cra_driver_name = "safexcel-hmac-sha384",
1830 req->hmac = true; in safexcel_hmac_md5_init()
1868 .cra_name = "hmac(md5)",
1869 .cra_driver_name = "safexcel-hmac-md5",
2308 req->hmac = true; in safexcel_hmac_sm3_init()
2339 .cra_name = "hmac(sm3)",
2340 .cra_driver_name = "safexcel-hmac-sm3",
2388 /* Set fallback cipher HMAC key */ in safexcel_sha3_fbcheck()
2774 * move the rest to opad due to the way our HMAC infra works. in safexcel_hmac_sha3_setkey()
2786 * to match the existing HMAC driver infrastructure. in safexcel_hmac_sha3_setkey()
2825 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_224_init()
2833 req->hmac = true; in safexcel_hmac_sha3_224_init()
2845 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_224_digest()
2870 .cra_name = "hmac(sha3-224)",
2871 .cra_driver_name = "safexcel-hmac-sha3-224",
2896 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_256_init()
2904 req->hmac = true; in safexcel_hmac_sha3_256_init()
2916 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_256_digest()
2941 .cra_name = "hmac(sha3-256)",
2942 .cra_driver_name = "safexcel-hmac-sha3-256",
2967 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_384_init()
2975 req->hmac = true; in safexcel_hmac_sha3_384_init()
2987 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_384_digest()
3012 .cra_name = "hmac(sha3-384)",
3013 .cra_driver_name = "safexcel-hmac-sha3-384",
3038 /* Start of HMAC should have len == processed == blocksize */ in safexcel_hmac_sha3_512_init()
3046 req->hmac = true; in safexcel_hmac_sha3_512_init()
3058 /* HW cannot do zero length HMAC, use fallback instead */ in safexcel_hmac_sha3_512_digest()
3082 .cra_name = "hmac(sha3-512)",
3083 .cra_driver_name = "safexcel-hmac-sha3-512",