SGX Quick Start - SGX-JAVA/graphene GitHub Wiki

Quick Start to Run Applications in Intel SGX Enclaves

If you simply want to build and run Graphene on the same host, try the following steps:

** Note: Please use GCC version 4 or 5 **

** Please make sure the Intel SGX Linux SDK and driver are installed. **

If not, download and install from these two repositories: https://github.com/01org/linux-sgx and https://github.com/01org/linux-sgx-driver

** Note: Please use Intel SGX Linux SDK and driver version 1.9 or lower. **

1. prepare a signing key

cd Pal/src/host/Linux-SGX/signer
openssl genrsa -3 -out enclave-key.pem 3072

2. build PAL

cd Pal/src
make SGX=1

3. build and install Graphene SGX driver

cd Pal/src/host/Linux-SGX/sgx-driver
make
sudo ./load.sh

4. build the library OS

cd LibOS
make

5. Run a helloworld program

cd LibOS/shim/test/native
make SGX=1
make SGX_RUN=1
./pal_loader SGX helloworld    or    SGX=1 ./pal_loader helloworld

6. Run LMBench

cd LibOS/shim/test/apps/lmbench
make SGX=1
make SGX_RUN=1
cd lmbench-2.5/bin/linux
./pal_loader SGX lat_syscall null    or   SGX=1 ./pal_loader lat_syscall null
./pal_loader SGX lat_syscall open    or   SGX=1 ./pal_loader lat_syscall open
./pal_loader SGX lat_syscall read    or   SGX=1 ./pal_loader lat_syscall read
./pal_loader SGX lat_proc fork       or   SGX=1 ./pal_loader lat_proc fork