qcatools

package
v0.0.0-...-9b07614 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MulanPSL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// config info
	// ConfName means config file name
	ConfName = "config"
	// ConfExt means config file name suffix
	ConfExt = "yaml"

	// Server means qcaconfig server
	Server = "qcaconfig.server"
	// AKServer means qcaconfig akserver
	AKServer = "qcaconfig.akserver"
	// Scenario means qcaconfig scenario
	Scenario = "qcaconfig.scenario"
	// NoDaaACFile means qcaconfig nodaaacfile
	NoDaaACFile = "qcaconfig.nodaaacfile"
	// DaaACFile means qcaconfig daaacfile
	DaaACFile = "qcaconfig.daaacfile"

	// RemoteAttest Handler
	RAProvisionInHandler  = "provisioning-input"
	RAProvisionOutHandler = "provisioning-output"
	RAReportInHandler     = "report-input"
	RAReportOutHandler    = "report-output"
	RASaveAKCertHandler   = "saveakcert-input"
)
View Source
const (
	ZERO_VALUE                  = 0
	UINT32_BYTES_LENGTH         = 4
	UINT64_BYTES_LENGTH         = 8
	NoAS_ERROR_RETURN_CODE      = 1
	TYPE_CONV_ERROR_RETURN_CODE = -1
	// alg type
	RA_ALG_RSA_3072        = 0x20000
	RA_ALG_RSA_4096        = 0x20001 // PSS padding
	RA_ALG_SHA_256         = 0x20002
	RA_ALG_SHA_384         = 0x20003
	RA_ALG_SHA_512         = 0x20004
	RA_ALG_ECDSA           = 0x20005
	RA_ALG_ED25519         = 0x20006
	RA_ALG_SM2_DSA_SM3     = 0x20007
	RA_ALG_SM3             = 0x20008
	RA_ALG_DAA_GRP_FP256BN = 0x20009
	// app scenario
	RA_SCENARIO_NO_AS_INT       = 0
	RA_SCENARIO_AS_NO_DAA_INT   = 1
	RA_SCENARIO_AS_WITH_DAA_INT = 2
)
View Source
const (
	// version type: "TEE.RA.[Major].[Minor]"
	RA_VERSION = "TEE.RA.1.0"
	// app scenario
	RA_SCENARIO_NO_AS       = "sce_no_as"
	RA_SCENARIO_AS_NO_DAA   = "sce_as_no_daa"
	RA_SCENARIO_AS_WITH_DAA = "sce_as_with_daa"
	// hash algorithm
	RA_HASH_ALG_SHA256 = "HS256"
	// daa curve type
	RA_DAA_CURVE_FP256BN = "Fp256BN"
	RA_DAA_CURVE_FP512BN = "Fp512BN"
)

Variables

View Source
var (
	// server side config
	// Qcacfg means qca config
	Qcacfg *qcaConfig = nil

	// ServerFlag means server flag
	ServerFlag *string = nil
	// ScenarioFlag means scenario flag
	ScenarioFlag *int32 = nil
)

Functions

func GenerateAKCert

func GenerateAKCert() ([]byte, error)

GenerateAKCert generates ak cert according to qca server scenario configuration.

func GetQcaServer

func GetQcaServer() string

GetQcaServer returns the qca service server configuration.

func GetTAReport

func GetTAReport(ta_uuid []byte, usr_data []byte, with_tcb bool) ([]byte, error)

GetTAReport gets TA trusted report information.

func HandleFlags

func HandleFlags()

HandleFlags handles the command flags.

func InitFlags

func InitFlags()

InitFlags inits the qca server command flags.

func LoadConfigs

func LoadConfigs()

LoadConfigs searches and loads config from config.yaml file.

func SaveAKCert

func SaveAKCert(cert []byte) error

SaveAKCert saves ak cert to the specified file.

func SetScenario

func SetScenario(s int32)

SetScenario sets the qca service scenario configuration.

Types

type Go_ra_buffer_data

type Go_ra_buffer_data struct {
	Size uint32
	Buf  []uint8
}

Go_ra_buffer_data is used to store ra buffer data

Jump to

Keyboard shortcuts

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