Documentation ¶
Index ¶
- Constants
- Variables
- func CapabilityAlgorithms(conn io.ReadWriteCloser) (algs []tpm2.AlgorithmDescription, err error)
- func CapabilityPCRs(conn io.ReadWriteCloser) (pcrs []tpm2.PCRSelection, err error)
- func ComputeName(path ...interface{}) (tpm2.Name, error)
- func FlushTransientHandles(conn io.ReadWriteCloser) error
- func GenerateAuthValue() (string, error)
- func GetTPM2FamilyIndicator(conn io.ReadWriteCloser) (uint32, error)
- func NewSimulator() (io.ReadWriteCloser, error)
- func OpenTPM(tpmPath string) (io.ReadWriteCloser, error)
- func Property(conn io.ReadWriteCloser, prop uint32) (uint32, error)
- type Handle
- type Simulator
- type SoftwareAnchor
- func (s *SoftwareAnchor) ActivateDeviceKey(cred api.EncryptedCredential, endorsementAuth string, auth string, ...) (string, error)
- func (s *SoftwareAnchor) Close()
- func (s *SoftwareAnchor) CreateAndCertifyDeviceKey(rootHandle Handle, rootAuth string, template api.KeyTemplate, authValue string) (api.Key, api.Buffer, error)
- func (s *SoftwareAnchor) CreateAndLoadRoot(endorsementAuth string, rootAuth string, tmpl *api.PublicKey) (Handle, api.PublicKey, error)
- func (s *SoftwareAnchor) FlushAllHandles()
- func (s *SoftwareAnchor) GetEndorsementKey() (Handle, tpm2.Public, error)
- func (s *SoftwareAnchor) LoadDeviceKey(rootHandle Handle, rootAuth string, public api.PublicKey, private api.Buffer) (Handle, error)
- func (s *SoftwareAnchor) PCRValues(bank tpm2.Algorithm, pcrs []int) (map[string]api.Buffer, error)
- func (a *SoftwareAnchor) Quote(aikHandle Handle, aikAuth string, additional api.Buffer, bank tpm2.Algorithm, ...) (api.Attest, api.Signature, error)
- func (s *SoftwareAnchor) ReadEKCertificate() (*x509.Certificate, error)
- func (s *SoftwareAnchor) Store() (*state.StubState, error)
- type SoftwareHandle
- type TCGAnchor
- func (a *TCGAnchor) ActivateDeviceKey(cred api.EncryptedCredential, endorsementAuth string, auth string, ...) (string, error)
- func (a *TCGAnchor) Close()
- func (a *TCGAnchor) CreateAndCertifyDeviceKey(rootHandle Handle, rootAuth string, template api.KeyTemplate, authValue string) (api.Key, api.Buffer, error)
- func (a *TCGAnchor) CreateAndLoadRoot(endorsementAuth string, rootAuth string, tmpl *api.PublicKey) (Handle, api.PublicKey, error)
- func (a *TCGAnchor) FlushAllHandles()
- func (a *TCGAnchor) GetEndorsementKey() (Handle, tpm2.Public, error)
- func (a *TCGAnchor) LoadDeviceKey(rootHandle Handle, rootAuth string, public api.PublicKey, private api.Buffer) (Handle, error)
- func (a *TCGAnchor) PCRValues(bank tpm2.Algorithm, pcrsel []int) (map[string]api.Buffer, error)
- func (a *TCGAnchor) Quote(aikHandle Handle, aikAuth string, additional api.Buffer, bank tpm2.Algorithm, ...) (api.Attest, api.Signature, error)
- func (a *TCGAnchor) ReadEKCertificate() (*x509.Certificate, error)
- type TCGHandle
- type TrustAnchor
Constants ¶
View Source
const DefaultTPMDevice = "/dev/tpm0"
View Source
const (
SoftwareAnchorStateType = "software-anchor/1"
)
Variables ¶
View Source
var ErrInvalid = errors.New("invalid arg")
Functions ¶
func CapabilityAlgorithms ¶
func CapabilityAlgorithms(conn io.ReadWriteCloser) (algs []tpm2.AlgorithmDescription, err error)
func CapabilityPCRs ¶
func CapabilityPCRs(conn io.ReadWriteCloser) (pcrs []tpm2.PCRSelection, err error)
func ComputeName ¶
Comptes the TCG Name and Qualified Name of TPM 2.0 entities.
func FlushTransientHandles ¶
func FlushTransientHandles(conn io.ReadWriteCloser) error
func GenerateAuthValue ¶
Generates a string with at least 128 bits of entrophy
func GetTPM2FamilyIndicator ¶
func GetTPM2FamilyIndicator(conn io.ReadWriteCloser) (uint32, error)
func NewSimulator ¶
func NewSimulator() (io.ReadWriteCloser, error)
Types ¶
type Handle ¶
type Handle interface {
Flush(owner TrustAnchor)
}
type SoftwareAnchor ¶
type SoftwareAnchor struct {
// contains filtered or unexported fields
}
func (*SoftwareAnchor) ActivateDeviceKey ¶
func (*SoftwareAnchor) Close ¶
func (s *SoftwareAnchor) Close()
func (*SoftwareAnchor) CreateAndCertifyDeviceKey ¶
func (*SoftwareAnchor) CreateAndLoadRoot ¶
func (*SoftwareAnchor) FlushAllHandles ¶
func (s *SoftwareAnchor) FlushAllHandles()
func (*SoftwareAnchor) GetEndorsementKey ¶
func (s *SoftwareAnchor) GetEndorsementKey() (Handle, tpm2.Public, error)
func (*SoftwareAnchor) LoadDeviceKey ¶
func (*SoftwareAnchor) ReadEKCertificate ¶
func (s *SoftwareAnchor) ReadEKCertificate() (*x509.Certificate, error)
type SoftwareHandle ¶
type SoftwareHandle struct {
// contains filtered or unexported fields
}
func (*SoftwareHandle) Flush ¶
func (*SoftwareHandle) Flush(TrustAnchor)
type TCGAnchor ¶
type TCGAnchor struct {
Conn io.ReadWriteCloser
}
func (*TCGAnchor) ActivateDeviceKey ¶
func (*TCGAnchor) CreateAndCertifyDeviceKey ¶
func (a *TCGAnchor) CreateAndCertifyDeviceKey(rootHandle Handle, rootAuth string, template api.KeyTemplate, authValue string) (api.Key, api.Buffer, error)
Create and load a new key under `parent` based on `template`. Certifies the binding between outsideInfo and the key. "template" must allow signing.
func (*TCGAnchor) CreateAndLoadRoot ¶
func (a *TCGAnchor) CreateAndLoadRoot(endorsementAuth string, rootAuth string, tmpl *api.PublicKey) (Handle, api.PublicKey, error)
Expects Public and Auth to be set
func (*TCGAnchor) FlushAllHandles ¶
func (a *TCGAnchor) FlushAllHandles()
func (*TCGAnchor) GetEndorsementKey ¶
func (*TCGAnchor) LoadDeviceKey ¶
func (*TCGAnchor) ReadEKCertificate ¶
func (a *TCGAnchor) ReadEKCertificate() (*x509.Certificate, error)
type TrustAnchor ¶
type TrustAnchor interface { // Expects Public and Auth to be set CreateAndLoadRoot(endorsementAuth string, rootAuth string, tmpl *api.PublicKey) (Handle, api.PublicKey, error) // Create and load a new key under `parent` based on `template`. Certifies the // binding between outsideInfo and the key. "template" must allow signing. CreateAndCertifyDeviceKey(rootHandle Handle, rootAuth string, template api.KeyTemplate, authValue string) (api.Key, api.Buffer, error) LoadDeviceKey(rootHandle Handle, rootAuth string, public api.PublicKey, private api.Buffer) (Handle, error) ActivateDeviceKey(cred api.EncryptedCredential, endorsementAuth string, auth string, keyHandle Handle, ekHandle Handle, state *state.State) (string, error) ReadEKCertificate() (*x509.Certificate, error) GetEndorsementKey() (Handle, tpm2.Public, error) PCRValues(tpm2.Algorithm, []int) (map[string]api.Buffer, error) Quote(aikHandle Handle, aikAuth string, additional api.Buffer, bank tpm2.Algorithm, pcrs []int) (api.Attest, api.Signature, error) FlushAllHandles() Close() }
func LoadSoftwareAnchor ¶
func LoadSoftwareAnchor(state *state.StubState) (TrustAnchor, error)
func NewSoftwareAnchor ¶
func NewSoftwareAnchor() (TrustAnchor, error)
func NewTCGAnchor ¶
func NewTCGAnchor(conn io.ReadWriteCloser) TrustAnchor
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This package implements the Microsoft simulator TPM2 on SGX Transmission Interface The Microsoft simulator TPM Command Transmission Interface (TCTI) is a remote procedure interface donated to the TPM2 Specification by Microsoft.
|
This package implements the Microsoft simulator TPM2 on SGX Transmission Interface The Microsoft simulator TPM Command Transmission Interface (TCTI) is a remote procedure interface donated to the TPM2 Specification by Microsoft. |
Click to show internal directories.
Click to hide internal directories.