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
14 Program that allows handling cryptographic data from the TPM chip.
15
16
18 -d num, --debug=num
19 Enable debugging. This option takes an integer number as its
20 argument. The value of num 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=str
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 not
48 appear in combination with any of the following options: legacy.
49 This option must appear in combination with the following op‐
50 tions: generate-rsa.
51
52
53 --legacy
54 Any generated key will be a legacy key. This option must not
55 appear in combination with any of the following options: sign‐
56 ing. This option must appear in combination with the following
57 options: generate-rsa.
58
59
60 --user Any registered key will be a user key. This option must not ap‐
61 pear in combination with any of the following options: system.
62 This option must appear in combination with the following op‐
63 tions: register.
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 not
70 appear in combination with any of the following options: user.
71 This option must appear in combination with the following op‐
72 tions: register.
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=num
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 the
107 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
123 -v arg, --version=arg
124 Output version of program and exit. The default mode is `v', a
125 simple version. The `c' mode will print copyright information
126 and `n' will print the full copyright notice.
127
128 -h, --help
129 Display usage information and exit.
130
131 -!, --more-help
132 Pass the extended usage information through a pager.
133
134
135
137 To generate a key that is to be stored in file system use:
138 $ tpmtool --generate-rsa --bits 2048 --outfile tpmkey.pem
139
140 To generate a key that is to be stored in TPM's flash use:
141 $ tpmtool --generate-rsa --bits 2048 --register --user
142
143 To get the public key of a TPM key use:
144 $ tpmtool --pubkey tpmkey:uuid=58ad734b-bde6-45c7-89d8-756a55ad1891;storage=user --outfile pubkey.pem
145
146 or if the key is stored in the file system:
147 $ tpmtool --pubkey tpmkey:file=tmpkey.pem --outfile pubkey.pem
148
149 To list all keys stored in TPM use:
150 $ tpmtool --list
151
153 One of the following exit values will be returned:
154
155 0 (EXIT_SUCCESS)
156 Successful program execution.
157
158 1 (EXIT_FAILURE)
159 The operation failed or the command syntax was not valid.
160
162 p11tool (1), certtool (1)
163
166 Copyright (C) 2020-2021 Free Software Foundation, and others all rights
167 reserved. This program is released under the terms of the GNU General
168 Public License, version 3 or later
169
171 Please send bug reports to: bugs@gnutls.org
172
173
174
1753.7.6 27 May 2022 tpmtool(1)