Skip to content
C++ Makefile C
Branch: master
Clone or download
ggershinsky Merge pull request #3 from mayank0403/master
Sample client: Fixed the issue with incorrect writing to socket.
Latest commit 0404452 Jul 10, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
aux_lib configurable ports Mar 15, 2018
client Fixed the issue with incorrect RSA decryption Jul 10, 2018
service-provider configurable ports Mar 15, 2018
IAS_report.h root directory Mar 12, 2018
LICENCE.txt root directory Mar 12, 2018
Makefile samples Mar 19, 2018 fixed package name Jun 10, 2018
truce_record.h root directory Mar 12, 2018

Linux SGX Trust Management Framework


Trust Management Framework (or TruCE for short - "Trust in Cloud Enclaves") handles all aspects of remote attestation and secret delivery process in Intel SGX enclaves. The framework enables application developers to focus on the application code, performing attestation by a simple API call. Additional calls are available for easy-to-use enclave sealing and secret passing to enclaves.

Trust Management Framework is a service model that can have different implementations underneath, yet exposes the same interface to applications. The current implementation of remote attestation is based on the generation of an initial secret inside the enclave, instead of sending it to the enclave. We generate an RSA private/public key pair and embed the public key (hash) in the enclave attestation quote. Since the quote is signed by Intel keys, the resulting attestation report can be kept in an untrusted storage, reducing the trust requirements placed on TruCE server. The application clients can verify an enclave report by using the Intel attestation public key, retrieve the enclave public key and use it for the encryption of secrets (such as data keys) to be sent to the enclave for subsequent decryption and processing of sensitive data.

Trust Management Framework has two main components:

  • TruCE server: A standalone process that registers with Intel Attestation Service and assists in remote attestation of RestAssured platform enclaves.
  • TruCE SDK: A toolkit for application development. It has API and libraries for trusted (enclave) part of the cloud application, untrusted part of the cloud application, and the off-cloud client code that interacts with the cloud application.

Trust Management Framework can run in either real or simulated IAS mode. In the former, full remote attestation is performed, including the required interaction with the Intel Attestation Service (IAS). At a development stage, you can use the simulated IAS mode - there, TruCE doesnt need registration with Intel, since it doesnt contact the IAS and skips the attestation report signature verification step.

Third party dependencies

  • Download and install the latest packages of Intel SGX LINUX from
  • Download and build SSL SGX located at the git repository
  • Update the values of SGX_SDK and SSL_SGX in the Makefile.
  • Download cpp-base64 from the git repository, and put the cpp-base64 folder under the aux_lib folder.
  • Install the following packages:
    • sudo apt-get install libssl-dev
    • sudo apt-get install libjsoncpp-dev
    • sudo apt-get install libcurl4-openssl-dev
  • In order to run the code in a real IAS mode, create a developer account. After the registration with a certificate (can be self-signed for development purposes), Intel will respond with a SPID. Update defs.h with your SPID, certificate and the quote signing type.


  • In order to build in a simulated IAS mode, run "make SIMULATE_IAS=1".
  • In order to build in a real IAS mode, run "make".
  • A successful compilation should produce the following files:
    • Under application:, libtruce_t.a (and app).
    • Under client: (and client).
    • Under service-provider: truce_server.


  • Application:
    • The untrusted part should use the API in truce_app/truce_u.h and link with
    • The trusted part should import truce_enclave.edl, use the API in truce_enclave/truce_t.h and link with libtruce_t.a
    • The file truce_enclave/truce_enclave_private.pem should be replaced with your enclave signing key (see SGX SDK documentation).
    • The file truce_enclave/truce_enclave.config.xml could be modified to configure the enclave memory size and other parameters.
    • truce_app/app.cpp is an example of the untrusted part of such application.
  • Client:
    • Should use the API in truce_client.h and link with
    • client.cpp is an example of such a client.
  • Service-Provider:
    • Run the truce_server executable

Running the samples

  1. Start the Truce server:

    cd /path-to/sgx-trust-management/service_provider
  2. In a separate window, run the sample application:

    export LD_LIBRARY_PATH=/path-to/sgx-trust-management/application
    source sgxsdk/environment # from SGX SDK install directory
    cd /path-to/sgx-trust-management/application
    #Truce server address
  3. In a separate window, run the client:

    export LD_LIBRARY_PATH=/path-to/sgx-trust-management/client
    cd /path-to/sgx-trust-management/client


Feel free to write to Gidon Gershinsky ( and Eliad Tsfadia (

You can’t perform that action at this time.