Git Product home page Git Product logo

posup's Introduction

POSUP: Oblivious Search and Update Platform with SGX

Basic implementation of POSUP platform appeard in PETS'19. The full paper can be downloaded from here. This project is mainly built on MS Visual Studio, but it can operate on Linux environment as well. Note that sinve VS does not support x64 inline assembler, the project should be built with x86 on VS. In Linux, it can operate on 64-bit environment.

Prerequisites

  1. Intel SGX (Linux version, Windows version)

  2. Intel AES-NI (Sample code was taken down from Intel website, though it can be found in ext/aes-ni folder)

  3. Libtomcrypt)

Configuration

There are TWO main configuration files in POSUP, including include/conf.h and POSUP/my_config.h with important parameters as follows:

File include/conf.h: Contain basic ORAM parameters

#define PATH_ORAM               -> Enable this (and disable the below) to use Path-ORAM controller
#define CIRCUIT_ORAM            -> Enable this (and disable the above) to use Circuit-ORAM controller


#define STASH_CACHING           -> Enable this to cache the Stash on RAM
#define K_TOP_CACHING           -> Enable this to cache the k-top tree on RAM

#if defined(K_TOP_CACHING)
	const int CachedLevel[2] = { 3,4 };       -> Indicate the k-value to be cached of the index tree and the file tree, respectively 
#endif

#define POSITION_MAP_CACHING    -> Enable this to cache the file position map on RAM


#define STASH_SIZE 40		-> Declare the size of the stash (preferably 80)


#define INDEX_DATA_SIZE 1012 	-> Declare the payload size of each ORAM block in the index tree
#define FILE_DATA_SIZE 3060 	-> Declare the payload size of each the ORAM block in the file tree
// The total block size = |payload| + |block_ID| + |next block ID | + |next_path_ID|, which should be a multiple of 1024.

#define IDX_NUM_BLOCKS 512 	-> Declare number of blocks in the index tree
#define FILE_NUM_BLOCKS 32 	-> Declare number of blocks in the file tree

#define NUMBLOCK_PATH_LOAD BUCKET_SIZE	-> Declare number of blocks in the tree path to be processed by SGX each time
#define NUMBLOCK_STASH_LOAD 40		-> Declare number of blocks in the stash to be processed by SGX each time

#define NUM_EMPTY_BLOCK_LOAD 		-> Declare number of blocks in the empty block array to be processed by SGX each time
#define NUM_KWMAP_ENTRIES_LOAD 20	->  Declare number of entries in the keyword map to be processed by SGX each time

File POSUP/my_config.h: Contain dataset and storage location. Unzip the file data.zip to better understanding the structure.


const std::string rootPath = "C:/data/";		-> Root path of the DB input

const std::string clientLocalDir = rootPath + "client_local/";
const std::string clientDataDir = rootPath + "client/";
const std::string IdxORAMPath = rootPath + "server/idx/";
const std::string FileORAMPath = rootPath + "server/file/";

const std::string IdxBlockPath = rootPath + "idxBlock/";
const std::string FileBlockPath = rootPath + "fileBlock/";

Build & Compile

Windows

Download the entire code and open the file POSUP.sln with Microsoft Visual Studio.

Linux

Download the code and execute make in the project root folder, which will produce a binary executable file named app loated at the same directory.

Execution

Run the program and it will display the menu showing the main functionalities of POSUP, including setup, search, update. Follow the instruction in the menu and enjoy! ;)

Important Note

The implementation is just for the proof of concept. There are several places in the code that were implemented INSECURELY for the sake of code readibility and understanding. We are not responsible for any damages if the code is used for commercial purposes.

Citing

If the code is found useful, we would be appreciated if our paper can be cited with the following bibtex format

@article{hoang2019hardware,
  title={Hardware-Supported ORAM in Effect: Practical Oblivious Search and Update on Very Large Dataset},
  author={Hoang, Thang and Ozmen, Muslum Ozgur and Jang, Yeongjin and Yavuz, Attila A},
  journal={Proceedings on Privacy Enhancing Technologies},
  volume={2019},
  number={1},
  pages={172--191},
  year={2019},
  publisher={Sciendo}
}

Further Information

For any inquiries, bugs, and assistance on building and running the code, please dont hesitate to contact me at [email protected].

posup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

posup's Issues

Public benchmark databases

Hi,

I found the design of the solution presented in the paper very interesting. In fact, I have been working on something similar and would like to make a few experimental evaluations with POSUP. However, I could not find the dataset used on the paper in this repository. Is it possible to have access to the dataset or could you at least provide a few more details on how to obtain the wiki dataset version used on the paper?

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.