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

NAME

6       tpm2_testparms(1)  - Verify that specified algorithm suite is supported
7       by TPM
8

SYNOPSIS

10       tpm2_testparms [OPTIONS] [ARGUMENT]
11

DESCRIPTION

13       tpm2_testparms(1) - Checks that the  suite  specified  by  ALG_SPEC  is
14       available for usage per ALGORITHM.
15
16       Algorithms should follow the "formatting standards", see section "Algo‐
17       rithm Specifiers".
18
19       Also, see section "Supported Signing Schemes" for a list  of  supported
20       hash algorithms.
21

OPTIONS

23       This tool accepts no tool specific options.
24
25   References

COMMON OPTIONS

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

TCTI Configuration

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

TCTI OPTIONS

110       This collection of options are used to configure the various known TCTI
111       modules available:
112
113       · device: For the device TCTI, the TPM character device file for use by
114         the device TCTI can be specified.  The default is /dev/tpm0.
115
116         Example:   -T   device:/dev/tpm0   or   export    TPM2TOOLS_TCTI="de‐
117         vice:/dev/tpm0"
118
119       · mssim:  For  the  mssim  TCTI, the domain name or IP address and port
120         number used by the simulator  can  be  specified.   The  default  are
121         127.0.0.1 and 2321.
122
123         Example:  -T  mssim:host=localhost,port=2321  or export TPM2TOOLS_TC‐
124         TI="mssim:host=localhost,port=2321"
125
126       · abrmd: For the abrmd TCTI, the configuration string format is  a  se‐
127         ries  of  simple  key value pairs separated by a ',' character.  Each
128         key and value string are separated by a '=' character.
129
130         · TCTI abrmd supports two keys:
131
132           1. 'bus_name' : The name of  the  tabrmd  service  on  the  bus  (a
133              string).
134
135           2. 'bus_type' : The type of the dbus instance (a string) limited to
136              'session' and 'system'.
137
138         Specify the tabrmd tcti name and a config string of  bus_name=com.ex‐
139         ample.FooBar:
140
141         \--tcti=tabrmd:bus_name=com.example.FooBar
142
143         Specify the default (abrmd) tcti and a config string of bus_type=ses‐
144         sion:
145
146         \--tcti:bus_type=session
147
148         NOTE: abrmd and tabrmd are synonymous.  the various known  TCTI  mod‐
149         ules.
150

Algorithm Specifiers

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

Signature Format Specifiers

316       Format selection for the signature output file.  tss (the default) will
317       output a binary blob according to the TPM 2.0 specification and any po‐
318       tential  compiler padding.  The option plain will output the plain sig‐
319       nature data as defined by the used cryptographic algorithm.
320

EXAMPLES

322   Check whether if rsa is supported
323              tpm2_testparms rsa
324
325   Check that ECDSA using P-256 with AES-128 CTR mode is available
326              tpm2_testparms ecc256:ecdsa:aes128ctr
327

Returns

329       Tools can return any of the following codes:
330
331       · 0 - Success.
332
333       · 1 - General non-specific error.
334
335       · 2 - Options handling error.
336
337       · 3 - Authentication error.
338
339       · 4 - TCTI related error.
340
341       · 5 - Non supported scheme.  Applicable to tpm2_testparams.
342

BUGS

344       Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
345

HELP

347       See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
348
349
350
351tpm2-tools                                                   tpm2_testparms(1)
Impressum