tdx

package
v0.0.0-...-264fa3d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package tdx implements launch measurement reconstruction given a few inputs such as firmware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MRTD

func MRTD(opts *LaunchOptions, fw []byte) ([48]byte, error)

MRTD returns the expected MRTD from booting a given OVMF and Google Compute Engine configuration.

func UnsignedTDX

func UnsignedTDX(uefi []byte, tdxRequest *EndorsementRequest) (*epb.VMTdx, error)

UnsignedTDX returns the TDX component of a GoldenMeasurement for a given UEFI.

Types

type EndorsementRequest

type EndorsementRequest struct {
	// Svn is the image's security version number.
	Svn uint32
	// IncludeEarlyAccept if true adds a second set of measurements where all memory is accepted
	// and therefore has different measured resource attributes.
	IncludeEarlyAccept bool
	// The list of machine shapes whose configuration is relevant to measurement.
	MachineShapes []string
}

EndorsementRequest encapsulates all Intel TDX-specific information needed to endorse a UEFI binary for TDX.

type LaunchOptions

type LaunchOptions struct {
	GuestRAMBanks           []ovmf.GuestPhysicalRegion
	DisableUnacceptedMemory bool
}

LaunchOptions contains GCE API surface options for launching a TDX VM that translate into the relevant memory bank topology for measurement.

func LaunchOptionsDefault

func LaunchOptionsDefault(machineType string) *LaunchOptions

LaunchOptionsDefault returns a default LaunchOptions instance.

type Measurement

type Measurement struct {
	// contains filtered or unexported fields
}

Measurement represents the expected MRTD field of a TDX Quote.

func NewMeasurement

func NewMeasurement() *Measurement

NewMeasurement returns a new Measurement construct for calculating the TDX MRTD.

func (*Measurement) Finalize

func (m *Measurement) Finalize() [48]byte

Finalize returns the final measurement of the VM.

func (*Measurement) InitMemoryRegion

func (m *Measurement) InitMemoryRegion(region *ovmf.MaterialGuestPhysicalRegion) error

InitMemoryRegion extends a Measurement with the initial contents of a page.

Jump to

Keyboard shortcuts

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