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
113device: 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
119mssim:  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
126abrmd: 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       • sm4
174
175   Hashing Algorithms
176       • sha1
177
178       • sha256
179
180       • sha384
181
182       • sha512
183
184       • sm3_256
185
186       • sha3_256
187
188       • sha3_384
189
190       • sha3_512
191
192   Keyed Hash
193       • hmac
194
195       • xor
196
197   Signing Schemes
198       • rsassa
199
200       • rsapss
201
202       • ecdsa
203
204       • ecdaa
205
206       • ecschnorr
207
208       • sm2
209
210   Asymmetric Encryption Schemes
211       • oaep
212
213       • rsaes
214
215       • ecdh
216
217   Modes
218       • ctr
219
220       • ofb
221
222       • cbc
223
224       • cfb
225
226       • ecb
227
228   Misc
229       • null
230
231   Complex Specifiers
232       Objects,  when  specified  for creation by the TPM, have numerous algo‐
233       rithms to populate in the public data.  Things like  type,  scheme  and
234       asymmetric  details,  key  size,  etc.  Below is the general format for
235       specifying this data: <type>:<scheme>:<symmetric-details>
236
237   Type Specifiers
238       This portion of the complex algorithm specifier is required.   The  re‐
239       maining  scheme  and  symmetric  details will default based on the type
240       specified and the type of the object being created.
241
242       • aes - Default AES: aes128
243
244       • aes128<mode> - 128 bit AES with optional mode  (ctr|ofb|cbc|cfb|ecb).
245         If mode is not specified, defaults to null.
246
247       • aes192<mode> - Same as aes128<mode>, except for a 192 bit key size.
248
249       • aes256<mode> - Same as aes128<mode>, except for a 256 bit key size.
250
251       • sm4 - Default SM4: sm4128
252
253       • sm4128   or   sm4_128  <mode>  -  128  bit  SM4  with  optional  mode
254         (ctr|ofb|cbc|cfb|ecb).  If mode is not specified, defaults to null.
255
256       • ecc - Elliptical Curve, defaults to ecc256.
257
258       • ecc192 or ecc_nist_p192 - 192 bit ECC NIST curve
259
260       • ecc224 or ecc_nist_p224 - 224 bit ECC NIST curve
261
262       • ecc256 or ecc_nist_p256 - 256 bit ECC NIST curve
263
264       • ecc384 or ecc_nist_p384 - 384 bit ECC NIST curve
265
266       • ecc521 or ecc_nist_p521 - 521 bit ECC NIST curve
267
268       • ecc_sm2 or ecc_sm2_p256 - 256 bit SM2 curve
269
270       • rsa - Default RSA: rsa2048
271
272       • rsa1024 - RSA with 1024 bit keysize.
273
274       • rsa2048 - RSA with 2048 bit keysize.
275
276       • rsa3072 - RSA with 3072 bit keysize.
277
278       • rsa4096 - RSA with 4096 bit keysize.
279
280   Scheme Specifiers
281       Next, is an optional field, it can be skipped.
282
283       Schemes are usually Signing Schemes or Asymmetric  Encryption  Schemes.
284       Most signing schemes take a hash algorithm directly following the sign‐
285       ing scheme.  If the hash algorithm is missing, it defaults  to  sha256.
286       Some take no arguments, and some take multiple arguments.
287
288   Hash Optional Scheme Specifiers
289       These  scheme  specifiers are followed by a dash and a valid hash algo‐
290       rithm, For example: oaep-sha256.
291
292       • oaep
293
294       • ecdh
295
296       • rsassa
297
298       • rsapss
299
300       • ecdsa
301
302       • ecschnorr
303
304       • sm2
305
306   Multiple Option Scheme Specifiers
307       This scheme specifier is followed by a count  (max  size  UINT16)  then
308       followed by a dash(-) and a valid hash algorithm.  * ecdaa For example,
309       ecdaa4-sha256.  If no count is specified, it defaults to 4.
310
311   No Option Scheme Specifiers
312       This scheme specifier takes NO arguments.  * rsaes
313
314   Symmetric Details Specifiers
315       This field is optional, and defaults based on the type of object  being
316       created  and it’s attributes.  Generally, any valid Symmetric specifier
317       from the Type Specifiers list should work.  If not specified, an  asym‐
318       metric objects symmetric details defaults to aes128cfb.
319
320   Examples
321   Create an rsa2048 key with an rsaes asymmetric encryption scheme
322       tpm2_create -C parent.ctx -G rsa2048:rsaes -u key.pub -r key.priv
323
324   Create  an  ecc256  key  with an ecdaa signing scheme with a count of 4 and
325       sha384 hash
326       /tpm2_create  -C  parent.ctx  -G  ecc256:ecdaa4-sha384  -u  key.pub  -r
327       key.priv cryptographic algorithms ALGORITHM.
328

Signature Format Specifiers

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

EXAMPLES

336   Check whether if “rsa” is supported
337              tpm2_testparms rsa
338
339   Check that ECDSA using P-256 with AES-128 CTR mode is available
340              tpm2_testparms ecc256:ecdsa:aes128ctr
341

Returns

343       Tools can return any of the following codes:
344
345       • 0 - Success.
346
347       • 1 - General non-specific error.
348
349       • 2 - Options handling error.
350
351       • 3 - Authentication error.
352
353       • 4 - TCTI related error.
354
355       • 5 - Non supported scheme.  Applicable to tpm2_testparams.
356

BUGS

358       Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
359

HELP

361       See the Mailing List (https://lists.linuxfoundation.org/mailman/listin
362       fo/tpm2)
363
364
365
366tpm2-tools                                                   tpm2_testparms(1)
Impressum