virtcca

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CHALLENGE_SIZE = 64
View Source
const GRANULE_SIZE = 4096
View Source
const MAX_DEV_CERT_SIZE = 4096
View Source
const MAX_MEASUREMENT_SIZE = SHA512_SIZE

* Size in bytes of the largest measurement type that can be supported. * This constant needs to be updated accordingly if new algorithms are supported.

View Source
const MAX_TOKEN_GRANULE_COUNT = 2
View Source
const SHA256_SIZE = 32

Size in bytes of the SHA256 measurement

View Source
const SHA512_SIZE = 64

Size in bytes of the SHA512 measurement

View Source
const TSI_DEV = "/dev/tsi"
View Source
const TSI_MAGIC = 'T'

Variables

View Source
var TMM_GET_ATTESTATION_TOKEN = ioctl.IOWR(TSI_MAGIC, 1, 8264)
View Source
var TMM_GET_DEV_CERT = ioctl.IOR(TSI_MAGIC, 2, 4104)
View Source
var TMM_GET_TSI_VERSION = ioctl.IOR(TSI_MAGIC, 0, 8)

Ioctl commands

Functions

func GetAttestationToken

func GetAttestationToken(challenge []byte) ([]byte, error)

func GetDevCert

func GetDevCert() ([]byte, error)

Types

type CCADevCert

type CCADevCert struct {
	Size  uint64
	Value [MAX_DEV_CERT_SIZE]byte
}

type CVMAttestationCmd

type CVMAttestationCmd struct {
	Challenge [CHALLENGE_SIZE]byte // input: challenge value
	Token     [GRANULE_SIZE * MAX_TOKEN_GRANULE_COUNT]byte
	TokenSize uint64 // return: token size
}

type CVMMeasurement

type CVMMeasurement struct {
	Index int32
	Value [MAX_MEASUREMENT_SIZE]byte
}

type CVMTSIVersion

type CVMTSIVersion struct {
	Major int32
	Minor int32
}

func GetVersion

func GetVersion() (*CVMTSIVersion, error)

type Collector

type Collector struct {
}

func NewCollector

func NewCollector() *Collector

func (*Collector) CollectEvidence

func (c *Collector) CollectEvidence(userdata []byte) (*collectors.Evidence, error)

func (*Collector) Name

func (c *Collector) Name() string

Jump to

Keyboard shortcuts

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