% tpm2_load(1) tpm2-tools | General Commands Manual
tpm2_load(1) - Load an object into the TPM.
tpm2_load(1) - Load both the private and public portions of an object into the TPM.
The tool outputs the name of the loaded object in a YAML dictionary format with the key name where the value for that key is the name of the object in hex format, for example:
It also saves a context file for future interactions with the object.
NOTE: Both private and public portions of the tpm key must be specified.
The parent object.
The authorization value of the parent object specified by -C.
A file containing the public portion of the object.
A file containing the sensitive portion of the object.
An optional file to save the name structure of the object.
The file name of the saved object context, required.
File path to record the hash of the command parameters. This is commonly termed as cpHash. NOTE: When this option is selected, The tool will not actually execute the command, it simply returns a cpHash.
context object format details the methods for specifying OBJECT.
authorization formatting details the methods for specifying AUTH.
common options collection of common options that provide information many users may expect.
common tcti options collection of options used to configure the various known TCTI modules.
To load an object you first must create an object under a primary object. So the first step is to create the primary object.
tpm2_createprimary -c primary.ctx
Step 2 is to create an object under the primary object.
tpm2_create -C primary.ctx -u key.pub -r key.priv
This creates the private and public portions of the TPM object. With these object portions, it is now possible to load that object into the TPM for subsequent use.
Loading an Object into the TPM
The final step, is loading the public and private portions of the object into the TPM.
tpm2_load -C primary.ctx -u key.pub -r key.priv -c key.ctx name: 000bac25cb8743111c8e1f52f2ee7279d05d3902a18dd1af694db5d1afa7adf1c8b3