1TPM_IO_Hash_Start(3)                                      TPM_IO_Hash_Start(3)
2
3
4

NAME

6       TPM_IO_Hash_Start   - indicate the beginging of a TPM TIS hash
7       operation
8
9       TPM_IO_Hash_Data    - hash the provided data
10
11       TPM_IO_Hash_End     - indicate the end of a TPM TIS hash operation
12

LIBRARY

14       TPM library (libtpms, -ltpms)
15

SYNOPSIS

17       #include <libtpms/tpm_types.h>
18
19       #include <libtpms/tpm_tis.h>
20
21       #include <libtpms/tpm_error.h>
22
23       TPM_RESULT TPM_IO_Hash_Start(void);
24
25       TPM_RESULT TPM_IO_Hash_Data(const unsigned char *data,
26                                   uint32_t data_length);
27
28       TPM_RESULT TPM_IO_Hash_End(void);
29

DESCRIPTION

31       The TPM_IO_Hash_Start() function can be used by an implementation of
32       the TPM TIS hardware interface to indicate the beginning of a hash
33       operation.  Following the TPM TIS interface specification it resets
34       several PCRs and terminates existing transport sessions.  The
35       TPM_IO_Hash_Data() function is used to send the data to be hashed to
36       the TPM.  The TPM_IO_Hash_End() function calculates the final hash and
37       stores it in the locality 4 PCR.  The 3 functions must be called in the
38       order they were explained.
39
40       The implementation of the above functions handles all TPM-internal
41       actions such as the setting and clearing of permanent flags and PCRs
42       and the calculation of the hash. Any functionality related to the TPM's
43       TIS interface and the handling of flags, locality and state has to be
44       implemented by the caller.
45

ERRORS

47       TPM_SUCCESS
48           The function completed sucessfully.
49
50       TPM_FAIL
51           General failure.
52
53       TPM_INVALID_POSTINIT
54           The TPM_IO_Hash_Start() function was called before the TPM received
55           a TPM_Startup command.
56
57       TPM_SHA_THREAD
58           The TPM_IO_Hash_Data() or TPM_IO_Hash_End() functions were called
59           before the TPM_IO_Hash_Start() function.
60
61       For a complete list of TPM error codes please consult the include file
62       libtpms/tpm_error.h
63

SEE ALSO

65       TPMLIB_MainInit(3), TPMLIB_Terminate(3), TPMLIB_RegisterCallbacks(3),
66       TPMLIB_Process(3)
67
68
69
70libtpms                           2021-06-01              TPM_IO_Hash_Start(3)
Impressum