Versions in this module Expand all Collapse all v0 v0.5.0 Oct 5, 2026 v0.4.0 Sep 29, 2026 v0.3.0 Jun 14, 2026 Changes in this version + type MemPendingStore struct + func NewMemPendingStore() *MemPendingStore + func (m *MemPendingStore) PutEnroll(akName, secret []byte) error + func (m *MemPendingStore) PutNonce(akName []byte, nonce []byte) error + func (m *MemPendingStore) TakeEnroll(akName []byte) ([]byte, bool) + func (m *MemPendingStore) TakeNonce(akName []byte) ([]byte, bool) + type PendingStore interface + PutEnroll func(akName, secret []byte) error + PutNonce func(akName []byte, nonce []byte) error + TakeEnroll func(akName []byte) (secret []byte, ok bool) + TakeNonce func(akName []byte) (nonce []byte, ok bool) type Verifier + func NewVerifierWithStore(registry EKRegistry, policy Policy, nonce Nonce, store PendingStore) *Verifier v0.2.2 Jun 14, 2026 v0.2.1 Jun 14, 2026 v0.2.0 Jun 14, 2026 Changes in this version + const ErrBadSpecID + const ErrEventLogMismatch + const ErrMalformedLog + const ErrUnapprovedMeasurement + const ErrUnknownDigestAlg + func ReplayPCRs(events []Event, alg uint16) (map[int][]byte, error) + type Event struct + Data []byte + Digests map[uint16][]byte + PCR int + Type uint32 + func ParseEventLog(log []byte) ([]Event, error) type EventLogPolicy + func NewEventLogPolicy() *EventLogPolicy + func (p *EventLogPolicy) AllowMeasurement(pcr int, digest []byte) *EventLogPolicy + func (p *EventLogPolicy) Matches(pcrs map[int][]byte, eventLog []byte) error + func (p *EventLogPolicy) RestrictPCRs(pcrs ...int) *EventLogPolicy + type LogBuilder struct + func NewLogBuilder() *LogBuilder + func (b *LogBuilder) Add(pcr int, etype uint32, sha256Digest, data []byte) *LogBuilder + func (b *LogBuilder) Bytes() []byte + type UnapprovedMeasurementError struct + Digest []byte + EventType uint32 + PCR int + func (e *UnapprovedMeasurementError) Error() string + func (e *UnapprovedMeasurementError) Is(target error) bool v0.1.0 Jun 13, 2026 Changes in this version + const ErrActivationFailed + const ErrBadMagic + const ErrBadPublic + const ErrBadVersion + const ErrMalformedQuote + const ErrPCRDigestMismatch + const ErrQuoteSignature + const ErrShortBuffer + const ErrStaleNonce + const ErrTrailingBytes + const ErrUnboundAK + const ErrUnknownEK + const ErrUntrustedBoot + const ErrWrongKind + func JoinSignature(sig tpm2.ECDSASignature) []byte + func RandNonce() ([32]byte, error) + type AdmissionChallenge struct + Nonce [32]byte + func (m *AdmissionChallenge) Unmarshal(buf []byte) error + func (m AdmissionChallenge) Marshal() []byte + type AdmissionRequest struct + AKName []byte + func (m *AdmissionRequest) Unmarshal(buf []byte) error + func (m AdmissionRequest) Marshal() []byte + type AdmissionResponse struct + EventLog []byte + PCRs map[int][]byte + Quoted []byte + Signature []byte + func (m *AdmissionResponse) Unmarshal(buf []byte) error + func (m AdmissionResponse) Marshal() []byte + type EKRegistry interface + AKPub func(akName []byte) (akPub []byte, ok bool) + BindAK func(akName, akPub []byte) error + Trusted func(ekPub []byte) bool + type EnrollChallenge struct + CredentialBlob []byte + Secret []byte + func (m *EnrollChallenge) Unmarshal(buf []byte) error + func (m EnrollChallenge) Marshal() []byte + type EnrollProof struct + ActivationSecret []byte + func (m *EnrollProof) Unmarshal(buf []byte) error + func (m EnrollProof) Marshal() []byte + type EnrollRequest struct + AKName []byte + AKPub []byte + EKCert []byte + EKPub []byte + func (m *EnrollRequest) Unmarshal(buf []byte) error + func (m EnrollRequest) Marshal() []byte + type EventLogPolicy interface + Replay func(eventLog []byte, pcrs map[int][]byte) error + type GoldenPolicy map[int][]byte + func (g GoldenPolicy) Matches(pcrs map[int][]byte) error + type MemRegistry struct + func NewMemRegistry() *MemRegistry + func (r *MemRegistry) AKPub(akName []byte) ([]byte, bool) + func (r *MemRegistry) BindAK(akName, akPub []byte) error + func (r *MemRegistry) TrustEK(ekPub []byte) + func (r *MemRegistry) Trusted(ekPub []byte) bool + type Node struct + func FromHandles(tpm *tpm2.TPM, ekHandle uint32, ekPub []byte, akHandle uint32, ...) (*Node, error) + func NewNode(tpm *tpm2.TPM, pcrSel []tpm2.PCRSelection) (*Node, error) + func (n *Node) AKName() []byte + func (n *Node) AdmissionRequest() AdmissionRequest + func (n *Node) EnrollRequest(ekCert []byte) EnrollRequest + func (n *Node) RespondAdmission(ch AdmissionChallenge) (AdmissionResponse, error) + func (n *Node) RespondEnroll(ch EnrollChallenge) (EnrollProof, error) + type Nonce func() ([32]byte, error) + type Policy interface + Matches func(pcrs map[int][]byte) error + type UntrustedBootError struct + PCR int + Reason string + func (e *UntrustedBootError) Error() string + func (e *UntrustedBootError) Is(target error) bool + type Verifier struct + func NewVerifier(registry EKRegistry, policy Policy, nonce Nonce) *Verifier + func (v *Verifier) Admit(akName []byte, resp AdmissionResponse) (bool, error) + func (v *Verifier) Challenge(req AdmissionRequest) (AdmissionChallenge, error) + func (v *Verifier) CompleteEnroll(akName []byte, proof EnrollProof) error + func (v *Verifier) Enroll(req EnrollRequest) (EnrollChallenge, error) + func (v *Verifier) SetPolicy(p Policy)