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
218       and sha384 hash
219
220       /tpm2_create -C parent.ctx -G ecc256:ec‐
221       daa4-sha384 -u key.pub -r key.priv cryptographic algorithms ALGORITHM.
222

Signature Format Specifiers

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

COMMON OPTIONS

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

TCTI Configuration

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

TCTI OPTIONS

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

EXAMPLES

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

Returns

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

BUGS

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

HELP

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