“Intel SGX (Software Guard Extension) technology, available in Skylake and later processors, allows to create secure memory regions (enclaves) protected with hardware encryption in the SoC (system on chip). The data is in cleartext only inside the processor. It is encrypted in the SoC before leaving to the main memory, and decrypted in SoC upon fetching from the main memory. Paging is done on encrypted data.

 

This is a powerful security tool, but it is highly challenging for usage in practical systems. One of the main challenges is a complex trust establishment mechanism required to verify the CPU and the application binary running in the enclave. Without verification, the user can not send secrets (such as data encryption keys) to the enclave, because the CPU can be substituted by a fake processor that leaks the secrets to a malicious party, and the application binary could be replaced by malicious code that leaks the data even in a genuine SGX CPU.

 

Intel specifies a procedure for such verification, called “remote attestation” and provides example code for using it. Unfortunately, the SGX toolkit doesn’t have an end-to-end mechanism that implements this procedure…

 

…IBM Research has designed and implemented a framework for trust management in SGX enclaves that addresses the challenges described above”

 

The full article by Gidon GershinskyEliad Tsfadia and Danny Harnik  of IBM continues here.

 

Open Source Code Released

Furthermore, IBM have released the trust management framework (or TruCE for short – “Trust in Cloud Enclaves”) and toolkit as an open source project at: https://github.com/IBM/sgx-trust-management with an Apache 2.0 license.

 

Feel free to download and use it, report issues or send pull requests with bug fixes and new features.