Install SGX

For Ubuntu 16.04 LTS.

Download the following installation packages from https://01.org/intel-software-guard-extensions/downloads

  • Intel(R) SGX driver: sgx_linux_x64_driver.bin
  • Intel(R) SGX PSW: sgx_linux_x64_psw_<version>.bin
  • Intel(R) SGX SDK: sgx_linux_x64_sdk_<version>.bin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Intel(R) SGX PSW Dependecies
sudo apt-get install libssl-dev libcurl4-openssl-dev libprotobuf-dev

# Intel(R) SGX SDK Dependecies
sudo apt-get install build-essential

# (Optional) Download [iclsClient]
# (http://registrationcenter-download.intel.com/akdlm/irc_nas/11414/iclsClient-1.45.449.12-1.x86_64.rpm)
# or (https://software.intel.com/en-us/sgx-sdk/download)
# and install it using the following commands
sudo apt-get install alien
sudo alien --scripts iclsClient-1.45.449.12-1.x86_64.rpm
sudo dpkg -i iclsclient_1.45.449.12-2_amd64.deb

# Download source code from the[dynamic-application-loader-host-inter-face]
# (https://github.com/01org/dynamic-application-loader-host-interface)
# project. In the source code folder build and install the JHI service using
# the following commands
sudo apt-get install uuid-dev libxml2-dev cmake pkg-config libsystemd-dev
git clone https://github.com/intel/dynamic-application-loader-host-interface.git
(cd dynamic-application-loader-host-interface; mkdir build; cd build;cmake ..; make -j; sudo make install; sudo systemctl enable jhi)

sudo apt-get -y install kmod libelf-dev linux-headers-$(uname -r)

# Install the following downloaded packages
# 1. Intel(R) SGX driver
# 2. Intel(R) SGX PSW
# 3. Intel(R) SGX SDK
sudo ./sgx_linux_x64_driver.bin
sudo ./sgx_linux_x64_psw_<version>.bin
# type no and type /opt/intel as the installation path
sudo ./sgx_linux_x64_sdk_<version>.bin

source /opt/intel/sgxsdk/environment

# Use the LocalAttestation to test
cp -r /opt/intel/sgxsdk/SampleCode .
cd SampleCode/LocalAttestation
make SGX_MODE=SIM
./app

Reference

IntelĀ® Software Guard Extensions for Linux* OS
Intel_SGX_Installation_Guide_Linux_2.0_Open_Source
Intel_SGX_SDK_Developer_Reference_Linux_2.0_Open_Source
Intel_SGX_Developer_Guide
IntelĀ® Software Guard Extensions Programming Reference