hiroki-chen / incubator-teaclave-sgx-sdk

Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.

Home Page:https://teaclave.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Teaclave SGX SDK v2.0 preview (PoBF specific version)

Teaclave SGX SDK v2.0 is a revamped version. It is much more developer friendly compared to v1.1.

  • supports cargo build + no_std, xargo build and cargo-std-aware mode.
  • Tokio and Tonic is directly available to enclave programming without any change.
  • Refactored Intel's SDK using Rust. Only a small portion of Intel's SDK is required.
  • Improved testing framework. sgx_tstd is well tested now.
  • No need to maintain 100+ 3rd party dependencies. Most dependencies are use-able without any change.

Note that this is a detached 2.0.0 version of teaclave-sgx-sdk that is tailored only to PoBF confidential computing framework. The nightly Rust toolchain was updated to a relatively new version (nightly-2022-08-30) and the allocators were modified to ensure all sensitive data are erased after they are deallocated. We do not ensure that the sgx_std crate supports this toolchain version.

Build system

We still maintain the legacy no_std cargo build support, and xargo build with a customized sysroot. v2.0 supports cargo-std-aware as well.

To switch from these build modes, please specify

  • BUILD_STD=no to use traditional no_std cargo build
  • BUILD_STD=cargo (default setting) to use the new std aware cargo build
  • BUILD_STD=xargo to use xargo build

Samples

We are still working on porting all v1.1 samples to v2.0. Current available samples include:

  • backtrace
  • cov
  • crypto
  • hellworld
  • httpreq
  • hyper-rustls-https-server
  • logger
  • regex
  • rpc (Tonic + Tokio)
  • seal
  • switchless
  • zlib-lazy-static-sample

About

Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.

https://teaclave.apache.org

License:Apache License 2.0


Languages

Language:Rust 46.1%Language:C 42.9%Language:Assembly 3.7%Language:C++ 3.1%Language:Shell 2.2%Language:Makefile 1.7%Language:M4 0.3%Language:Awk 0.0%