Skip to main content

Crate tss_keyfile

Crate tss_keyfile 

Source
Expand description

All TPM 2.0 keys consist of two binary pieces, a public part, which can be parsed according to the TPM specification for TPM2B_PUBLIC [TPM2.0] and a private part, which is cryptographically sealed in such a way as to be only readable on the TPM that created it.

Structs§

RasnDecodeError
An error type for failed decoding for every decoder. Abstracts over the different generic and codec-specific errors.
RasnEncodeError
An error type for failed encoding for every encoder. Abstracts over the different generic and codec-specific errors.
TPMAuthPolicy
TPMKey
The design of the TPMkey ASN.1 format is that it should have a distinguishing OID at the beginning so the DER form of the key can be easily recognized. In PEM form, the key MUST have the following PEM guards: “—–BEGIN TSS2 PRIVATE KEY—–” and “—–END TSS2 PRIVATE KEY—–”
TPMKeyType
TPM Key Type (OID encoding)
TPMPolicy

Enums§

Error
PemError
PEM errors.

Constants§

OID_TPMKEY_IMPORTABLE
A TPM importable key, to be imported with TPM2_Import
OID_TPMKEY_LOADABLE
A TPM loadable key, to be loaded with TPM2_Load
OID_TPMKEY_SEALED
A sealed data key, to be extracted with TPM2_Unseal

Functions§

checked_pem_to_der
decode PEM, check label, return copy as DER