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

NAME

6       tpm2_checkquote(1) - Validates a quote provided by a TPM.
7

SYNOPSIS

9       tpm2_checkquote [OPTIONS]
10

DESCRIPTION

12       tpm2_checkquote(1)  -  Uses  the  public portion of the provided key to
13       validate a quote generated by a TPM.  This will validate the  signature
14       against  the quote message and, if provided, verify that the qualifying
15       data and PCR values match those in the quote.  The PCR  values  can  be
16       provided  with or without the TPML_PCR_SELECTION information.  An exam‐
17       ple of PCR values without the PCR selection information is  the  output
18       from tpm2_pcrread.  If PCR value is specified without the PCR selection
19       information, then the PCR selection string must be specified using  the
20       -l option to interpret the PCR data.
21

OPTIONS

23-u, --public=FILE:
24
25         File  input for the public portion of the signature verification key.
26         Either the pem file or tss public format file.
27
28-g, --hash-algorithm=ALGORITHM:
29
30         The hash algorithm used to digest the message.
31
32-m, --message=FILE:
33
34         The quote message that makes up the data that is signed by the TPM.
35
36-s, --signature=FILE:
37
38         The input signature file of the signature to be validated.
39
40-f, --pcr=FILE:
41
42         Optional PCR input file to save the list of PCR values that were  in‐
43         cluded in the quote.
44
45-l, --pcr-list=PCR:
46
47         The list of PCR banks and selected PCRs’ ids for each bank.
48
49-q, --qualification=HEX_STRING_OR_PATH:
50
51         Qualification  data  for  the  quote.   Can either be a hex string or
52         path.  This is typically used to add a nonce against replay attacks.
53
54-F, --format=FORMAT:
55
56         DEPRECATED and IGNORED  as it’s superfluous.
57
58   References

Algorithm Specifiers

60       Options that take algorithms support “nice-names”.
61
62       There are two major algorithm specification string classes, simple  and
63       complex.  Only certain algorithms will be accepted by the TPM, based on
64       usage and conditions.
65
66   Simple specifiers
67       These are strings with no additional specification data.  When creating
68       objects,  non-specified  portions of an object are assumed to defaults.
69       You can find the list of known “Simple Specifiers Below”.
70
71   Asymmetric
72       • rsa
73
74       • ecc
75
76   Symmetric
77       • aes
78
79       • camellia
80
81   Hashing Algorithms
82       • sha1
83
84       • sha256
85
86       • sha384
87
88       • sha512
89
90       • sm3_256
91
92       • sha3_256
93
94       • sha3_384
95
96       • sha3_512
97
98   Keyed Hash
99       • hmac
100
101       • xor
102
103   Signing Schemes
104       • rsassa
105
106       • rsapss
107
108       • ecdsa
109
110       • ecdaa
111
112       • ecschnorr
113
114   Asymmetric Encryption Schemes
115       • oaep
116
117       • rsaes
118
119       • ecdh
120
121   Modes
122       • ctr
123
124       • ofb
125
126       • cbc
127
128       • cfb
129
130       • ecb
131
132   Misc
133       • null
134
135   Complex Specifiers
136       Objects, when specified for creation by the TPM,  have  numerous  algo‐
137       rithms  to  populate  in the public data.  Things like type, scheme and
138       asymmetric details, key size, etc.  Below is  the  general  format  for
139       specifying this data: <type>:<scheme>:<symmetric-details>
140
141   Type Specifiers
142       This  portion  of the complex algorithm specifier is required.  The re‐
143       maining scheme and symmetric details will default  based  on  the  type
144       specified and the type of the object being created.
145
146       • aes - Default AES: aes128
147
148       • aes128<mode>  - 128 bit AES with optional mode (ctr|ofb|cbc|cfb|ecb).
149         If mode is not specified, defaults to null.
150
151       • aes192<mode> - Same as aes128<mode>, except for a 192 bit key size.
152
153       • aes256<mode> - Same as aes128<mode>, except for a 256 bit key size.
154
155       • ecc - Elliptical Curve, defaults to ecc256.
156
157       • ecc192 - 192 bit ECC
158
159       • ecc224 - 224 bit ECC
160
161       • ecc256 - 256 bit ECC
162
163       • ecc384 - 384 bit ECC
164
165       • ecc521 - 521 bit ECC
166
167       • rsa - Default RSA: rsa2048
168
169       • rsa1024 - RSA with 1024 bit keysize.
170
171       • rsa2048 - RSA with 2048 bit keysize.
172
173       • rsa4096 - RSA with 4096 bit keysize.
174
175   Scheme Specifiers
176       Next, is an optional field, it can be skipped.
177
178       Schemes are usually Signing Schemes or Asymmetric  Encryption  Schemes.
179       Most signing schemes take a hash algorithm directly following the sign‐
180       ing scheme.  If the hash algorithm is missing, it defaults  to  sha256.
181       Some take no arguments, and some take multiple arguments.
182
183   Hash Optional Scheme Specifiers
184       These  scheme  specifiers are followed by a dash and a valid hash algo‐
185       rithm, For example: oaep-sha256.
186
187       • oaep
188
189       • ecdh
190
191       • rsassa
192
193       • rsapss
194
195       • ecdsa
196
197       • ecschnorr
198
199   Multiple Option Scheme Specifiers
200       This scheme specifier is followed by a count  (max  size  UINT16)  then
201       followed by a dash(-) and a valid hash algorithm.  * ecdaa For example,
202       ecdaa4-sha256.  If no count is specified, it defaults to 4.
203
204   No Option Scheme Specifiers
205       This scheme specifier takes NO arguments.  * rsaes
206
207   Symmetric Details Specifiers
208       This field is optional, and defaults based on the type of object  being
209       created  and it’s attributes.  Generally, any valid Symmetric specifier
210       from the Type Specifiers list should work.  If not specified, an  asym‐
211       metric objects symmetric details defaults to aes128cfb.
212
213   Examples
214   Create an rsa2048 key with an rsaes asymmetric encryption scheme
215       tpm2_create -C parent.ctx -G rsa2048:rsaes -u key.pub -r key.priv
216
217   Create  an  ecc256  key  with an ecdaa signing scheme with a count of 4 and
218       sha384 hash
219       /tpm2_create  -C  parent.ctx  -G  ecc256:ecdaa4-sha384  -u  key.pub  -r
220       key.priv cryptographic algorithms ALGORITHM.
221

Signature Format Specifiers

223       Format selection for the signature output file.  tss (the default) will
224       output a binary blob according to the TPM 2.0 specification and any po‐
225       tential  compiler padding.  The option plain will output the plain sig‐
226       nature data as defined by the used cryptographic algorithm.   signature
227       FORMAT.
228

COMMON OPTIONS

230       This  collection of options are common to many programs and provide in‐
231       formation that many users may expect.
232
233-h, --help=[man|no-man]: Display the tools manpage.  By  default,  it
234         attempts  to  invoke  the  manpager for the tool, however, on failure
235         will output a short tool summary.  This is the same behavior  if  the
236         “man”  option argument is specified, however if explicit “man” is re‐
237         quested, the tool will provide errors from man  on  stderr.   If  the
238         “no-man”  option  if  specified, or the manpager fails, the short op‐
239         tions will be output to stdout.
240
241         To successfully use the manpages feature requires the manpages to  be
242         installed or on MANPATH, See man(1) for more details.
243
244-v,  --version:  Display version information for this tool, supported
245         tctis and exit.
246
247-V, --verbose: Increase the information that the tool prints  to  the
248         console  during  its  execution.  When using this option the file and
249         line number are printed.
250
251-Q, --quiet: Silence normal tool output to stdout.
252
253-Z, --enable-errata: Enable the application of errata fixups.  Useful
254         if  an  errata fixup needs to be applied to commands sent to the TPM.
255         Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.   in‐
256         formation many users may expect.
257

TCTI Configuration

259       The  TCTI  or  “Transmission  Interface” is the communication mechanism
260       with the TPM.  TCTIs can be changed for communication with TPMs  across
261       different mediums.
262
263       To control the TCTI, the tools respect:
264
265       1. The command line option -T or --tcti
266
267       2. The environment variable: TPM2TOOLS_TCTI.
268
269       Note:  The  command  line option always overrides the environment vari‐
270       able.
271
272       The current known TCTIs are:
273
274       • tabrmd     -     The     resource     manager,     called      tabrmd
275         (https://github.com/tpm2-software/tpm2-abrmd).   Note that tabrmd and
276         abrmd as a tcti name are synonymous.
277
278       • mssim - Typically used for communicating to the TPM software  simula‐
279         tor.
280
281       • device - Used when talking directly to a TPM device file.
282
283       • none  - Do not initalize a connection with the TPM.  Some tools allow
284         for off-tpm options and thus support not using a TCTI.  Tools that do
285         not  support  it  will error when attempted to be used without a TCTI
286         connection.  Does not support ANY options and MUST  BE  presented  as
287         the exact text of “none”.
288
289       The  arguments  to  either  the  command line option or the environment
290       variable are in the form:
291
292       <tcti-name>:<tcti-option-config>
293
294       Specifying an empty string for  either  the  <tcti-name>  or  <tcti-op‐
295       tion-config> results in the default being used for that portion respec‐
296       tively.
297
298   TCTI Defaults
299       When a TCTI is not specified, the default TCTI is  searched  for  using
300       dlopen(3)  semantics.   The  tools  will  search for tabrmd, device and
301       mssim TCTIs IN THAT ORDER and USE THE FIRST ONE FOUND.  You  can  query
302       what TCTI will be chosen as the default by using the -v option to print
303       the version information.  The “default-tcti” key-value pair will  indi‐
304       cate which of the aforementioned TCTIs is the default.
305
306   Custom TCTIs
307       Any TCTI that implements the dynamic TCTI interface can be loaded.  The
308       tools internally use dlopen(3), and the raw tcti-name value is used for
309       the lookup.  Thus, this could be a path to the shared library, or a li‐
310       brary name as understood by dlopen(3) semantics.
311

TCTI OPTIONS

313       This collection of options are used to configure the various known TCTI
314       modules available:
315
316device: For the device TCTI, the TPM character device file for use by
317         the device TCTI can be specified.  The default is /dev/tpm0.
318
319         Example:   -T   device:/dev/tpm0   or   export    TPM2TOOLS_TCTI=“de‐
320         vice:/dev/tpm0”
321
322mssim:  For  the  mssim  TCTI, the domain name or IP address and port
323         number used by the simulator  can  be  specified.   The  default  are
324         127.0.0.1 and 2321.
325
326         Example:  -T  mssim:host=localhost,port=2321  or export TPM2TOOLS_TC‐
327         TI=“mssim:host=localhost,port=2321”
328
329abrmd: For the abrmd TCTI, the configuration string format is  a  se‐
330         ries  of  simple  key value pairs separated by a `,' character.  Each
331         key and value string are separated by a `=' character.
332
333         • TCTI abrmd supports two keys:
334
335           1. `bus_name' : The name of  the  tabrmd  service  on  the  bus  (a
336              string).
337
338           2. `bus_type' : The type of the dbus instance (a string) limited to
339              `session' and `system'.
340
341         Specify the tabrmd tcti name and a config string of  bus_name=com.ex‐
342         ample.FooBar:
343
344                \--tcti=tabrmd:bus_name=com.example.FooBar
345
346         Specify the default (abrmd) tcti and a config string of bus_type=ses‐
347         sion:
348
349                \--tcti:bus_type=session
350
351         NOTE: abrmd and tabrmd are synonymous.  the various known  TCTI  mod‐
352         ules.
353

EXAMPLES

355   Generate a quote with a TPM, then verify it
356              tpm2_createek -c 0x81010001 -G rsa -u ekpub.pem -f pem
357
358              tpm2_createak -C 0x81010001 -c ak.ctx -G rsa -s rsassa -g sha256 \
359              -u akpub.pem -f pem -n ak.name
360
361              tpm2_quote -c ak.ctx -l sha256:15,16,22 -q abc123 -m quote.msg -s quote.sig \
362                -o quote.pcrs -g sha256
363
364              tpm2_checkquote -u akpub.pem -m quote.msg -s quote.sig -f quote.pcrs -g sha256 \
365                -q abc123
366

Returns

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

BUGS

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

HELP

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