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 Property(conn io.ReadWriteCloser, prop uint32) (uint32, error)
- type Handle
- type SoftwareAnchor
- func (s *SoftwareAnchor) ActivateDeviceKey(cred api.EncryptedCredential, endorsementAuth string, auth string, ...) (string, error)
- func (s *SoftwareAnchor) AllPCRValues() (map[string]map[string]api.Buffer, 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, ...) (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) AllPCRValues() (map[string]map[string]api.Buffer, 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, ...) (api.Attest, api.Signature, error)
- func (a *TCGAnchor) ReadEKCertificate() (*x509.Certificate, error)
- type TCGHandle
- type TrustAnchor
Constants ¶
View Source
const SoftwareAnchorStateType = "software-anchor/1"
Variables ¶
View Source
var ErrInvalid = errors.New("invalid arg")
View Source
var StubIdentifier = "immune GmbH " + SoftwareAnchorStateType
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)
Types ¶
type Handle ¶
type Handle interface {
Flush(owner TrustAnchor)
}
type SoftwareAnchor ¶
type SoftwareAnchor struct {
// contains filtered or unexported fields
}
func (*SoftwareAnchor) ActivateDeviceKey ¶
func (*SoftwareAnchor) AllPCRValues ¶
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) AllPCRValues ¶
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) AllPCRValues() (map[string]map[string]api.Buffer, error) Quote(aikHandle Handle, aikAuth string, additional api.Buffer, banks []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 ¶
Click to show internal directories.
Click to hide internal directories.