1tpmtool(1) User Commands tpmtool(1)
2
3
4
6 tpmtool - GnuTLS TPM tool
7
9 tpmtool [-flags] [-flag [value]] [--option-name[[=| ]value]]
10
11 All arguments must be options.
12
13
15 Program that allows handling cryptographic data from the TPM chip.
16
18 -d number, --debug=number
19 Enable debugging. This option takes an integer number as its
20 argument. The value of number is constrained to being:
21 in the range 0 through 9999
22
23 Specifies the debug level.
24
25 --infile=file
26 Input file.
27
28
29 --outfile=string
30 Output file.
31
32
33 --generate-rsa
34 Generate an RSA private-public key pair.
35
36 Generates an RSA private-public key pair in the TPM chip. The
37 key may be stored in file system and protected by a PIN, or
38 stored (registered) in the TPM chip flash.
39
40 --register
41 Any generated key will be registered in the TPM. This option
42 must appear in combination with the following options: generate-
43 rsa.
44
45
46 --signing
47 Any generated key will be a signing key. This option must
48 appear in combination with the following options: generate-rsa.
49 This option must not appear in combination with any of the fol‐
50 lowing options: legacy.
51
52
53 --legacy
54 Any generated key will be a legacy key. This option must appear
55 in combination with the following options: generate-rsa. This
56 option must not appear in combination with any of the following
57 options: signing.
58
59
60 --user Any registered key will be a user key. This option must appear
61 in combination with the following options: register. This
62 option must not appear in combination with any of the following
63 options: system.
64
65 The generated key will be stored in a user specific persistent
66 storage.
67
68 --system
69 Any registered key will be a system key. This option must
70 appear in combination with the following options: register.
71 This option must not appear in combination with any of the fol‐
72 lowing options: user.
73
74 The generated key will be stored in system persistent storage.
75
76 --pubkey=url
77 Prints the public key of the provided key.
78
79
80 --list Lists all stored keys in the TPM.
81
82
83 --delete=url
84 Delete the key identified by the given URL (UUID)..
85
86
87 --test-sign=url
88 Tests the signature operation of the provided object.
89
90 It can be used to test the correct operation of the signature
91 operation. This operation will sign and verify the signed data.
92
93 --sec-param=security parameter
94 Specify the security level [low, legacy, medium, high, ultra]..
95
96 This is alternative to the bits option. Note however that the
97 values allowed by the TPM chip are quantized and given values
98 may be rounded up.
99
100 --bits=number
101 Specify the number of bits for key generate. This option takes
102 an integer number as its argument.
103
104
105 --inder, --no-inder
106 Use the DER format for keys.. The no-inder form will disable
107 the option.
108
109 The input files will be assumed to be in the portable DER format
110 of TPM. The default format is a custom format used by various
111 TPM tools
112
113 --outder, --no-outder
114 Use DER format for output keys. The no-outder form will disable
115 the option.
116
117 The output will be in the TPM portable DER format.
118
119 --srk-well-known
120 SRK has well known password (20 bytes of zeros).
121
122 This option has not been fully documented.
123
124 -h, --help
125 Display usage information and exit.
126
127 -!, --more-help
128 Pass the extended usage information through a pager.
129
130 -v [{v|c|n --version [{v|c|n}]}]
131 Output version of program and exit. The default mode is `v', a
132 simple version. The `c' mode will print copyright information
133 and `n' will print the full copyright notice.
134
136 To generate a key that is to be stored in file system use:
137 $ tpmtool --generate-rsa --bits 2048 --outfile tpmkey.pem
138
139 To generate a key that is to be stored in TPM's flash use:
140 $ tpmtool --generate-rsa --bits 2048 --register --user
141
142 To get the public key of a TPM key use:
143 $ tpmtool --pubkey tpmkey:uuid=58ad734b-bde6-45c7-89d8-756a55ad1891;storage=user --outfile pubkey.pem
144
145 or if the key is stored in the file system:
146 $ tpmtool --pubkey tpmkey:file=tmpkey.pem --outfile pubkey.pem
147
148 To list all keys stored in TPM use:
149 $ tpmtool --list
150
152 One of the following exit values will be returned:
153
154 0 (EXIT_SUCCESS)
155 Successful program execution.
156
157 1 (EXIT_FAILURE)
158 The operation failed or the command syntax was not valid.
159
160 70 (EX_SOFTWARE)
161 libopts had an internal operational error. Please report it to
162 autogen-users@lists.sourceforge.net. Thank you.
163
165 p11tool (1), certtool (1)
166
168 Nikos Mavrogiannopoulos, Simon Josefsson and others; see
169 /usr/share/doc/gnutls/AUTHORS for a complete list.
170
172 Copyright (C) 2000-2020 Free Software Foundation, and others all rights
173 reserved. This program is released under the terms of the GNU General
174 Public License, version 3 or later.
175
177 Please send bug reports to: bugs@gnutls.org
178
180 This manual page was AutoGen-erated from the tpmtool option defini‐
181 tions.
182
183
184
1853.6.15 04 Sep 2020 tpmtool(1)