1tpm2_makecredential(1) General Commands Manual tpm2_makecredential(1)
2
3
4
6 tpm2_makecredential(1) - Load an object that is not a Protected Object
7 into the TPM.
8
10 tpm2_makecredential [OPTIONS]
11
13 tpm2_makecredential(1) - Use a TPM public key to protect a secret that
14 is used to encrypt the attestation key certificate. This can be used
15 without a TPM by using the none TCTI option.
16
18 · -e, --encryption-key=FILE:
19
20 A TPM public key which was used to wrap the seed.
21
22 · -s, --secret=FILE:
23
24 The secret which will be protected by the key derived from the random
25 seed.
26
27 · -n, --name=FILE:
28
29 The name of the key for which certificate is to be created.
30
31 · -o, --credential-blob=FILE:
32
33 The output file path, recording the two structures output by
34 tpm2_makecredential function.
35
37 This collection of options are common to many programs and provide in‐
38 formation that many users may expect.
39
40 · -h, --help=[man|no-man]: Display the tools manpage. By default, it
41 attempts to invoke the manpager for the tool, however, on failure
42 will output a short tool summary. This is the same behavior if the
43 "man" option argument is specified, however if explicit "man" is re‐
44 quested, the tool will provide errors from man on stderr. If the
45 "no-man" option if specified, or the manpager fails, the short op‐
46 tions will be output to stdout.
47
48 To successfully use the manpages feature requires the manpages to be
49 installed or on MANPATH, See man(1) for more details.
50
51 · -v, --version: Display version information for this tool, supported
52 tctis and exit.
53
54 · -V, --verbose: Increase the information that the tool prints to the
55 console during its execution. When using this option the file and
56 line number are printed.
57
58 · -Q, --quiet: Silence normal tool output to stdout.
59
60 · -Z, --enable-errata: Enable the application of errata fixups. Useful
61 if an errata fixup needs to be applied to commands sent to the TPM.
62 Defining the environment TPM2TOOLS_ENABLE_ERRATA is equivalent.
63
65 The TCTI or "Transmission Interface" is the communication mechanism
66 with the TPM. TCTIs can be changed for communication with TPMs across
67 different mediums.
68
69 To control the TCTI, the tools respect:
70
71 1. The command line option -T or --tcti
72
73 2. The environment variable: TPM2TOOLS_TCTI.
74
75 Note: The command line option always overrides the environment vari‐
76 able.
77
78 The current known TCTIs are:
79
80 · tabrmd - The resource manager, called tabrmd
81 (https://github.com/tpm2-software/tpm2-abrmd). Note that tabrmd and
82 abrmd as a tcti name are synonymous.
83
84 · mssim - Typically used for communicating to the TPM software simula‐
85 tor.
86
87 · device - Used when talking directly to a TPM device file.
88
89 · none - Do not initalize a connection with the TPM. Some tools allow
90 for off-tpm options and thus support not using a TCTI. Tools that do
91 not support it will error when attempted to be used without a TCTI
92 connection. Does not support ANY options and MUST BE presented as
93 the exact text of "none".
94
95 The arguments to either the command line option or the environment
96 variable are in the form:
97
98 <tcti-name>:<tcti-option-config>
99
100 Specifying an empty string for either the <tcti-name> or <tcti-op‐
101 tion-config> results in the default being used for that portion respec‐
102 tively.
103
104 TCTI Defaults
105 When a TCTI is not specified, the default TCTI is searched for using
106 dlopen(3) semantics. The tools will search for tabrmd, device and
107 mssim TCTIs IN THAT ORDER and USE THE FIRST ONE FOUND. You can query
108 what TCTI will be chosen as the default by using the -v option to print
109 the version information. The "default-tcti" key-value pair will indi‐
110 cate which of the aforementioned TCTIs is the default.
111
112 Custom TCTIs
113 Any TCTI that implements the dynamic TCTI interface can be loaded. The
114 tools internally use dlopen(3), and the raw tcti-name value is used for
115 the lookup. Thus, this could be a path to the shared library, or a li‐
116 brary name as understood by dlopen(3) semantics.
117
119 This collection of options are used to configure the various known TCTI
120 modules available:
121
122 · device: For the device TCTI, the TPM character device file for use by
123 the device TCTI can be specified. The default is /dev/tpm0.
124
125 Example: -T device:/dev/tpm0 or export TPM2TOOLS_TCTI="de‐
126 vice:/dev/tpm0"
127
128 · mssim: For the mssim TCTI, the domain name or IP address and port
129 number used by the simulator can be specified. The default are
130 127.0.0.1 and 2321.
131
132 Example: -T mssim:host=localhost,port=2321 or export TPM2TOOLS_TC‐
133 TI="mssim:host=localhost,port=2321"
134
135 · abrmd: For the abrmd TCTI, the configuration string format is a se‐
136 ries of simple key value pairs separated by a ',' character. Each
137 key and value string are separated by a '=' character.
138
139 · TCTI abrmd supports two keys:
140
141 1. 'bus_name' : The name of the tabrmd service on the bus (a
142 string).
143
144 2. 'bus_type' : The type of the dbus instance (a string) limited to
145 'session' and 'system'.
146
147 Specify the tabrmd tcti name and a config string of bus_name=com.ex‐
148 ample.FooBar:
149
150 \--tcti=tabrmd:bus_name=com.example.FooBar
151
152 Specify the default (abrmd) tcti and a config string of bus_type=ses‐
153 sion:
154
155 \--tcti:bus_type=session
156
157 NOTE: abrmd and tabrmd are synonymous.
158
160 tpm2_makecredential -e <keyFile> -s <secFile> -n <hexString> -o <outFile>
161
163 Tools can return any of the following codes:
164
165 · 0 - Success.
166
167 · 1 - General non-specific error.
168
169 · 2 - Options handling error.
170
171 · 3 - Authentication error.
172
173 · 4 - TCTI related error.
174
175 · 5 - Non supported scheme. Applicable to tpm2_testparams.
176
178 Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
179
181 See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
182
183
184
185tpm2-tools tpm2_makecredential(1)