verification

package
v0.0.0-...-7e58823 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SGX_PAGE_TYPE_SECS = iota
	SGX_PAGE_TYPE_TCS
	SGX_PAGE_TYPE_REG
	SGX_PAGE_TYPE_VA
	SGX_PAGE_TYPE_TRIM
)
View Source
const (
	SGX_SECINFO_R    uint64 = 1
	SGX_SECINFO_W    uint64 = 2
	SGX_SECINFO_X    uint64 = 4
	SGX_SECINFO_SECS uint64 = (SGX_PAGE_TYPE_SECS << 8) //0x000
	SGX_SECINFO_TCS  uint64 = (SGX_PAGE_TYPE_TCS << 8)  //0x100
	SGX_SECINFO_REG  uint64 = (SGX_PAGE_TYPE_REG << 8)  //0x200
	SGX_SECINFO_VA   uint64 = (SGX_PAGE_TYPE_VA << 8)
	SGX_SECINFO_TRIM uint64 = (SGX_PAGE_TYPE_TRIM << 8)
)
View Source
const (
	MRECREATE = 0x0045544145524345
	MREADD    = 0x0000000044444145
	MREEXTEND = 0x00444E4554584545
)
View Source
const (
	MRENCLAVE_HASH_SIZE = 32
	STD_PAGE_SIZE       = 0x1000
	SIGSTRUCT_SIZE      = 1808
)

Variables

This section is empty.

Functions

func GoMemSet

func GoMemSet(s unsafe.Pointer, c byte, n uint)

func Measure_Encl

func Measure_Encl(path string, mrenclave unsafe.Pointer, maxmapsize uint64) bool

func MovePointer

func MovePointer(s unsafe.Pointer, n uint) (p unsafe.Pointer)

func Mrenclave_Verify

func Mrenclave_Verify(targetmrenclave unsafe.Pointer, newmrenclave unsafe.Pointer) bool

func Mrenclave_VerifybySigstruct

func Mrenclave_VerifybySigstruct(sigstruct string, newmrenclave unsafe.Pointer) bool

Types

type SgxTCS

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

type SigStruct

type SigStruct struct {
	Header     [16]byte `struct:"[16]byte"`
	Vendor     uint32   `struct:"uint32,little"`
	BuildYear  uint16   `struct:"uint16,little"`
	BuildMonth uint8    `struct:"uint8"`
	BuildDay   uint8    `struct:"uint8"`
	Header2    [16]byte `struct:"[16]byte"`
	SwDefined  uint32   `struct:"uint32,little"`

	Modulus    [384]byte `struct:"[384]byte"`
	Exponent   uint32    `struct:"uint32,little"`
	Signature  [384]byte `struct:"[384]byte"`
	MiscSelect uint32    `struct:"uint32,little"`
	MiscMask   uint32    `struct:"uint32,little"`

	ISVFamilyId    [16]byte `struct:"[16]byte"`
	Attributes     [16]byte `struct:"[16]byte"`
	AttributesMask [16]byte `struct:"[16]byte"`
	EnclaveHash    [32]byte `struct:"[32]byte"`

	ISVExtProdId [16]byte `struct:"[16]byte"`
	ISVProdId    uint16   `struct:"uint16,little"`
	ISVSvn       uint16   `struct:"uint16,little"`

	Q1 [384]byte `struct:"[384]byte"`
	Q2 [384]byte `struct:"[384]byte"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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