reproducepcr

package
v0.0.0-...-f44e450 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

ID represents the unique id of DiffMeasuredBoot analyzer

Variables

This section is empty.

Functions

func New

func New() analysis.Analyzer[Input]

New returns a new object of ReproducePCR analyzer

func NewExecutorInput

func NewExecutorInput(
	originalFirmware analysis.Blob,
	actualFirmware analysis.Blob,
	regs registers.Registers,
	tpm tpmdetection.Type,
	eventlog *tpmeventlog.TPMEventLog,
	enforcedMeasurementsFlow pcr.Flow,
	expectedPCR0 []byte,
) (analysis.Input, error)

NewExecutorInput builds an analysis.Executor's input required for ReproducePCR analyzer

Optional arguments: tpm, eventlog and enforcedMeasurementsFlow

Types

type ExpectedPCR0

type ExpectedPCR0 []byte

ExpectedPCR0 represents expected PCR0 value from the host

type Input

type Input struct {
	ReferenceFirmware  analysis.ReferenceFirmware
	ActualFirmwareBlob analysis.ActualFirmwareBlob
	ActualRegisters    analysis.ActualRegisters
	FixedRegisters     analysis.FixedRegisters
	BootFlow           types.BootFlow
	TPMEventLog        *tpmeventlog.TPMEventLog `exec:"optional"`
	ExpectedPCR0       ExpectedPCR0
}

Input describes the input data for the ReproducePCR analyzer

type ReproducePCR

type ReproducePCR struct{}

ReproducePCR is analyzer that tries to reproduce given PCR0 value

func (*ReproducePCR) Analyze

func (analyzer *ReproducePCR) Analyze(ctx context.Context, in Input) (*analysis.Report, error)

Analyze tries to reproduce ExpectedPCR0

TODO: redesign this function, this is an intermediate code while migrating from `pcr` to `bootflow`.

func (*ReproducePCR) ID

func (analyzer *ReproducePCR) ID() analysis.AnalyzerID

ID implements the ID method required for analysis.Analyzer

Directories

Path Synopsis
report

Jump to

Keyboard shortcuts

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