incubator-teaclave-sgx-sdk  by apache

Rust SDK for Intel SGX app development

created 8 years ago
1,202 stars

Top 33.3% on sourcepulse

GitHubView on GitHub
Project Summary

This SDK enables developers to write Intel SGX applications using the Rust programming language, offering a secure and efficient way to build confidential computing solutions. It targets Rust developers seeking to leverage hardware-based security for sensitive workloads.

How It Works

The SDK provides a Rust-compatible environment for Intel SGX, abstracting low-level SGX details. It leverages Rust's safety features to help prevent common memory-related vulnerabilities within enclaves. The approach includes custom sgx_tstd (trusted standard library) and sgx_untrusted namespaces for interacting with the SGX runtime and untrusted code, respectively.

Quick Start & Requirements

  • Install: Pull and run a pre-built Docker container (e.g., docker pull baiduxlab/sgx-rust).
  • Prerequisites: Docker, Intel SGX OOT 2.11.0 Driver or DCAP 1.36.2 Driver, Intel SGX SDK v2.12, Intel SGX PSW, Rust nightly-2022-10-22.
  • Setup: Requires downloading sample code and running Docker commands to mount SGX devices.
  • Docs: 01.org for Intel SGX software installation.

Highlighted Details

  • Supports a wide range of SGX features through numerous code samples, including local/remote attestation, sealed data, threading, file I/O, and even machine learning with rusty-machine.
  • Includes samples for advanced features like sgxtime (Intel ME trusted timestamping), switchless execution, and WebAssembly interpretation (wasmi).
  • Actively maintained forks of popular Rust crates ensure compatibility within the SGX environment.
  • Provides guidance on writing Enclave Definition Language (EDL) and handling arrays/pointers for FFI.

Maintenance & Community

  • Project is part of the Apache Incubator program.
  • Community engagement via mailing list and Twitter (@ApacheTeaclave).
  • Contributions are welcomed following "The Apache Way."

Licensing & Compatibility

  • Apache License 2.0.
  • Generally permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

  • Requires specific Intel SGX hardware and drivers for full functionality; simulation mode is available for development without SGX hardware.
  • Dependency on specific Rust toolchain versions (nightly or stable) as indicated in release notes.
  • Some older versions had specific requirements for starting the AESM daemon.
Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.