1tss2_createkey(1) General Commands Manual tss2_createkey(1)
2
3
4
6 tss2_createkey(1) -
7
9 tss2_createkey [OPTIONS]
10
12 fapi-config(5) to adjust Fapi parameters like the used cryptographic
13 profile and TCTI or directories for the Fapi metadata storages.
14
15 fapi-profile(5) to determine the cryptographic algorithms and parame‐
16 ters for all keys and operations of a specific TPM interaction like the
17 name hash algorithm, the asymmetric signature algorithm, scheme and pa‐
18 rameters and PCR bank selection.
19
21 tss2_createkey(1) - This commands creates a key inside the TPM and
22 stores it in the FAPI metadata store and if requested persistently in‐
23 side the TPM. Depending on the specified key type, cryptographic algo‐
24 rithms and parameters for the created key are determined by the corre‐
25 sponding cryptographic profile (cf., fapi-profile(5)).
26
28 These are the available options:
29
30 • -p, --path=STRING:
31
32 The path to the new key.
33
34 • -t, --type=STRING:
35
36 Identifies the intended usage. Optional parameter. Types may be any
37 comma-separated combination of:
38
39 - "sign": Sets the sign attribute of a key.
40 - "decrypt": Sets the decrypt attribute of a key.
41 - Hint: If neither sign nor decrypt are provided, both attributes are set.
42 - "restricted": Sets the restricted attribute of a key.
43 - Hint: If restricted is set, sign or decrypt (but not both) need to be set.
44 - "exportable": Clears the fixedTPM and fixedParent attributes of a key or
45 sealed object.
46 - "noda": Sets the noda attribute of a key or NV index.
47 - "system": Stores the data blobs and metadata for a created key or seal
48 in the system-wide directory instead of user's personal directory.
49 - A hexadecimal number (e.g. "0x81000001"): Marks a key object to be
50 made persistent and sets the persistent object handle to this value.
51
52 • -P, --policyPath=STRING:
53
54 The policy to be associated with the new key. Optional parameter.
55 If omitted then no policy will be associated with the key.
56
57 A policyPath is composed of two elements, separated by “/”. A poli‐
58 cyPath starts with “/policy”. The second path element identifies the
59 policy or policy template using a meaningful name.
60
61 • -a, --authValue=STRING:
62
63 The new UTF-8 password. Optional parameter. If it is neglected then
64 the user is queried interactively for a password. To set no pass‐
65 word, this option should be used with the empty string (""). The
66 maximum password size is determined by the digest size of the chosen
67 name hash algorithm in the cryptographic profile (cf., fapi-pro‐
68 file(5)). For example, choosing SHA256 as hash algorithm, allows
69 passwords of a maximum size of 32 characters.
70
72 This collection of options are common to all tss2 programs and provide
73 information that many users may expect.
74
75 • -h, --help [man|no-man]: Display the tools manpage. By default, it
76 attempts to invoke the manpager for the tool, however, on failure
77 will output a short tool summary. This is the same behavior if the
78 “man” option argument is specified, however if explicit “man” is re‐
79 quested, the tool will provide errors from man on stderr. If the
80 “no-man” option if specified, or the manpager fails, the short op‐
81 tions will be output to stdout.
82
83 To successfully use the manpages feature requires the manpages to be
84 installed or on MANPATH, See man(1) for more details.
85
86 • -v, --version: Display version information for this tool, supported
87 tctis and exit.
88
90 Create a key without password
91 tss2_createkey --path=HS/SRK/myRsaCryptKey --type="noDa, decrypt" --authValue=""
92
93 Create a key, ask for password on the command line
94 tss2_createkey --path=HS/SRK/myRsaCryptKey --type="noDa, decrypt"
95
96 Create a key with password “abc”.
97 tss2_createkey --path=HS/SRK/myRsaCryptKey --type="noDa, decrypt" --authValue=abc
98
100 0 on success or 1 on failure.
101
103 Github Issues (https://github.com/tpm2-software/tpm2-tools/issues)
104
106 See the Mailing List (https://lists.linuxfoundation.org/mailman/listin‐
107 fo/tpm2)
108
109
110
111tpm2-tools APRIL 2019 tss2_createkey(1)