tpm.dev.tutorials/TPM-Commands/TPM2_CreatePrimary.md
2021-06-04 14:46:46 -05:00

1.4 KiB

TPM2_CreatePrimary()

This command creates a primary key object.

The created object can then be loaded with TPM2_Load().

To decide whether to use TPM2_CreateLoaded(), TPM2_Create(), or TPM2_CreatePrimary() refer to table 28 in section 2.7 of the TCG TPM Library part 1: Architecture.

If you need to TPM2_CertifyCreation() that a TPM created some object, you must use TPM2_CreatePrimary() or TPM2_Create().

If you need to seal the object to a PCR selection, you must use TPM2_CreatePrimary() or TPM2_Create().

If you need to create a derived object, you must use TPM2_CreateLoaded().

Inputs

  • TPMI_RH_HIERARCHY+ primaryHandle
  • TPM2B_TEMPLATE inPublic
  • TPM2B_DATA outsideInfo
  • TPML_PCR_SELECTION creationPCR

Outputs (success case)

  • TPM_HANDLE objectHandle
  • TPM2B_CREATION_DATA creationData
  • TPM2B_DIGEST creationHash
  • TPMT_TK_CREATION creationTicket
  • TPM2B_NAME name

References