Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 3.89 KB

building_oe_sdk.md

File metadata and controls

84 lines (55 loc) · 3.89 KB

Building the Open Enclave SDK

1. Determine the SGX support level on your development/target system

The Open Enclave SDK runs on Linux systems, whether those systems are inside virtual machines or directly on top of the bare metal machines. The Open Enclave feature set exposed on a system varies on the SGX support level requested and available. Currently, the Open Enclave SDK implementation supports three different SGX support levels. This is explained in next section.

The SDK setup process for each mode has minor differences. Since these differences are not fully compatible between modes, it is imperative for a user to know the SGX support level on their target system to ensure the correct SDK setup.

Please refer to the following documentation to determine the SGX support level for your target system.

2. Understand the Open Enclave operation modes

Open Enclave today supports the following three operation modes -

  • SGX1: This mode can handle all the generic SGX features.

  • SGX1+FLC: In this mode, the Open Enclave SDK takes advantage of the Flexible Launch Control mode for better managing architectural enclaves.

  • Simulation: Open Enclave comes with an SGX software simulation mode that simulates a subset of the SGX feature set. This simulator enables the Open Enclave SDK to run on systems without actual SGX hardware support.

Different Open Enclave operating modes require different SGX support levels.

Open Enclave operation mode SGX support level needed to run on
SGX1+FLC SGX1+FLC
SGX1 SGX1 or SGX1+FLC
Simulation Any level

On Linux, if your target system does not have any SGX hardware support, you may want to choose simulation.

On Windows, Open Enclave SDK supports simulation mode but only on systems with SGX1 or SGX1+FLC support.

3. Build, install and run

Choose an operating mode that is compatible with the SGX support level of your target system. The links below contain instructions on how to set up Open Enclave SDK environment for a given mode.

On Ubuntu 1604 or Ubuntu 1804

On RHEL8

On Windows

Samples

On Linux

Assuming you install the SDK as below (also described in the basic install section)

cmake -DCMAKE_INSTALL_PREFIX=~/openenclave ..
make install

Open Enclave samples can be found in ~/openenclave/share/openenclave/samples

See Open Enclave samples for details.

On Windows

Assuming you install the SDK as below (also described in the basic install section)

cmake .. -G  Ninja -DNUGET_PACKAGE_PATH=C:\oe_prereqs -DCMAKE_INSTALL_PREFIX:PATH=C:\openenclave"
ninja install

Open Enclave samples can be found in c:\openenclave\share\openenclave\samples

See Open Enclave samples for details.

Using the Open Enclave SDK

Additional information such as the API Reference and supported libs can be found here.