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

NAME

6       tpm2_commit(1)  -  Performs  the first part of an ECC anonymous signing
7       operation.
8

SYNOPSIS

10       tpm2_commit [OPTIONS]
11

DESCRIPTION

13       tpm2_commit(1) - Performs the first part of an  ECC  anonymous  signing
14       operation.   The TPM will perform the point multiplications on the pro‐
15       vided points and return intermediate signing values.  The  signing  key
16       is  an  ECC key.  The key cannot be a sign+decrypt key and must have an
17       anonymous signing scheme.  TPM_ALG_ECDAA is the only  supported  anony‐
18       mous scheme.
19

OPTIONS

21ARGUMENT=FILE:
22
23         Specify  the  input data used to derive the x coordinate of the base‐
24         point.
25
26--basepoint-y=FILE:
27
28         Specify the y coordinate of the basepoint.
29
30--eccpoint-P=FILE:
31
32         Specify a point on the curve used by sign handle.
33
34--eccpoint-K=FILE:
35
36         Output ECC point K ≔ [ds](x2, y2).
37
38--eccpoint-L=FILE:
39
40         Output ECC point L ≔ [r](x2, y2).
41
42-u, --public=FILE:
43
44         Output ECC point E ≔ [r]P1.
45
46-t, --counter=FILE
47
48         Specify file path to save the least-significant  16  bits  of  commit
49         count.
50
51-p, --auth=AUTH:
52
53         The authorization value for the created object.
54
55-c, --context=FILE:
56
57         Context  object  pointing  to the the key used for signing.  Either a
58         file or a handle number.  See section “Context Object Format”.
59
60--cphash=FILE
61
62         File path to record the hash of the command parameters.  This is com‐
63         monly termed as cpHash.  NOTE: When this option is selected, The tool
64         will not actually execute the command, it simply returns a cpHash.
65
66   References

Algorithm Specifiers

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

COMMON OPTIONS

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

TCTI Configuration

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

TCTI OPTIONS

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

EXAMPLES

371              tpm2_createprimary -C o -c prim.ctx -Q
372
373              tpm2_create -C prim.ctx -c key.ctx -u key.pub -r key.priv -G ecc256:ecdaa
374
375              tpm2_commit -c key.ctx -t count.er \
376              --eccpoint-K K.bin --eccpoint-L L.bin -u E.bin
377

Returns

379       Tools can return any of the following codes:
380
381       • 0 - Success.
382
383       • 1 - General non-specific error.
384
385       • 2 - Options handling error.
386
387       • 3 - Authentication error.
388
389       • 4 - TCTI related error.
390
391       • 5 - Non supported scheme.  Applicable to tpm2_testparams.
392

BUGS

394       Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
395

HELP

397       See the Mailing List (https://lists.linuxfoundation.org/mailman/listin
398       fo/tpm2)
399
400
401
402tpm2-tools                                                      tpm2_commit(1)
Impressum