Skip to content

sassiwalid/sgxPingPongTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PingPong SGX Demo

What is Intel SGX?

Software applications frequently need to work with private informations such as passwords, account numbers, financial information, encryption keys, and health records. This sensitive data is intended to be accessed only by the designated recipient. In Intel SGX terminology, those privates informations are referred to as an application’s secrets.

Getting Started

The application called "Ping-Pong" consists of two enclaves: (1) The Ping Enclave, which when called upon generates a random number a and sends it to the application. (2) The Pong enclave, which generates a value b upon creation and responds whether a > b when called upon by the application. In the following, we describe the different messages of the protocol:

  1. The application initiates a ping-pong request.
  2. The Enclave Ping generates a random number a and sends it encrypted to the application.
  3. The application sends [a] to the Enclave Pong.
  4. The Enclave Pong decrypts and sends the boolean result of a > b.

Prerequisites

Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification. to use the SGX sdk in Ubuntu 16.04 LTS, you should fellow those steps:

  1. Install tools to build the SGX SDK using this command:
sudo apt-get install build-essential ocaml automake autoconf libtool wget python
  1. Use the script download-prebuilt.sh inside source code package to download prebuilt binaries to prebuilt folder like this:
$ ./download_prebuilt.sh
  1. To build both Intel(R) SGX SDK and PSW with default configuration, enter the following command:
$ make
  1. Now, you should build the SGX SDK Installer and also the SGX PSW installer using this two commands:
$ make sdk_install_pkg
$ make psw_install_pkg
  1. You will got two binary files, Intel(R) SGX PSW installer in the linux/installer/bin folder. sgx_linux_x64_sdk_${version}.bin, so install the sdk using this command:
$ ./sgx_linux_x64_sdk_${version}.bin
  1. After installing, you should setup the environment variable using this command.

Running the pingpong demo

After downloading the demo, you can access the directory using this command:

$ cd {path_Directory_pingpongDemo}
  1. Compile the project using the make command:
$ make
  1. Run the demo:
$ ./App

Demonstration Video :

PingPongTestDemo

Versioning:

1.0

Author: