Skip to content

mobilecoinfoundation/sgx-sigstruct

Repository files navigation

MobileCoin Enclave Signature Structure (SIGSTRUCT)

Project ChatLicenseDependency StatusCodeCov StatusGitHub Workflow StatusContributor Covenant

SIGSTRUCT is a structure created and signed by the enclave developer that contains information about the enclave. This crate contains utilities to parse the SIGSTRUCT structure, as created by the sgx_sign SDK utility. It exposes the primary API, the Signature structure, which can be loaded from bytes or a file, as needed. It includes Intel SGX SIGSTRUCT Dump Utility to read a CSS file and print its output Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3D: System Programming Guide, Part 4, Section 38.13

Examples

use hex_fmt::HexFmt;
use std::path::Path;
use sgx_css::Signature;

fn main() {
    let path = Path::from("/path/to/cssfile");
    let sig = Signature::try_from(&path).expect("Could not parse SIGSTRUCT");
    println!("{}:{}", HexFmt(sig.mrenclave()), HexFmt(sig.mrsigner()));
}

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages