# Intel SGX SDK Setup

Getting the Intel SDK running on your computer is sometimes tricky. Check out the wiki for tutorials.

## Intel(R) Software Guard Extensions for Linux\* OS

### Ubuntu 20.04 LTS 64-bit Desktop

This documentation is a quick installation guide to run Intel(R) Software Guard Extensions on Ubuntu 20.04 LTS 64-bit Desktop with disabled Flexible Launch Control (FLC) support.

#### **Prerequisites**

To install the Intel® SGX PSW, first install the following tools&#x20;

`$ sudo apt-get install libssl-dev libcurl4-openssl-dev libprotobuf-dev`

To install the Intel® SGX SDK, install the following tools

`$ sudo apt-get install build-essential python-is-python3`

#### **Install Intel® SGX Driver Installation**

Download the DCAP [driver](https://docs.enclaive.cloud/vault). You  find the DCAP version in the `driver_readme.txt` file.

Set the protections to allow for the .bin file execution&#x20;

`$ chmod 777 sgx_linux_x64_driver_<version>.bin`

Run the following command:

`$ sudo./sgx_linux_x64_driver_<version>.bin`

Reboot your system.

#### **Intel® SGX Platform Software (PSW) Installation**

Add the following repository to your sources

```
$ echo 'deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
```

Add the key to the list of trusted keys used by the apt to authenticate packages:&#x20;

```
$ wget https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key 
$ sudo apt-key add intel-sgx-deb.key
```

Update the apt and install the packages:&#x20;

`$ sudo apt-get update`

Install launch service:&#x20;

`$ sudo apt-get install libsgx-launch libsgx-urts`

Install EPID-based attestation service:&#x20;

`$ sudo apt-get install libsgx-epid`

Install algorithm agnostic attestation service&#x20;

`$ sudo apt-get install libsgx-quote-ex`

#### Install Intel® SGX SDK Installation

Download [Intel® SGX SDK package](https://docs.enclaive.cloud/morphism/tutorials).&#x20;

Set the protections to allow for the .bin file execution

`$ chmod 777 sgx_linux_x64_sdk_<version>.bin`

Install the SDK using the following command:&#x20;

`$ sudo./sgx_linux_x64_sdk_<version>.bin`

Install the SDK in directory `/opt/intel/sgxsdk.`

Run the following command

`source /opt/intel/sgxsdk/environment`

#### **Find further Documentation**

[Intel(R) SGX for Linux\* OS](https://01.org/intel-softwareguard-extensions) project home page on [01.org](https://01.org/) [Intel(R) SGX Programming Reference](https://software.intel.com/sites/default/files/managed/7c/f1/332831-sdm-vol-3d.pdf)

## Intel(R) Software Guard Extensions for Win10 x64

### Windows 10 x64 version 20H2 (OS Build 19042.964)

#### **Prerequisites**

Update bios/uefi to the newest version. The new firmware can be found at the page of your manufactor or it can be updated through their distributed applications. To run with native Intel SGX support, enable SGX in your bios/uefi. Mostly found under **security**.

#### **Install Intel® SGX**

Download **Intel SGX SDK for Windows v.2.12.1004.exe** and **Intel SGX PSW for Windows v.2.12.102.1.exe** from [here](https://software.intel.com/content/www/us/en/develop/topics/software-guard-extensions/sdk.html).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclaive.cloud/confidential-cloud/technology-in-depth/intel-sgx/getting-started/intel-sgx-sdk-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
