Giter VIP home page Giter VIP logo

intel-sgx-enclave-ubuntu-tutorial's Introduction

Intel SGX Enclave Tutorial (Ubuntu)

This application is a minimum example for running secured application with Intel SGX enclave.

Intel SGX Drivers and SDK Installation

Before building this application, please setup the required software in Intel SGX platform.

See installation guide for Intel SGX software and then install drivers, runtime, and SDKs.
Here I installed Intel SGX software v2.16 on Ubuntu Server 20.04 LTS (Standard DC2s v3) in Microsoft Azure.

#
# Setup for platform driver
#

# update system
sudo apt update
sudo apt upgrade
# install Intel SGX driver
# (use out-of-tree platform's driver for Azure VM image)
sudo apt-get install build-essential ocaml automake autoconf libtool wget python libssl-dev dkms
wget https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/sgx_linux_x64_driver_2.11.054c9c4c.bin
chmod 777 sgx_linux_x64_driver_2.11.054c9c4c.bin
sudo ./sgx_linux_x64_driver_2.11.054c9c4c.bin

#
# Setup for application users
#

# add repository
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 key
wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo apt-key add
# install packages
sudo apt-get update
sudo apt-get install libsgx-epid libsgx-quote-ex libsgx-dcap-ql
# install DCAP QPL package
sudo apt-get install libsgx-dcap-default-qpl

#
# Setup for application developers
#

# install required packages
sudo apt-get install build-essential python
# download sdk
wget https://download.01.org/intel-sgx/latest/linux-latest/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.16.100.4.bin
# install sdk
chmod +x sgx_linux_x64_sdk_2.16.100.4.bin
sudo ./sgx_linux_x64_sdk_2.16.100.4.bin --prefix /opt/intel
# set environment
source /opt/intel/sgxsdk/environment
# install other dev packages
sudo apt-get install libsgx-enclave-common-dev libsgx-dcap-ql-dev libsgx-dcap-default-qpl-dev

Build and run this application

Now you can build and run this application as follows.

# clone this repo
git clone https://github.com/tsmatz/intel-sgx-enclave-ubuntu-tutorial
cd intel-sgx-enclave-ubuntu-tutorial
# build application
make
# run application
./app

See my blog post for memory scraping test with this application.

intel-sgx-enclave-ubuntu-tutorial's People

Contributors

tsmatsuz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.