tpm2_create man page

tpm2_create(1) — create an object that can be loaded into a TPM using tpm2_load. The object will need to be loaded before it may be used.

Synopsis

tpm2_create [Options]

Description

tpm2_create(1) - create an object that can be loaded into a TPM using tpm2_load. The object will need to be loaded before it may be used.

Options

These options for creating the tpm entity:

Common Options

This collection of options are common to many programs and provide information that many users may expect.

This collection of environment variables that may be used to configure the various TCTI modules available.

The values passed through these variables can be overridden on a per-command basis using the available command line options, see the TCTI_OPTIONS section.

The variables respected depend on how the software was configured.

Tcti Options

This collection of options are used to configure the varous TCTI modules available. They override any environment variables.

Password Formatting

Passwords are interpreted in two forms, string and hex-string. A string password is not interpreted, and is directly used for authorization. A hex-string, is converted from a hexidecimal form into a byte array form, thus allowing passwords with non-printable and/or terminal un-friendly characters.

By default passwords are assumed to be in the string form. Password form is specified with special prefix values, they are:

Supported Hash Algorithms

Supported hash algorithms are:

NOTE: Your TPM may not support all algorithms.

Supported Public Object Algorithms

Supported public object algorithms are:

NOTE: Your TPM may not support all algorithms.

Algorithm Specfiers

Options that take algorithms support “nice-names”. Nice names, like sha1 can be used in place of the raw hex for sha1: 0x4. The nice names are converted by stripping the leading TPM_ALG_ from the Algorithm Name field and converting it to lower case. For instance TPM_ALG_SHA3_256 becomes sha3_256.

The algorithms can be found at: <https://trustedcomputinggroup.org/wp-content/uploads/TCG_Algorithm_Registry_Rev_1.24.pdf>

Object Attributes

Object Attributes are used to control various properties of created objects. When specified as an option, either the raw bitfield mask or “nice-names” may be used. The values can be found in Table 31 Part 2 of the TPM2.0 specification, which can be found here:

<https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-2-Structures-01.38.pdf>

Nice names are calculated by taking the name field of table 31 and removing the prefix TPMA_OBJECT_ and lowercasing the result. Thus, TPMA_OBJECT_FIXEDTPM becomes fixedtpm. Nice names can be joined using the bitwise or “|” symbol.

For instance, to set The fields TPMA_OBJECT_FIXEDTPM, TPMA_OBJECT_NODA, and TPMA_OBJECT_SIGN, the argument would be:

fixedtpm|noda|sign

Examples

tpm2_create -H 0x81010001 -P abc123 -K def456 -g sha256 -G keyedhash-I data.File -o opu.File
tpm2_create -c parent.context -P abc123 -K def456 -g sha256 -G keyedhash -I data.File -o opu.File
tpm2_create -H 0x81010001 -P 123abc -K 456def -X -g sha256 -G keyedhash -I data.File -o opu.File

Returns

0 on success or 1 on failure.

Bugs

Github Issues (https://github.com/01org/tpm2-tools/issues)

Help

See the Mailing List (https://lists.01.org/mailman/listinfo/tpm2)

Info

AUGUST 2017 tpm2-tools General Commands Manual