dcap

package
v0.2.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEETypeSGX = 0
	QEVersion3 = 3
)

Variables

This section is empty.

Functions

func GetAllowDebugEnclaves

func GetAllowDebugEnclaves() bool

func GetAttributesFromSgxReport

func GetAttributesFromSgxReport(report *pcs.SgxReport) (*sgx.Attributes, error)

func GetSgxReportFromQuote

func GetSgxReportFromQuote(quote *pcs.Quote) (*pcs.SgxReport, error)

func HashTrustRootCert

func HashTrustRootCert() [32]byte

func ParseQuote

func ParseQuote(raw []byte) (*pcs.Quote, error)

func SetAllowDebugEnclaves

func SetAllowDebugEnclaves()

func UnsetAllowDebugEnclaves

func UnsetAllowDebugEnclaves()

Types

type QuoteBody

type QuoteBody = pcs.SgxReport

type QuoteVerificationOutput

type QuoteVerificationOutput struct {
	Version                    uint16
	QuoteVersion               uint16
	TeeType                    uint32
	TcbStatus                  TCBStatus
	MinTCBEvaluationDataNumber uint32
	Fmspc                      [6]byte
	SGXIntelRootCAHash         [32]byte
	Validity                   ValidityIntersection
	QuoteBody                  QuoteBody
	AdvisoryIds                []string
}

func ParseQuoteVerificationOutput

func ParseQuoteVerificationOutput(raw []byte) (*QuoteVerificationOutput, error)

func (QuoteVerificationOutput) Digest

func (vo QuoteVerificationOutput) Digest() [32]byte

func (QuoteVerificationOutput) GetEnclaveIdentity

func (vo QuoteVerificationOutput) GetEnclaveIdentity() sgx.EnclaveIdentity

func (QuoteVerificationOutput) IsDebug

func (vo QuoteVerificationOutput) IsDebug() (bool, error)

func (QuoteVerificationOutput) ReportData

func (vo QuoteVerificationOutput) ReportData() []byte

func (*QuoteVerificationOutput) ToBytes

func (o *QuoteVerificationOutput) ToBytes() []byte

func (QuoteVerificationOutput) ValidityNotAfter

func (vo QuoteVerificationOutput) ValidityNotAfter() time.Time

type TCBStatus

type TCBStatus uint8
const (
	UpToDate TCBStatus = iota
	OutOfDate
	Revoked
	ConfigurationNeeded
	OutOfDateConfigurationNeeded
	SWHardeningNeeded
	ConfigurationAndSWHardeningNeeded
)

func TCBStatusFromString

func TCBStatusFromString(s string) TCBStatus

func (TCBStatus) AsUint8

func (s TCBStatus) AsUint8() uint8

func (TCBStatus) String

func (s TCBStatus) String() string

type ValidityIntersection

type ValidityIntersection struct {
	NotBeforeMax uint64
	NotAfterMin  uint64
}

TCBStatus represents the status of the TCB.

func (ValidityIntersection) ValidateTime

func (vi ValidityIntersection) ValidateTime(tm time.Time) bool

type ZKDCAPVerifierInfo

type ZKDCAPVerifierInfo struct {
	ZKVMType ZKVMType
	// contains filtered or unexported fields
}

func ParseZKDCAPVerifierInfo

func ParseZKDCAPVerifierInfo(raw []byte) (*ZKDCAPVerifierInfo, error)

func (*ZKDCAPVerifierInfo) GetRISC0ImageID

func (vi *ZKDCAPVerifierInfo) GetRISC0ImageID() ([32]byte, error)

func (*ZKDCAPVerifierInfo) IsRISC0

func (vi *ZKDCAPVerifierInfo) IsRISC0() bool

func (*ZKDCAPVerifierInfo) ToBytes

func (vi *ZKDCAPVerifierInfo) ToBytes() []byte

type ZKVMType

type ZKVMType uint8
const (
	DCAPQuoteVerifierVersion = 0

	UnspecifiedZKVMType ZKVMType = 0
	Risc0ZKVMType       ZKVMType = 1
)

func (ZKVMType) String

func (t ZKVMType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL