Struct oasis_core_runtime::identity::Identity
source · pub struct Identity { /* private fields */ }
Expand description
Runtime identity.
The identity can be used to sign remote attestations with runtime attestation key (RAK) or to decrypt ciphertexts sent to the enclave with runtime encryption key (REK). RAK avoids round trips to IAS/PCS for each verification as the verifier can instead verify the RAK signature and the signature on the provided quote which binds RAK to the enclave. REK allows enclaves to publish encrypted data on-chain to an enclave instance.
Implementations§
source§impl Identity
impl Identity
sourcepub fn endorsed_capability_tee(&self) -> Option<EndorsedCapabilityTEE>
pub fn endorsed_capability_tee(&self) -> Option<EndorsedCapabilityTEE>
Endorsed TEE capability.
sourcepub fn node_identity(&self) -> Option<PublicKey>
pub fn node_identity(&self) -> Option<PublicKey>
Host node identity public key.
sourcepub fn public_rak(&self) -> PublicKey
pub fn public_rak(&self) -> PublicKey
Public part of RAK.
This method will return an insecure test key in the case where the enclave is not running on SGX hardware.
sourcepub fn public_rek(&self) -> PublicKey
pub fn public_rek(&self) -> PublicKey
Public part of REK.
This method will return an insecure test key in the case where the enclave is not running on SGX hardware.
sourcepub fn quote(&self) -> Option<Arc<Quote>>
pub fn quote(&self) -> Option<Arc<Quote>>
Quote for RAK.
This method may return None
in case quote has not yet been set from
the outside, or if the quote has expired.
sourcepub fn quote_policy(&self) -> Option<Arc<QuotePolicy>>
pub fn quote_policy(&self) -> Option<Arc<QuotePolicy>>
Runtime quote policy.
This method may return None
in the case where the enclave is not
running on SGX hardware or if the quote policy has not yet been
fetched from the consensus layer.
sourcepub fn verify_binding(quote: &VerifiedQuote, rak: &PublicKey) -> Result<()>
pub fn verify_binding(quote: &VerifiedQuote, rak: &PublicKey) -> Result<()>
Verify a provided RAK binding.
sourcepub fn rak_matches(&self, rak: &PublicKey, quote: &Quote) -> bool
pub fn rak_matches(&self, rak: &PublicKey, quote: &Quote) -> bool
Checks whether the RAK matches another specified (RAK_pub, quote) pair.