Documentation ¶
Index ¶
- Constants
- func DecCredAES(srcA, srcC, secret, iv []byte) ([]byte, []byte, error)
- func EncCredAES(srcA, srcC, secret, iv []byte) ([]byte, []byte, error)
- func MakeCred(aik *legacy.HashValue, pub crypto.PublicKey, symBlockSize int, secret []byte) ([]byte, []byte, error)
- type PublicParams
- type TPM
- func (tpm *TPM) ActivateCredential(ekHandle *tpm2.AuthHandle, srkHandle *tpm2.NamedHandle, ...) ([]byte, error)
- func (tpm *TPM) Close()
- func (tpm *TPM) Commit(handle *tpm2.AuthHandle, P1_ECP *FP256BN.ECP, S2_bytes []byte, P2 *FP256BN.ECP) (*tpm2.CommitResponse, *FP256BN.ECP, *FP256BN.ECP, *FP256BN.ECP, error)
- func (tpm *TPM) CreateKey() (*tpm2.AuthHandle, *tpm2.AuthHandle, *tpm2.NamedHandle, *tpm2.TPM2BPublic, ...)
- func (tpm *TPM) ReadEKCert() (*x509.Certificate, error)
- func (tpm *TPM) Sign(digest []byte, count uint16, handle *tpm2.AuthHandle) (*tpm2.SignResponse, *FP256BN.BIG, *FP256BN.BIG, error)
Constants ¶
View Source
const EK_CERT_INDEX = 0x01C00002
View Source
const TPM_PATH = "/dev/tpm0"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PublicParams ¶
type PublicParams struct {
// contains filtered or unexported fields
}
type TPM ¶
type TPM struct {
// contains filtered or unexported fields
}
func (*TPM) ActivateCredential ¶
func (tpm *TPM) ActivateCredential(ekHandle *tpm2.AuthHandle, srkHandle *tpm2.NamedHandle, idObject, wrappedCredential []byte) ([]byte, error)
func (*TPM) CreateKey ¶
func (tpm *TPM) CreateKey() (*tpm2.AuthHandle, *tpm2.AuthHandle, *tpm2.NamedHandle, *tpm2.TPM2BPublic, error)
func (*TPM) ReadEKCert ¶
func (tpm *TPM) ReadEKCert() (*x509.Certificate, error)
Click to show internal directories.
Click to hide internal directories.