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

NAME

6       tpm2_pcrread(1) - List PCR values.
7

SYNOPSIS

9       tpm2_pcrread [OPTIONS] PCR_LIST_OR_ALG
10

DESCRIPTION

12       tpm2_pcrread(1)   -   Displays  PCR  values.   Without  any  arguments,
13       tpm2_pcrread(1) outputs all PCRs and their hash  banks.   One  can  use
14       specify  the  hash algorithm or a pcr list as an argument to filter the
15       output.
16
17       To only output PCR banks with a given algorithm,  specify  the  hashing
18       algorithm  as  the  argument.  Algorithms should follow the "formatting
19       standards", see section  "Algorithm  Specifiers".   Also,  see  section
20       "Supported Hash Algorithms" for a list of supported hash algorithms.
21
22       To output a list of PCR banks (sha1, sha256, etc) and ids (0, 1, 2 etc)
23       specify a PCR selection list as the argument as specified  via  section
24       "PCR Bank Specifiers".
25
26       Also read NOTES section below.
27
28       Output  is written in a YAML format to stdout, with each algorithm fol‐
29       lowed by a PCR index and its value.  As a simple  example  assume  just
30       sha1 and sha256 support and only 1 PCR.  The output would be:
31
32              $ tpm2_pcrread sha1:0+sha256:0
33              sha1 :
34                0  : 0000000000000000000000000000000000000003
35              sha256 :
36                0  : 0000000000000000000000000000000000000000000000000000000000000003
37

OPTIONS

39-o, --output=FILE:
40
41         The output file to write the PCR values in binary format, optional.
42

COMMON OPTIONS

44       This  collection of options are common to many programs and provide in‐
45       formation that many users may expect.
46
47-h, --help=[man|no-man]: Display the tools manpage.  By  default,  it
48         attempts  to  invoke  the  manpager for the tool, however, on failure
49         will output a short tool summary.  This is the same behavior  if  the
50         "man"  option argument is specified, however if explicit "man" is re‐
51         quested, the tool will provide errors from man  on  stderr.   If  the
52         "no-man"  option  if  specified, or the manpager fails, the short op‐
53         tions will be output to stdout.
54
55         To successfully use the manpages feature requires the manpages to  be
56         installed or on MANPATH, See man(1) for more details.
57
58-v,  --version:  Display version information for this tool, supported
59         tctis and exit.
60
61-V, --verbose: Increase the information that the tool prints  to  the
62         console  during  its  execution.  When using this option the file and
63         line number are printed.
64
65-Q, --quiet: Silence normal tool output to stdout.
66
67-Z, --enable-errata: Enable the application of errata fixups.  Useful
68         if  an  errata fixup needs to be applied to commands sent to the TPM.
69         Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
70

TCTI Configuration

72       The TCTI or "Transmission Interface"  is  the  communication  mechanism
73       with  the TPM.  TCTIs can be changed for communication with TPMs across
74       different mediums.
75
76       To control the TCTI, the tools respect:
77
78       1. The command line option -T or --tcti
79
80       2. The environment variable: TPM2TOOLS_TCTI.
81
82       Note: The command line option always overrides  the  environment  vari‐
83       able.
84
85       The current known TCTIs are:
86
87       • tabrmd      -     The     resource     manager,     called     tabrmd
88         (https://github.com/tpm2-software/tpm2-abrmd).  Note that tabrmd  and
89         abrmd as a tcti name are synonymous.
90
91       • mssim  - Typically used for communicating to the TPM software simula‐
92         tor.
93
94       • device - Used when talking directly to a TPM device file.
95
96       • none - Do not initalize a connection with the TPM.  Some tools  allow
97         for off-tpm options and thus support not using a TCTI.  Tools that do
98         not support it will error when attempted to be used  without  a  TCTI
99         connection.   Does  not  support ANY options and MUST BE presented as
100         the exact text of "none".
101
102       The arguments to either the command  line  option  or  the  environment
103       variable are in the form:
104
105       <tcti-name>:<tcti-option-config>
106
107       Specifying  an  empty  string  for  either the <tcti-name> or <tcti-op‐
108       tion-config> results in the default being used for that portion respec‐
109       tively.
110
111   TCTI Defaults
112       When  a  TCTI  is not specified, the default TCTI is searched for using
113       dlopen(3) semantics.  The tools will  search  for  tabrmd,  device  and
114       mssim  TCTIs  IN THAT ORDER and USE THE FIRST ONE FOUND.  You can query
115       what TCTI will be chosen as the default by using the -v option to print
116       the  version information.  The "default-tcti" key-value pair will indi‐
117       cate which of the aforementioned TCTIs is the default.
118
119   Custom TCTIs
120       Any TCTI that implements the dynamic TCTI interface can be loaded.  The
121       tools internally use dlopen(3), and the raw tcti-name value is used for
122       the lookup.  Thus, this could be a path to the shared library, or a li‐
123       brary name as understood by dlopen(3) semantics.
124

TCTI OPTIONS

126       This collection of options are used to configure the various known TCTI
127       modules available:
128
129device: For the device TCTI, the TPM character device file for use by
130         the device TCTI can be specified.  The default is /dev/tpm0.
131
132         Example:    -T   device:/dev/tpm0   or   export   TPM2TOOLS_TCTI="de‐
133         vice:/dev/tpm0"
134
135        mssim: For the mssim TCTI, the domain name or  IP  address  and  port
136         number  used  by  the  simulator  can  be specified.  The default are
137         127.0.0.1 and 2321.
138
139         Example: -T mssim:host=localhost,port=2321  or  export  TPM2TOOLS_TC‐
140         TI="mssim:host=localhost,port=2321"
141
142        abrmd:  For  the abrmd TCTI, the configuration string format is a se‐
143         ries of simple key value pairs separated by a  ','  character.   Each
144         key and value string are separated by a '=' character.
145
146         • TCTI abrmd supports two keys:
147
148           1. 'bus_name'  :  The  name  of  the  tabrmd  service on the bus (a
149              string).
150
151           2. 'bus_type' : The type of the dbus instance (a string) limited to
152              'session' and 'system'.
153
154         Specify  the tabrmd tcti name and a config string of bus_name=com.ex‐
155         ample.FooBar:
156
157         \--tcti=tabrmd:bus_name=com.example.FooBar
158
159         Specify the default (abrmd) tcti and a config string of bus_type=ses‐
160         sion:
161
162         \--tcti:bus_type=session
163
164         NOTE: abrmd and tabrmd are synonymous.
165
166       PCR bank specifiers (common/pcr.md)
167

Supported Hash Algorithms

169       Supported hash algorithms are:
170
1710x4 or sha1 for TPM_ALG_SHA1
172
1730xB or sha256 for TPM_ALG_SHA256 (default)
174
1750xC or sha384 for TPM_ALG_SHA384
176
1770xD or sha512 for TPM_ALG_SHA512
178
1790x12 or sm3_256 for TPM_ALG_SM3_256
180
181       NOTE: Your TPM may not support all algorithms.
182

Algorithm Specifiers

184       Options that take algorithms support "nice-names".
185
186       There  are two major algorithm specification string classes, simple and
187       complex.  Only certain algorithms will be accepted by the TPM, based on
188       usage and conditions.
189
190   Simple specifiers
191       These are strings with no additional specification data.  When creating
192       objects, non-specified portions of an object are assumed  to  defaults.
193       You can find the list of known "Simple Specifiers Below".
194
195   Asymmetric
196       • rsa
197
198       • ecc
199
200   Symmetric
201       • aes
202
203       • camellia
204
205   Hashing Algorithms
206       • sha1
207
208       • sha256
209
210       • sha384
211
212       • sha512
213
214       • sm3_256
215
216       • sha3_256
217
218       • sha3_384
219
220       • sha3_512
221
222   Keyed Hash
223       • hmac
224
225       • xor
226
227   Signing Schemes
228       • rsassa
229
230       • rsapss
231
232       • ecdsa
233
234       • ecdaa
235
236       • ecschnorr
237
238   Asymmetric Encryption Schemes
239       • oaep
240
241       • rsaes
242
243       • ecdh
244
245   Modes
246       • ctr
247
248       • ofb
249
250       • cbc
251
252       • cfb
253
254       • ecb
255
256   Misc
257       • null
258
259   Complex Specifiers
260       Objects,  when  specified  for creation by the TPM, have numerous algo‐
261       rithms to populate in the public data.  Things like  type,  scheme  and
262       asymmetric  details,  key  size,  etc.  Below is the general format for
263       specifying this data: <type>:<scheme>:<symmetric-details>
264
265   Type Specifiers
266       This portion of the complex algorithm specifier is required.   The  re‐
267       maining  scheme  and  symmetric  details will default based on the type
268       specified and the type of the object being created.
269
270       • aes - Default AES: aes128
271
272       • aes128<mode> - 128 bit AES with optional mode  (ctr|ofb|cbc|cfb|ecb).
273         If mode is not specified, defaults to null.
274
275       • aes192<mode> - Same as aes128<mode>, except for a 192 bit key size.
276
277       • aes256<mode> - Same as aes128<mode>, except for a 256 bit key size.
278
279       • ecc - Elliptical Curve, defaults to ecc256.
280
281       • ecc192 - 192 bit ECC
282
283       • ecc224 - 224 bit ECC
284
285       • ecc256 - 256 bit ECC
286
287       • ecc384 - 384 bit ECC
288
289       • ecc521 - 521 bit ECC
290
291       • rsa - Default RSA: rsa2048
292
293       • rsa1024 - RSA with 1024 bit keysize.
294
295       • rsa2048 - RSA with 2048 bit keysize.
296
297       • rsa4096 - RSA with 4096 bit keysize.
298
299   Scheme Specifiers
300       Next, is an optional field, it can be skipped.
301
302       Schemes  are  usually Signing Schemes or Asymmetric Encryption Schemes.
303       Most signing schemes take a hash algorithm directly following the sign‐
304       ing  scheme.   If the hash algorithm is missing, it defaults to sha256.
305       Some take no arguments, and some take multiple arguments.
306
307   Hash Optional Scheme Specifiers
308       These scheme specifiers are followed by a dash and a valid  hash  algo‐
309       rithm, For example: oaep-sha256.
310
311       • oaep
312
313       • ecdh
314
315       • rsassa
316
317       • rsapss
318
319       • ecdsa
320
321       • ecschnorr
322
323   Multiple Option Scheme Specifiers
324       This  scheme  specifier  is  followed by a count (max size UINT16) then
325       followed by a dash(-) and a valid hash algorithm.  * ecdaa For example,
326       ecdaa4-sha256.  If no count is specified, it defaults to 4.
327
328   No Option Scheme Specifiers
329       This scheme specifier takes NO arguments.  * rsaes
330
331   Symmetric Details Specifiers
332       This  field is optional, and defaults based on the type of object being
333       created and it's attributes.  Generally, any valid Symmetric  specifier
334       from  the Type Specifiers list should work.  If not specified, an asym‐
335       metric objects symmetric details defaults to aes128cfb.
336
337   Examples
338   Create an rsa2048 key with an rsaes asymmetric encryption scheme
339       tpm2_create -C parent.ctx -G rsa2048:rsaes -u key.pub -r key.priv
340
341   Create an ecc256 key with an ecdaa signing scheme with a count of 4
342       and sha384 hash
343
344       /tpm2_create -C parent.ctx -G ecc256:ec‐
345       daa4-sha384 -u key.pub -r key.priv
346

EXAMPLES

348   Display all PCR values
349              tpm2_pcrread
350
351   Display the PCR values with a specified bank
352              tpm2_pcrread sha1
353
354   Display the PCR values with specified banks and store in a file
355              tpm2_pcrread -o pcrs sha1:16,17,18+sha256:16,17,18
356
357   Display the supported PCR bank algorithms and exit
358              tpm2_pcrread
359

NOTES

361       The maximum number of PCR that can be dumped at once is associated with
362       the maximum length of a bank.
363
364       On most TPMs, it means that this tool can dump up to 24 PCRs at once.
365

Returns

367       Tools can return any of the following codes:
368
369       • 0 - Success.
370
371       • 1 - General non-specific error.
372
373       • 2 - Options handling error.
374
375       • 3 - Authentication error.
376
377       • 4 - TCTI related error.
378
379       • 5 - Non supported scheme.  Applicable to tpm2_testparams.
380

BUGS

382       Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
383

HELP

385       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
386
387
388
389tpm2-tools                                                     tpm2_pcrread(1)
Impressum