| Carl Friedrich Gauß Faculty | Department of Computer Science

Porting a C Library to the Baidu Rust SGX SDK

Student(anonymous, Login required)
SupervisorNico Weichbrodt
ProfessorProf. Dr. Rüdiger Kapitza
IBR GroupDS (Prof. Kapitza)
TypeBachelor Thesis, Master Thesis, Project Thesis


In the last years, a need for secure computing on untrusted host has come up. To achieve this, Intel developed Software Guard Extensions (SGX) [1,2] that allows developers to create secure compartments for their applications, called enclaves. Enclaves are a secure part of applications that can be entered to perform security critical computations while being guarded from an untrusted operating system and attackers by the processor itself. Enclaves operate in completely encrypted memory that only they can access. To ease development of enclaves, Intel released a Software Development Kit (SDK) [0].

However, the SDK only works with C/C++ applications which are both unsafe languages. Fortunately, there exists a Rust SDK from Baidu which is based on the Intel SDK [3].

Problem statement

We have a C library that only works with the Intel SDK. We want to provide safe Rust wrappers for this library so that it can be used with the Rust SDK.

Task description

Your task is to create the safe Rust wrappers for use with our library. As our library requires some changes to the Intel SDK, these changes also need to be applied to the Rust SDK. Furthermore, some measurements regarding performance are to be performed. In case of a master thesis, the C library need to be extended to support more Rust specific features.


  • Basic knowledge of Linux systems as we work with SGX exclusively on Linux
  • Good knowledge of C/C++
  • Knowledge of Rust and it's foreign function interface (FFI)
  • Knowledge of x86-64 assembler is of advantage


[0] https://01.org/intel-softwareguard-extensions
[1] https://software.intel.com/en-us/blogs/2013/09/26/protecting-application-secrets-with-intel-sgx
[2] https://software.intel.com/sites/default/files/managed/48/88/329298-002.pdf
[3] https://github.com/baidu/rust-sgx-sdk

last changed 2019-07-03, 15:56 by Nico Weichbrodt