Crate mc_sgx_core_types

Source
Expand description

§MobileCoin SGX: Common Types

Project ChatLicenseTargetCrates.ioDocs StatusDependency Status

Idiomatic rust wrappers for common SGX types.

Macros§

derive_measurement_hex_from_as_ref
Derive [UpperHex] and [LowerHex] from AsRef to render as a hexadecimal string.
impl_display_and_debug_for_measurement
Implement Debug and [Display] for enclave measurement types. Measurement types are usually stored/shared a lowercase hex strings with no byte delimiters and no leading ‘0x’ This implementation differs from other bytestruct types.
impl_display_for_bytestruct
Implement [Display] for bytestruct types. bytestruct types should display as an uppercase, two-byte underscore-delimited hex string prefixed with a ‘0x’ Non-measurement bytestruct types derive Debug, so it is not implemented here.
impl_newtype
Newtype wrapper for a primitive or struct type
impl_newtype_for_bytestruct
This macro provides common byte-handling operations when the type being wrapped is a struct containing a single fixed-size array of bytes.
impl_newtype_no_display
Newtype wrapper without a display implementation. TODO: Remove once every type has a Display impl.
newtype_accessors_impls
Boilerplate macro to fill in any trait implementations required by an SgxWrapperType that don’t depend on the contents of the inner type.

Structs§

AttestationKeyId
Attestation key from th quoting library. contains the quoting enclaves ID and the attestation algorithm
AttributeFlags
Attribute flags of an enclave
Attributes
Attributes of the enclave
ConfigId
Config ID
ConfigSvn
Config security version number (SVN)
CpuSvn
CPU security version number (SVN)
ExtendedAttestationKeyId
Extended Attestation Key ID
ExtendedFeatureRequestMask
Extended feature request mask (XFRM) of an enclave
ExtendedProductId
Extended Product ID
FamilyId
ISV Family ID
IsvProductId
ISV Product ID
IsvSvn
Independent software vendor (ISV) security version number (SVN)
KeyPolicy
Policy to use for the key derivation
KeyRequest
Key request
KeyRequestBuilder
A builder for creating a KeyRequest
MiscellaneousAttribute
Miscellaneous attributes and select bits for target enclave.
MiscellaneousSelect
Miscellaneous select bits for target enclave. Reserved for future extension.
MrEnclave
An opaque type for MRENCLAVE values
MrSigner
An opaque type for MRSIGNER values.
QuoteNonce
Quote Nonce
Report
An enclave Report
ReportBody
The main body of a report from SGX
ReportData
Report Data
TargetInfo
The target info

Enums§

Error
A enumeration of SGX errors.
FfiError
Errors seen when converting to, or from, rust for the SGX types
KeyName
Key Name