arm

package
v0.0.0-...-4e66fdd Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterRefVal

func FilterRefVal(endorsements []handler.Endorsement, key string) []handler.Endorsement

func GetPublicKeyFromTA

func GetPublicKeyFromTA(scheme string, trustAnchor string) (crypto.PublicKey, error)

func GetTrustAnchorID

func GetTrustAnchorID(scheme string, token *proto.AttestationToken) (string, error)

func MatchPlatformConfig

func MatchPlatformConfig(scheme string, evidence psatoken.IClaims, endorsements []handler.Endorsement) bool

func MatchSoftware

func MatchSoftware(scheme string, evidence psatoken.IClaims, endorsements []handler.Endorsement) bool

func MustImplIDString

func MustImplIDString(c psatoken.IClaims) string

func MustInstIDString

func MustInstIDString(c psatoken.IClaims) string

func RefValLookupKey

func RefValLookupKey(schemeName, tenantID, implID string) string

func SynthKeysFromRefValue

func SynthKeysFromRefValue(scheme string, tenantID string,
	refVal *handler.Endorsement,
) ([]string, error)

func SynthKeysFromTrustAnchors

func SynthKeysFromTrustAnchors(scheme string, tenantID string,
	ta *handler.Endorsement,
) ([]string, error)

func TaLookupKey

func TaLookupKey(schemeName, tenantID, implID, instID string) string

Types

type CCAPlatformConfigID

type CCAPlatformConfigID struct {
	Label string
	Value []byte
}

func (*CCAPlatformConfigID) FromMeasurement

func (o *CCAPlatformConfigID) FromMeasurement(m comid.Measurement) error

func (CCAPlatformConfigID) GetRefValType

func (o CCAPlatformConfigID) GetRefValType() string

func (CCAPlatformConfigID) MakeRefAttrs

func (o CCAPlatformConfigID) MakeRefAttrs(c ClassAttributes, scheme string) (json.RawMessage, error)

For CCAPlatformConfigID object, scheme argument is not strictly required, but is required for other usage of the same interface

type CcaPlatformCfg

type CcaPlatformCfg struct {
	ImplID []byte `cca:"CCA_SSD_PLATFORM.impl-id" parcca:"PARSEC_CCA.impl-id"`
	Model  string `cca:"CCA_SSD_PLATFORM.hw-model" parcca:"PARSEC_CCA.hw-model"`
	Vendor string `cca:"CCA_SSD_PLATFORM.hw-vendor" parcca:"PARSEC_CCA.hw-vendor"`
	Label  string `cca:"CCA_SSD_PLATFORM.platform-config-label" parcca:"PARSEC_CCA.platform-config-label"`
	Value  []byte `cca:"CCA_SSD_PLATFORM.platform-config-id" parcca:"PARSEC_CCA.platform-config-id"`
}

type ClassAttributes

type ClassAttributes struct {
	ImplID []byte
	Vendor string
	Model  string
}

func (*ClassAttributes) FromEnvironment

func (o *ClassAttributes) FromEnvironment(e comid.Environment) error

extract mandatory ImplID and optional vendor & model

type Extractor

type Extractor struct {
	Scheme string
}

func (Extractor) RefValExtractor

func (o Extractor) RefValExtractor(rv comid.ReferenceValue) ([]*handler.Endorsement, error)

func (Extractor) TaExtractor

func (o Extractor) TaExtractor(avk comid.AttestVerifKey) (*handler.Endorsement, error)

type InstanceAttributes

type InstanceAttributes struct {
	InstID eat.UEID
}

func (*InstanceAttributes) FromEnvironment

func (o *InstanceAttributes) FromEnvironment(e comid.Environment) error

type MeasurementExtractor

type MeasurementExtractor interface {
	FromMeasurement(comid.Measurement) error
	GetRefValType() string
	// MakeRefAttrs is an interface method to populate reference attributes.
	MakeRefAttrs(ClassAttributes, string) (json.RawMessage, error)
}

MeasurementExtractor is an interface to extract measurements from comid to construct Reference Value Endorsements using Reference Value type

type SwAttr

type SwAttr struct {
	ImplID           []byte `cca:"CCA_SSD_PLATFORM.impl-id" psa:"PSA_IOT.impl-id" parcca:"PARSEC_CCA.impl-id"`
	Model            string `cca:"CCA_SSD_PLATFORM.hw-model" psa:"PSA_IOT.hw-model" parcca:"PARSEC_CCA.hw-model"`
	Vendor           string `cca:"CCA_SSD_PLATFORM.hw-vendor" psa:"PSA_IOT.hw-vendor" parcca:"PARSEC_CCA.hw-vendor"`
	MeasDesc         string `cca:"CCA_SSD_PLATFORM.measurement-desc" psa:"PSA_IOT.measurement-desc" parcca:"PARSEC_CCA.measurement-desc"`
	MeasurementType  string `cca:"CCA_SSD_PLATFORM.measurement-type" psa:"PSA_IOT.measurement-type" parcca:"PARSEC_CCA.measurement-type"`
	MeasurementValue []byte `cca:"CCA_SSD_PLATFORM.measurement-value" psa:"PSA_IOT.measurement-value" parcca:"PARSEC_CCA.measurement-value"`
	SignerID         []byte `cca:"CCA_SSD_PLATFORM.signer-id" psa:"PSA_IOT.signer-id" parcca:"PARSEC_CCA.signer-id"`
	Version          string `cca:"CCA_SSD_PLATFORM.version" psa:"PSA_IOT.version" parcca:"PARSEC_CCA.version"`
}

type SwCompAttributes

type SwCompAttributes struct {
	MeasurementType  string
	Version          string
	SignerID         []byte
	AlgID            string
	MeasurementValue []byte
}

func (*SwCompAttributes) FromMeasurement

func (o *SwCompAttributes) FromMeasurement(m comid.Measurement) error

func (SwCompAttributes) GetRefValType

func (o SwCompAttributes) GetRefValType() string

func (*SwCompAttributes) MakeRefAttrs

func (o *SwCompAttributes) MakeRefAttrs(c ClassAttributes, scheme string) (json.RawMessage, error)

type TaAttr

type TaAttr struct {
	Model    string `cca:"CCA_SSD_PLATFORM.hw-model" psa:"PSA_IOT.hw-model" parcca:"PARSEC_CCA.hw-model"`
	Vendor   string `cca:"CCA_SSD_PLATFORM.hw-vendor" psa:"PSA_IOT.hw-vendor" parcca:"PARSEC_CCA.hw-vendor"`
	VerifKey string `cca:"CCA_SSD_PLATFORM.iak-pub" psa:"PSA_IOT.iak-pub" parcca:"PARSEC_CCA.iak-pub"`
	ImplID   []byte `cca:"CCA_SSD_PLATFORM.impl-id" psa:"PSA_IOT.impl-id" parcca:"PARSEC_CCA.impl-id"`
	InstID   string `cca:"CCA_SSD_PLATFORM.inst-id" psa:"PSA_IOT.inst-id" parcca:"PARSEC_CCA.inst-id"`
}

Jump to

Keyboard shortcuts

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