Documentation
¶
Index ¶
- Constants
- func GetReportInByte(userData []byte) (report []byte, err error)
- func GetSealingKey() (sealingkey string, err error)
- func MarshalCsvAttestationReport(d *CSVAttestationReport) ([]byte, error)
- type CSVAttestationReport
- type CSVAttestationUserData
- type CSV_CERT_t
- type Collector
- type CsvGuestMem
- type HashBlockT
- type HashBlockU
- type HigonCsvCert
- type ReportDetailInfo
Constants ¶
View Source
const CSV_CERT_RSVD3_SIZE = 624
View Source
const CSV_CERT_RSVD4_SIZE = 368
View Source
const CSV_CERT_RSVD5_SIZE = 368
View Source
const ECC_POINT_SIZE = 72
View Source
const GUEST_ATTESTATION_DATA_SIZE = 64
View Source
const GUEST_ATTESTATION_NONCE_SIZE = 16
https://gitee.com/anolis/hygon-devkit/blob/master/csv/attestation/csv_status.h
View Source
const HASH_BLOCK_LEN = 32
View Source
const HIGON_USER_ID_SIZE = 256
View Source
const PAGE_SIZE = 1 << 12
View Source
const SIZE_INT32 = 4
View Source
const SN_LEN = 64
View Source
const USER_DATA_SIZE = 64
View Source
const VM_ID_SIZE = 16
View Source
const VM_VERSION_SIZE = 16
Variables ¶
This section is empty.
Functions ¶
func GetReportInByte ¶
func GetSealingKey ¶
func MarshalCsvAttestationReport ¶
func MarshalCsvAttestationReport(d *CSVAttestationReport) ([]byte, error)
将结构体编码为二进制数据
Types ¶
type CSVAttestationReport ¶
type CSVAttestationReport struct {
UserPubkeyDigest HashBlockT
VmId [VM_ID_SIZE]byte
VmVersion [VM_VERSION_SIZE]byte
UserData [USER_DATA_SIZE]byte
Mnonce [GUEST_ATTESTATION_NONCE_SIZE]byte
Measure HashBlockT
Policy uint32
SigUsage uint32
SigAlgo uint32
Anonce uint32
Sig1 [ECC_POINT_SIZE * 2 / SIZE_INT32]uint32
PekCert CSV_CERT_t
Sn [SN_LEN]byte
Reserved2 [32]byte
Mac HashBlockU
}
func GetCSVAttestationReport ¶
func GetCSVAttestationReport(userData []byte) (*CSVAttestationReport, error)
func UnmarshalCsvAttestationReport ¶
func UnmarshalCsvAttestationReport(report []byte) (*CSVAttestationReport, error)
type CSVAttestationUserData ¶
type CSVAttestationUserData struct {
Data [GUEST_ATTESTATION_DATA_SIZE]byte
Mnonce [GUEST_ATTESTATION_NONCE_SIZE]byte
Hash HashBlockU
}
type CSV_CERT_t ¶
type CSV_CERT_t = HigonCsvCert
type Collector ¶
type Collector struct {
}
func NewCollector ¶
func NewCollector() *Collector
func (*Collector) CollectEvidence ¶
func (c *Collector) CollectEvidence(reportData []byte) (*collectors.Evidence, error)
type CsvGuestMem ¶
type HashBlockT ¶
type HashBlockT [HASH_BLOCK_LEN]byte
type HashBlockU ¶
type HashBlockU [HASH_BLOCK_LEN]byte
type HigonCsvCert ¶
type HigonCsvCert struct {
Version uint32
APIMajor byte
APIMinor byte
Reserved1 byte
Reserved2 byte
PubkeyUsage uint32
PubkeyAlgo uint32
Pubkey [SIZE_INT32 + ECC_POINT_SIZE*2 + HIGON_USER_ID_SIZE]byte
Reserved3 [CSV_CERT_RSVD3_SIZE]byte
Sig1Usage uint32
Sig1Algo uint32
Sig1 [ECC_POINT_SIZE * 2]byte
Reserved4 [CSV_CERT_RSVD4_SIZE]byte
Sig2Usage uint32
Sig2Algo uint32
Sig2 [ECC_POINT_SIZE * 2]byte
Reserved5 [CSV_CERT_RSVD5_SIZE]byte
}
type ReportDetailInfo ¶
type ReportDetailInfo struct {
UserData string `json:"userData"`
Monce string `json:"monce"`
Measure string `json:"measure"`
VMId string `json:"vmId"`
VMVersion string `json:"vmVersion"`
ChipId string `json:"chipId"`
FullReport string `json:"fullReport"`
}
func GetReportDetailInfo ¶
func GetReportDetailInfo(report []byte) (*ReportDetailInfo, error)
Click to show internal directories.
Click to hide internal directories.