Giter Club home page Giter Club logo

ccr-sgx's Introduction

CCR-SGX

Credit to https://github.com/apache/incubator-teaclave-sgx-sdk, without which this project would not be possible.

This proof of concept application runs on Intel SGX using the Rust SGX SDK.

This file serves as a guide for setting up the application on a local machine and running the project in simulation mode.

Requirements

  • Docker
  • Rust SGX SDK
  • Compatible machine: The code was developed on a 2014 Macbook Pro
  • IDE: The code was developed with CLION, but VSCode also works

Setup and Installation

The setup will cover the steps to setup the application on a MacOS machine that does not natively support Intel SGX. The application will run a simulated version of Intel SGX using a docker container. Note that the initial setup may take some time depending on your computer and internet connection.

  1. The first step is to install the Rust SGX SDK specifically for simulation mode
  • Pull the docker container: $ docker pull baiduxlab/sgx-rust
  • Start a docker with the Rust SGX SDK $ docker run -v /your/path/to/rust-sgx:/root/sgx -ti baiduxlab/sgx-rust
    • Remember to change /your/path/to to the path where you downloaded the docker container
  1. Validate that the install is working:
  • Navigate to ~/sgx/samplecode/helloworld

    • set the SGX_MODE to SW in Makefile
    • Replace SGX_MODE ?= HW with SGX_MODE ?= SW
    • OR run export SGX_MODE=SW in your terminal
  • Test if the sample code is working:

    root@docker:~/sgx/samplecode/helloworld# make (If you have issues try make SGX_MODE=SW)

    root@docker:~/sgx/samplecode/helloworld# cd bin

    root@docker:~/sgx/samplecode/helloworld/bin# ./app

    • Consult the Rust SGX SDK page if any errors occur, they have detailed setup instructions.
  1. Once you have verified that the Rust SGX SDK is working:
  • Navigate to the samplecode folder in the Rust SGX SDK: e.g. cd /your/path/to/rust-sgx/samplecode/
  • Clone this repository into the samplecode folder
  1. Download the data for the application:
  • Download the compressed file containing all the data from Google Drive
  • Unzip the compressed file and extract all the json files to /your/path/to/rust-sgx/samplecode/CCR-SGX/data/
  1. Running the POC Application
  • Remember to start the docker container, consult Step 1.

  • Navigate to the correct folder: root@docker:~# cd sgx/samplecode/CCR-SGX

  • Run export SGX_MODE=SW in your terminal

    root@docker:~/sgx/samplecode/CCR-SGX# make

    root@docker:~/sgx/samplecode/CCR-SGX# cd bin

    root@docker:~/sgx/samplecode/CCR-SGX/bin# ./app

ccr-sgx's People

Contributors

binglekruger 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.