1tpm2_pcrlist(1)             General Commands Manual            tpm2_pcrlist(1)
2
3
4

NAME

6       tpm2_pcrlist(1) - List PCR values.
7

SYNOPSIS

9       tpm2_pcrlist [OPTIONS]
10

DESCRIPTION

12       tpm2_pcrlist(1) Displays PCR values.  Without any options, tpm2_pcrlist
13       outputs all pcrs and their hash banks.  One can use either the -g or -L
14       mutually exclusive options to filter the output.
15
16       Output is writtien in a YAML format to stdout, with each algorithm fol‐
17       lowed by a PCR index and its value.  As a simple  example  assume  just
18       sha1 and sha256 support and only 1 PCR.  The output would be:
19
20              sha1 :
21                0  : 0000000000000000000000000000000000000003
22              sha256 :
23                0  : 0000000000000000000000000000000000000000000000000000000000000003
24

OPTIONS

26       · -g,  –algorithm=HASH_ALGORITHM:  Only output PCR banks with the given
27         algorithm.  Algorithms should follow the “formatting  standards,  see
28         section”Algorithm Specifiers“. Also, see section”Supported Hash Algo‐
29         rithms" for a list of supported hash algorithms.
30
31       · -o, –output=FILE: The output file to write the PCR values  in  binary
32         format, optional.
33
34       · -L, –sel-list=PCR_SELECTION_LIST:
35
36         The  list  of  pcr banks and selected PCRs' ids for each bank to dis‐
37         play.  PCR_SELECTION_LIST values should follow the  pcr  bank  speci‐
38         fiers standards, see section “PCR Bank Specfiers”.
39
40       · -s, –algs: Output the list of supported algorithms.
41

COMMON OPTIONS

43       This  collection of options are common to many programs and provide in‐
44       formation that many users may expect.
45
46       · -h, –help: Display the tools manpage.  This requires the manpages  to
47         be installed or on MANPATH, See man(1) for more details.
48
49       · -v,  –version:  Display  version information for this tool, supported
50         tctis and exit.
51
52       · -V, –verbose: Increase the information that the tool  prints  to  the
53         console  during  its  execution.  When using this option the file and
54         line number are printed.
55
56       · -Q, –quiet: Silence normal tool output to stdout.
57
58       · -Z, –enable-errata: Enable the application of errata fixups.   Useful
59         if  an  errata fixup needs to be applied to commands sent to the TPM.
60         # TCTI ENVIRONMENT
61
62       This collection of environment variables that may be used to  configure
63       the various TCTI modules available.
64
65       The  values  passed  through  these  variables  can  be overridden on a
66       per-command basis using the available command line options, see the TC‐
67       TI_OPTIONS section.
68
69       The variables respected depend on how the software was configured.
70
71       · TPM2TOOLS_TCTI_NAME:  Select the TCTI used for communication with the
72         next component down the TSS stack.  In most configurations this  will
73         be  the  TPM but it could be a simulator or proxy.  The current known
74         TCTIs are:
75
76         · tabrmd   -   The    new    resource    manager,    called    tabrmd
77           (https://github.com/01org/tpm2-abrmd).
78
79         · socket  -  Typically used with the old resource manager, or talking
80           directly to a simulator.
81
82         · device - Used when talking directly to a TPM device file.
83
84       · TPM2TOOLS_DEVICE_FILE: When using the device TCTI,  specify  the  TPM
85         device file.  The default is “/dev/tpm0”.
86
87         Note:  Using  the tpm directly requires the users to ensure that con‐
88         current access does not occur and that they manage the tpm resources.
89         These  tasks  are  usually managed by a resource manager.  Linux 4.12
90         and greater supports an in kernel resource manager  at  “/dev/tpmrm”,
91         typically “/dev/tpmrm0”.
92
93       · TPM2TOOLS_SOCKET_ADDRESS: When using the socket TCTI, specify the do‐
94         main name or IP address used.  The default is 127.0.0.1.
95
96       · TPM2TOOLS_SOCKET_PORT: When using the socket TCTI, specify  the  port
97         number used.  The default is 2321.
98

TCTI OPTIONS

100       This  collection  of options are used to configure the varous TCTI mod‐
101       ules available.  They override any environment variables.
102
103       · -T, –tcti=TCTI_NAME[:TCTI_OPTIONS]: Select the TCTI used for communi‐
104         cation  with the next component down the TSS stack.  In most configu‐
105         rations   this    will    be    the    resource    manager:    tabrmd
106         (https://github.com/01org/tpm2-abrmd)  Optionally,  tcti specific op‐
107         tions can appended to TCTI_NAME by appending a : to TCTI_NAME.
108
109         · For the device TCTI, the TPM device file for use by the device TCTI
110           can  be  specified.   The  default  is  /dev/tpm0.  Example: -T de‐
111           vice:/dev/tpm0
112
113         · For the socket TCTI, the domain name or IP address and port  number
114           used by the socket can be specified.  The default are 127.0.0.1 and
115           2321.  Example: -T socket:127.0.0.1:2321
116
117         · For the abrmd TCTI, it takes no options.  Example: -T abrmd
118

PCR Bank Specfiers

120       PCR Bank Selection lists follow the below specification:
121
122              <BANK>:<PCR>[,<PCR>]
123
124       multiple banks may be separated by `+'.
125
126       For example:
127
128              sha:3,4+sha256:5,6
129
130       will select PCRs 3 and 4 from the SHA bank and PCRs 5 and  6  from  the
131       SHA256 bank.
132
133   Note
134       PCR  Selections allow for up to 5 hash to pcr selection mappings.  This
135       is a limitaion in design in the single call to the tpm to get  the  pcr
136       values.
137

Supported Hash Algorithms

139       Supported hash algorithms are:
140
141       · 0x4 or sha1 for TPM_ALG_SHA1 (default)
142
143       · 0xB or sha256 for TPM_ALG_SHA256
144
145       · 0xC or sha384 for TPM_ALG_SHA384
146
147       · 0xD or sha512 for TPM_ALG_SHA512
148
149       · 0x12 or sm3_256 for TPM_ALG_SM3_256
150
151       NOTE: Your TPM may not support all algorithms.
152

Algorithm Specfiers

154       Options  that  take  algorithms support “nice-names”.  Nice names, like
155       sha1 can be used in place of the raw hex for sha1: 0x4.  The nice names
156       are converted by stripping the leading TPM_ALG_ from the Algorithm Name
157       field and converting it to lower case.  For  instance  TPM_ALG_SHA3_256
158       becomes sha3_256.
159
160       The  algorithms can be found at: <https://trustedcomputinggroup.org/wp-
161       content/uploads/TCG_Algorithm_Registry_Rev_1.24.pdf>
162

EXAMPLES

164       display all PCR values:
165
166              tpm2_pcrlist
167
168       Display the PCR values with a specified bank:
169
170              tpm2_pcrlist -g sha1
171
172       Display the PCR values with specified banks and store in a file:
173
174              tpm2_pcrlist -L sha1:16,17,18+sha256:16,17,18 -o pcrs
175
176       Display the supported PCR bank algorithms and exit:
177
178              tpm2_pcrlist -s
179

RETURNS

181       0 on success or 1 on failure.
182

BUGS

184       Github Issues (https://github.com/01org/tpm2-tools/issues)
185

HELP

187       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
188
189
190
191tpm2-tools                        AUGUST 2017                  tpm2_pcrlist(1)
Impressum