1tpm2_load(1) General Commands Manual tpm2_load(1)
2
3
4
6 tpm2_load(1) - Load an object into the TPM.
7
9 tpm2_load [OPTIONS]
10
12 tpm2_load(1) - Load both the private and public portions of an object
13 into the TPM.
14
16 · -H, –parent=PARENT_HANDLE: The handle of the parent object. Either
17 this option or -c must be used.
18
19 · -c, –context-parent=PARENT_CONTEXT_FILE: The filename for parent con‐
20 text.
21
22 · -P, –pwdp=PARENT_KEY_PASSWORD: The password for parent key, optional.
23 Passwords should follow the “password formatting standards, see sec‐
24 tion”Password Formatting“.
25
26 · -u, –pubfile=PUBLIC_OBJECT_DATA_FILE: A file containing the public
27 portion of the object.
28
29 · -r, –privfile=PRIVATE_OBJECT_DATA_FILE: A file containing the sensi‐
30 tive portion of the object.
31
32 · -n, –name=NAME_DATA_FILE: An optional file to save the name structure
33 of the object.
34
35 · -C, –context=CONTEXT_FILE: An optional file to save the object con‐
36 text to.
37
38 · -S, –input-session-handle=SESSION_HANDLE: Optional Input session han‐
39 dle from a policy session for authorization.
40
42 This collection of options are common to many programs and provide in‐
43 formation that many users may expect.
44
45 · -h, –help: Display the tools manpage. This requires the manpages to
46 be installed or on MANPATH, See man(1) for more details.
47
48 · -v, –version: Display version information for this tool, supported
49 tctis and exit.
50
51 · -V, –verbose: Increase the information that the tool prints to the
52 console during its execution. When using this option the file and
53 line number are printed.
54
55 · -Q, –quiet: Silence normal tool output to stdout.
56
57 · -Z, –enable-errata: Enable the application of errata fixups. Useful
58 if an errata fixup needs to be applied to commands sent to the TPM.
59 # TCTI ENVIRONMENT
60
61 This collection of environment variables that may be used to configure
62 the various TCTI modules available.
63
64 The values passed through these variables can be overridden on a
65 per-command basis using the available command line options, see the TC‐
66 TI_OPTIONS section.
67
68 The variables respected depend on how the software was configured.
69
70 · TPM2TOOLS_TCTI_NAME: Select the TCTI used for communication with the
71 next component down the TSS stack. In most configurations this will
72 be the TPM but it could be a simulator or proxy. The current known
73 TCTIs are:
74
75 · tabrmd - The new resource manager, called tabrmd
76 (https://github.com/01org/tpm2-abrmd).
77
78 · socket - Typically used with the old resource manager, or talking
79 directly to a simulator.
80
81 · device - Used when talking directly to a TPM device file.
82
83 · TPM2TOOLS_DEVICE_FILE: When using the device TCTI, specify the TPM
84 device file. The default is “/dev/tpm0”.
85
86 Note: Using the tpm directly requires the users to ensure that con‐
87 current access does not occur and that they manage the tpm resources.
88 These tasks are usually managed by a resource manager. Linux 4.12
89 and greater supports an in kernel resource manager at “/dev/tpmrm”,
90 typically “/dev/tpmrm0”.
91
92 · TPM2TOOLS_SOCKET_ADDRESS: When using the socket TCTI, specify the do‐
93 main name or IP address used. The default is 127.0.0.1.
94
95 · TPM2TOOLS_SOCKET_PORT: When using the socket TCTI, specify the port
96 number used. The default is 2321.
97
99 This collection of options are used to configure the varous TCTI mod‐
100 ules available. They override any environment variables.
101
102 · -T, –tcti=TCTI_NAME[:TCTI_OPTIONS]: Select the TCTI used for communi‐
103 cation with the next component down the TSS stack. In most configu‐
104 rations this will be the resource manager: tabrmd
105 (https://github.com/01org/tpm2-abrmd) Optionally, tcti specific op‐
106 tions can appended to TCTI_NAME by appending a : to TCTI_NAME.
107
108 · For the device TCTI, the TPM device file for use by the device TCTI
109 can be specified. The default is /dev/tpm0. Example: -T de‐
110 vice:/dev/tpm0
111
112 · For the socket TCTI, the domain name or IP address and port number
113 used by the socket can be specified. The default are 127.0.0.1 and
114 2321. Example: -T socket:127.0.0.1:2321
115
116 · For the abrmd TCTI, it takes no options. Example: -T abrmd
117
119 Passwords are interpreted in two forms, string and hex-string. A
120 string password is not interpreted, and is directly used for authoriza‐
121 tion. A hex-string, is converted from a hexidecimal form into a byte
122 array form, thus allowing passwords with non-printable and/or terminal
123 un-friendly characters.
124
125 By default passwords are assumed to be in the string form. Password
126 form is specified with special prefix values, they are:
127
128 · str: - Used to indicate it is a raw string. Useful for escaping a
129 password that starts with the “hex:” prefix.
130
131 · hex: - Used when specifying a password in hex string format.
132
134 tpm2_load -H 0x80000000 -P abc123 -u <pubKeyFileName> -r <privKeyFileName> -n <outPutFileName>
135 tpm2_load -c parent.context -P abc123 -u <pubKeyFileName> -r <privKeyFileName> -n <outPutFileName> -C object.context
136 tpm2_load -H 0x80000000 -P "hex:123abc" -u <pubKeyFileName> -r <privKeyFileName> -n <outPutFileName>
137
139 0 on success or 1 on failure.
140
142 Github Issues (https://github.com/01org/tpm2-tools/issues)
143
145 See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)
146
147
148
149tpm2-tools SEPTEMBER 2017 tpm2_load(1)