1 | =head1 NAME
|
---|
2 |
|
---|
3 | TPM_IO_Hash_Start - indicate the beginging of a TPM TIS hash operation
|
---|
4 |
|
---|
5 | TPM_IO_Hash_Data - hash the provided data
|
---|
6 |
|
---|
7 | TPM_IO_Hash_End - indicate the end of a TPM TIS hash operation
|
---|
8 |
|
---|
9 | =head1 LIBRARY
|
---|
10 |
|
---|
11 | TPM library (libtpms, -ltpms)
|
---|
12 |
|
---|
13 | =head1 SYNOPSIS
|
---|
14 |
|
---|
15 | B<#include <libtpms/tpm_types.h>>
|
---|
16 |
|
---|
17 | B<#include <libtpms/tpm_tis.h>>
|
---|
18 |
|
---|
19 | B<#include <libtpms/tpm_error.h>>
|
---|
20 |
|
---|
21 | B<TPM_RESULT TPM_IO_Hash_Start(void);>
|
---|
22 |
|
---|
23 | B<TPM_RESULT TPM_IO_Hash_Data(const unsigned char> *I<data>B<,
|
---|
24 | uint32_t> I<data_length>B<);>
|
---|
25 |
|
---|
26 | B<TPM_RESULT TPM_IO_Hash_End(void);>
|
---|
27 |
|
---|
28 | =head1 DESCRIPTION
|
---|
29 |
|
---|
30 | The B<TPM_IO_Hash_Start()> function can be used by an implementation of the
|
---|
31 | TPM TIS hardware interface to indicate the beginning of a hash operation.
|
---|
32 | Following the TPM TIS interface specification it resets several PCRs and
|
---|
33 | terminates existing transport sessions.
|
---|
34 | The B<TPM_IO_Hash_Data()> function is used to send the data to be hashed to
|
---|
35 | the TPM.
|
---|
36 | The B<TPM_IO_Hash_End()> function calculates the final hash and stores it
|
---|
37 | in the locality 4 PCR.
|
---|
38 | The 3 functions must be called in the order they were explained.
|
---|
39 |
|
---|
40 | The implementation of the above functions handles all TPM-internal actions
|
---|
41 | such as the setting and clearing of permanent flags and PCRs and the
|
---|
42 | calculation of the hash. Any functionality related to the TPM's TIS interface
|
---|
43 | and the handling of flags, locality and state has to be implemented by the
|
---|
44 | caller.
|
---|
45 |
|
---|
46 | =head1 ERRORS
|
---|
47 |
|
---|
48 | =over 4
|
---|
49 |
|
---|
50 | =item B<TPM_SUCCESS>
|
---|
51 |
|
---|
52 | The function completed successfully.
|
---|
53 |
|
---|
54 | =item B<TPM_FAIL>
|
---|
55 |
|
---|
56 | General failure.
|
---|
57 |
|
---|
58 | =item B<TPM_INVALID_POSTINIT>
|
---|
59 |
|
---|
60 | The B<TPM_IO_Hash_Start()> function was called before the TPM received
|
---|
61 | a TPM_Startup command.
|
---|
62 |
|
---|
63 | =item B<TPM_SHA_THREAD>
|
---|
64 |
|
---|
65 | The B<TPM_IO_Hash_Data()> or B<TPM_IO_Hash_End()> functions were called before
|
---|
66 | the B<TPM_IO_Hash_Start()> function.
|
---|
67 |
|
---|
68 | =back
|
---|
69 |
|
---|
70 | For a complete list of TPM error codes please consult the include file
|
---|
71 | B<libtpms/tpm_error.h>
|
---|
72 |
|
---|
73 | =head1 SEE ALSO
|
---|
74 |
|
---|
75 | B<TPMLIB_MainInit>(3), B<TPMLIB_Terminate>(3), B<TPMLIB_RegisterCallbacks>(3),
|
---|
76 | B<TPMLIB_Process>(3)
|
---|
77 |
|
---|
78 | =cut
|
---|