crypto

package
v0.0.0-...-b06188c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestVendorRSAPriv stores a TEST/DEMO key for signing firmware metadata.
	TestVendorRSAPriv = `` /* 1679-byte string literal not displayed */

	// TestVendorRSAPub stores a TEST/DEMO key for verifying signatures on firmware metadata.
	TestVendorRSAPub = `` /* 426-byte string literal not displayed */

	// TestFTPersonalityPriv stores a TEST/DEMO key used to sign the personality checkpoints.
	TestFTPersonalityPriv = "PRIVATE+KEY+ft_personality+e8a242bd+ATWzA37YLiAsXuDHcPJtQRUye7xPhKGIUrZuNznGZDox"

	// TestFTPersonalityPub is the TEST/DEMO key used to verify signatures on the personality checkpoints.
	TestFTPersonalityPub = "ft_personality+e8a242bd+Aet8wMj2c6gk0hN/Ah7EfkSJWXWRg1JizEjkPnAWYpLY"

	// TestAnnotationPriv is the TEST/DEMO key used to signed annotations.
	TestAnnotationPriv = `` /* 1674-byte string literal not displayed */

	// TestAnnotationPub is the TEST/DEMO key used to verify annotation signatures.
	TestAnnotationPub = `` /* 425-byte string literal not displayed */

)

Variables

View Source
var (
	// Publisher makes statements containing the firmware metadata.
	Publisher = Claimant{
				// contains filtered or unexported fields
	}

	// AnnotatorMalware makes annotation statements about malware in firmware.
	AnnotatorMalware = Claimant{
						// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Claimant

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

Claimant is someone that makes statements, and can sign and verify them.

func ClaimantForType

func ClaimantForType(t api.StatementType) (*Claimant, error)

ClaimantForType returns the relevant Claimant for the given Statement type.

func (*Claimant) SignMessage

func (c *Claimant) SignMessage(stype api.StatementType, msg []byte) ([]byte, error)

SignMessage is used to sign the Statement

func (*Claimant) VerifySignature

func (c *Claimant) VerifySignature(stype api.StatementType, stmt []byte, signature []byte) error

VerifySignature is used to verify the incoming message

Jump to

Keyboard shortcuts

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