Skip to content

cryptohackathon/enclaved-FE

Repository files navigation

Enclaved-FE : Run Functional Encryption in Intel SGX

This project aims to enable applications using Fentec Functional Encryption libraries CiFEr or Go version named GoFE library to run in Intel SGX with little or even no modifications of source code. We leverage library OS's such as Graphene or Occlum which are purposely built for Intel SGX. This project primarily contains various build and run configurations and sample applications.

Running CiFEr in Graphene-SGX

There are two applications:

  • simple_app doesn't have any source code, it only contains Makefile script which downloads CiFEr github repo, builds library and example applications. Directory also a template file for generating the manifest used by Graphene to run in SGX. The example application runs locally without any client-server type of communication scenario. This project can be used as starter project for more complex SGX ready application.

  • pp_analytics_app contains source code for a client-server type of example implemented by us where multiple entities utilizing functional encryption run in SGX.

Both application are tested on Ubuntu 20.04, with both normal Linux and in SGX hardware mode container.

Prerequisite

  • Follow Graphene Document to install Graphene and Intel SDK and tools.

  • Also make sure graphene-sgx-helloworld works on your machine.

  • Install CiFEr dependencies:

    sudo apt install -y build-essential libgmp-dev libsodium-dev

1. simple_app From CiFEr Poject

Clone this repo and go to simple_app directory

cd simple_app

Building for Linux

Run GRAPHENE_DIR=<graphene-root-dir> make (non-debug) or GRAPHENE_DIR=<graphene-root-dir> make DEBUG=1 (debug) in the directory.

Building for SGX

Run GRAPHENE_DIR=<graphene-root-dir> make SGX=1 (non-debug) or GRAPHENE_DIR=<graphene-root-dir> make SGX=1 DEBUG=1 (debug) in the directory.

Run Application

Without SGX:

./pal_loader ./cifer_app

With SGX:

SGX=1 ./pal_loader ./cifer_app

2. pp_analytics_app End-To-End Application

Please check README for build and run instructions.

About

Run Functional Encryption in Intel SGX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages