Home | History | Annotate | Download | only in tpm2

Lines Matching defs:hmac

163 //      TPM_RH_NULL. The binding only occurs if the session is an HMAC session. The bind value is a
553 // This function computes the HMAC for an authorization session in a command.
559 TPM2B_DIGEST *hmac // OUT: authorization HMAC
578 // session that uses an HMAC, then check if additional session nonces are to be
605 // Continue with the HMAC processing.
607 // Generate HMAC key.
611 // this entity to the HMAC key.
613 // with no authValue required, do not include the authValue in the HMAC key.
620 // or an hmac session that is not bound
627 // add the authValue to the HMAC key
634 // if the HMAC key size is 0, a NULL string HMAC is allowed
638 hmac->t.size = 0;
641 // Start HMAC
642 hmac->t.size = CryptStartHMAC2B(session->authHashAlg, &key.b, &hmacState);
661 // Complete the HMAC computation
662 CryptCompleteHMAC2B(&hmacState, &hmac->b);
669 // This function checks the HMAC of in a session. It uses ComputeCommandHMAC() to compute the
670 // expected HMAC value and then compares the result with the HMAC in the authorization session. The
686 TPM2B_DIGEST hmac; // authHMAC for comparing
688 ComputeCommandHMAC(sessionIndex, cpHash, &hmac);
689 // Compare the input HMAC with the authHMAC computed above.
690 if(!Memory2BEqual(&s_inputAuthValues[sessionIndex].b, &hmac.b))
692 // If an HMAC session has a failure, invoke the anti-hammering
908 // Fourth parameter: authValue (PW or HMAC).
935 // Check if the session is an HMAC/policy session.
1088 // TPM_RC_AUTH_FAIL HMAC or PW authorization failed with DA side-effects (can be a
1090 // TPM_RC_BAD_AUTH HMAC or PW authorization failed without DA side-effects (can be a
1170 // going to be used in an HMAC because it is bound.
1174 // At this point, the session must be either a policy or an HMAC session.
1184 // For other policy or HMAC sessions, have its HMAC checked.
1350 // check HMAC for encrypt/decrypt/audit only sessions
1451 // HMAC authorization session and the return code is TPM_RC_SUCCESS.
1670 // Function to compute HMAC for authorization session in a response.
1680 TPM2B_DIGEST *hmac // OUT: authHMAC
1684 TPM2B_KEY key; // HMAC key
1695 // Generate HMAC key
1699 // If not bound, add the authValue of this entity to the HMAC key.
1711 // if the HMAC key size for a policy session is 0, the response HMAC is
1712 // computed according to the input HMAC
1717 hmac->t.size = 0;
1720 // Start HMAC computation.
1721 hmac->t.size = CryptStartHMAC2B(session->authHashAlg, &key.b, &hmacState);
1731 // Finalize HMAC.
1732 CryptCompleteHMAC2B(&hmacState, &hmac->b);
1758 // Fill in policy/HMAC based session response.
1766 // Compute response HMAC.