agent

package
v0.0.0-...-7306f8b Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetPublicKey(ctx context.Context) (crypto.PublicKey, error)
	GetVersion(ctx context.Context) (*Version, error)
	SendVKey(ctx context.Context, req *SendVKeyRequest) error
	SendUKey(ctx context.Context, req *SendUKeyRequest) error
	Verify(ctx context.Context, challenge string) (string, error)
	GetIntegrityQuote(ctx context.Context, nonce, mask string, partial bool, IMAMeasurmentListEntry uint) (*IntegrityQuote, error)
	GetIdentityQuote(ctx context.Context, nonce string) (*IdentityQuote, error)
}

func New

func New(ctx context.Context, httpClient *http.Client, agentURL string) (Client, error)

type IdentityQuote

type IdentityQuote struct {
	Quote         *Quote
	HashAlg       attestationv1alpha1.TPMHashAlg
	EncryptionAlg attestationv1alpha1.TPMEncryptionAlg
	SigningAlg    attestationv1alpha1.TPMSigningAlg
	PublicKey     crypto.PublicKey
	PublicKeyPEM  string
	BootTime      uint
}

type IntegrityQuote

type IntegrityQuote struct {
	Quote                   *Quote
	HashAlg                 attestationv1alpha1.TPMHashAlg
	EncryptionAlg           attestationv1alpha1.TPMEncryptionAlg
	SigningAlg              attestationv1alpha1.TPMSigningAlg
	PublicKey               crypto.PublicKey
	PublicKeyPEM            string
	BootTime                uint
	IMAMeasurementList      string
	IMAMeasurementListEntry uint
	MBMeasurementList       []byte
}

type Quote

type Quote struct {
	// TPMQuote holds TPMS_ATTEST data
	TPMQuote []byte
	// TPMSig holds TPMT_SIGNATURE data
	TPMSig []byte
	// TPMPCRs holds the TPM PCR data, can be more than just 8 PCRs. This is a data structure generated by tpm2_quote.
	TPMPCRs []byte
}

type SendUKeyRequest

type SendUKeyRequest struct {
	AuthTag      string `json:"auth_tag"`
	EncryptedKey []byte `json:"encrypted_key"`
	Payload      []byte `json:"payload"`
}

type SendVKeyRequest

type SendVKeyRequest struct {
	EncryptedKey []byte `json:"encrypted_key"`
}

type Version

type Version struct {
	SupportedVersion string `json:"supported_version"`
}

Jump to

Keyboard shortcuts

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