Skip to content

Validate that your Intel SGX Setup is working correctly

Mats edited this page Mar 29, 2020 · 11 revisions

To check whether the SGX installation was successful, we can run an example enclave. Therefore we clone the Linux SGX Repository. By running the following commands, we are able to run an given example enclave.


First we need to current path to the home directory.

  • cd ~

Depending on the distribution and version, the pre-installed packages vary. If the git command is not found, we are able to install it with the following command.

  • sudo apt-get install git

Subsequently we clone the linux-sgx repository from GitHub.

  • git clone https://github.com/intel/linux-sgx.git

Now we can navigate to an example application:

  • cd linux-sgx/SampleCode/LocalAttestation

With make we are able to compile the application automatically by runnning the following command. SGX_MODE=SIM will compile the application for usage in Simulation Mode. The readme file, which is also located in the folder, contains all possible modes for compiling the program.

❗ Attention: The Simulation Mode requires at least an installed Intel SGX SDK. However, the Hardware Mode requires an installed Intel SGX PSW. To install SGX PSW, please follow the official Intel instructions: https://software.intel.com/en-us/articles/sgx-sdk-installation-guide

  • make SGX_MODE=SIM

Next we navigate to the bin directory and run the compiled application.

  • cd ./bin
  • ./app

As long as there are no error messages in the standard output and the application is running, we can also ensure that Intel SGX works correctly.

Clone this wiki locally