Lines Matching full:hmac

7  * authorization HMAC and request response encryption.
9 * The idea is to ensure that every TPM command is HMAC protected by a
36 * The design is all the crypto, hash and hmac gunk is confined in this
55 * calculating the HMAC. In particular, for NV, volatile and
57 * tpm_buf_append_hmac_session() which appends the hmac session to the
61 * command buffer is finalized so it can fill in the correct HMAC
78 #include <crypto/hmac.h>
128 * because several HMAC/KDF schemes use the combination of the
307 * for the HMAC which cannot be computed until the command buffer is
317 * tpm_buf_fill_hmac_session() otherwise the HMAC will be incorrect
346 * before computing the HMAC in tpm_buf_append_hmac_session()
380 /* and put a placeholder for the hmac */ in tpm_buf_append_hmac_session()
393 * It turns out the crypto hmac(sha256) is hard for us to consume
395 * on every operation, so we weld the hmac init and final functions in
573 * tpm_buf_fill_hmac_session() - finalize the session HMAC
578 * been appended to @buf otherwise the computed HMAC will be
581 * This function computes and fills in the session HMAC using the
597 u8 *hmac = NULL; in tpm_buf_fill_hmac_session() local
650 hmac = &buf->data[offset_s]; in tpm_buf_fill_hmac_session()
664 if (!hmac) { in tpm_buf_fill_hmac_session()
665 dev_err(&chip->dev, "TPM could not find HMAC session\n"); in tpm_buf_fill_hmac_session()
669 /* encrypt before HMAC */ in tpm_buf_fill_hmac_session()
684 /* reset p to beginning of parameters for HMAC */ in tpm_buf_fill_hmac_session()
711 /* now calculate the hmac */ in tpm_buf_fill_hmac_session()
719 + auth->passphrase_len, hmac); in tpm_buf_fill_hmac_session()
724 * tpm_buf_check_hmac_response() - check the TPM return HMAC for correctness
734 * If @rc is zero, the response HMAC is computed against the returned
738 * The reason for this is that the command issue and HMAC check
778 dev_err(&chip->dev, "TPM: HMAC response check has no sessions tag\n"); in tpm_buf_check_hmac_response()
815 * offset_s points to the HMAC. now calculate comparison, beginning in tpm_buf_check_hmac_response()
827 /* now calculate the hmac */ in tpm_buf_check_hmac_response()
834 /* we're done with the rphash, so put our idea of the hmac there */ in tpm_buf_check_hmac_response()
840 dev_err(&chip->dev, "TPM: HMAC check failed\n"); in tpm_buf_check_hmac_response()
966 * tpm2_start_auth_session() - create a HMAC authentication session with the TPM
972 * for performing the HMAC, encrypt and decrypt operations and
1014 /* session type (HMAC, audit or policy) */ in tpm2_start_auth_session()
1048 * used in HMAC encryption. For more information on specific attributes look up
1206 /* the ticket digest HMAC (might not be sha256) */ in tpm2_parse_create_primary()