verify

package
v0.0.0-...-7d7216e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package verify holds helpers for validating the correctness of various artifacts and proofs used in the system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleConsistency

func BundleConsistency(pb api.ProofBundle, rc api.LogCheckpoint, cpFunc ConsistencyProofFunc, logSigVerifier note.Verifier) error

BundleConsistency verifies the log checkpoint in the bundle is consistent against a given checkpoint (e.g. one fetched from a witness).

func BundleForBoot

func BundleForBoot(bundleRaw, measurement []byte, logSigVerifier note.Verifier) error

BundleForBoot checks that the manifest, checkpoint, and proofs in a bundle are all self-consistent, and that the provided firmware measurement matches the one expected by the bundle.

func BundleForUpdate

func BundleForUpdate(bundleRaw, fwHash []byte, dc api.LogCheckpoint, cpFunc ConsistencyProofFunc, logSigVerifier note.Verifier) (api.ProofBundle, api.FirmwareMetadata, error)

BundleForUpdate checks that the manifest, checkpoint, and proofs in a raw bundle are all self-consistent, and that the provided firmware image hash matches the one in the bundle. It also checks consistency proof between update log point and device log point (for non zero device tree size). Upon successful verification returns a proof bundle

Types

type ConsistencyProofFunc

type ConsistencyProofFunc func(from, to uint64) ([][]byte, error)

ConsistencyProofFunc is a function which returns a consistency proof between two tree sizes.

Jump to

Keyboard shortcuts

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