tdx

package
v2.16.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package TDX implements attestation for Intel TDX.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available returns true if the TDX device is available and can be opened.

func GetSelectedMeasurements

func GetSelectedMeasurements(open OpenFunc, selection []int) (measurements.M, error)

GetSelectedMeasurements returns the selected measurements from the RTMRs.

Types

type Device

type Device interface {
	io.ReadWriteCloser
	Fd() uintptr
}

Device is an interface for a TDX device.

func IsTDXDevice

func IsTDXDevice(device io.ReadWriteCloser) (Device, bool)

IsTDXDevice checks if the given device is a TDX guest device.

func Open

func Open() (Device, error)

Open opens the TDX guest device.

type Issuer

type Issuer struct {
	variant.QEMUTDX
	// contains filtered or unexported fields
}

Issuer is the TDX attestation issuer.

func NewIssuer

func NewIssuer(log attestation.Logger) *Issuer

NewIssuer initializes a new TDX Issuer.

func (*Issuer) Issue

func (i *Issuer) Issue(_ context.Context, userData []byte, nonce []byte) (attDoc []byte, err error)

Issue issues a TDX attestation document.

type OpenFunc

type OpenFunc func() (Device, error)

OpenFunc is a function that opens the TDX device.

type Validator

type Validator struct {
	variant.QEMUTDX
	// contains filtered or unexported fields
}

Validator is the TDX attestation validator.

func NewValidator

func NewValidator(cfg *config.QEMUTDX, log attestation.Logger) *Validator

NewValidator initializes a new TDX Validator.

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, attDocRaw []byte, nonce []byte) (userData []byte, err error)

Validate validates the given attestation document using TDX attestation.

Jump to

Keyboard shortcuts

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