Giter Club home page Giter Club logo

grs22's Introduction

This is a C++20 implementation of GRS22's Structure-Aware Private Set Intersection, With Applications to Fuzzy Matching. We implement GRS22's PSI protocol over $\mathbb{R}^2$ with $L_{\infty}$ norm with three bFSS recipes:

  1. spatialhash @ concat @ tt
  2. xorshare @ tt
  3. spatialhash @ tt

This implementation is optimized heavily towards minimizing communication costs, while being suboptimal in running time.

Assumptions

We assume

  1. sizeof(long) == 8 (which should hold on most modern machines);
  2. Host CPU supports AESNI operations. Over Linux this can be checked via grep -o aes /proc/cpuinfo. Again should hold on most reasonably modern machines.

Project Structure

  • /src contains sources. Since we use std::bitset as main mode of storage, most of the code is in .tpp and no separation of interface and implementation is possible.
    • bfss/* defines (p, 1)-bFSS, and implements Spatial Hash and Truth Table bFSS as described by paper.
    • matrix_tools.tpp contains basic linear algebra tools for working over $(\mathbb{F}_2)^q$.
    • oblivious_transfer_short.tpp contains wrapper for libOTe's oblivious transfer, limited to <=128bit only. This file is currently not used.
    • oblivious_transfer.tpp contains wrapper fro libOTe's oblivious transfer, except that it supports arbitrary length OT via hybrid encryption.
    • okvs.tpp contains oblivious key-value storage via random boolean matrix method, described in PSI from PaXoS: Fast, Malicious Private Set Intersection
    • protocol/ contains implementation for the PSI protocol, using 3 recipes.
  • /test folder contains unit tests written with Catch2, which also serves the purpose of usage examples.

Installation

To reproduce in Docker container:

docker pull archlinux
docker run -t -d --name garimella archlinux
docker exec -it garimella bash
pacman -Syyuu
pacman -S python vim make wget curl git gcc autoconf automake pkgconf cmake openssh

Then, install libOTe (below instructions are copied from libOTe page, and may subject to change over time):

pacman -S libtool
git clone https://github.com/osu-crypto/libOTe.git
cd libOTe
python build.py --all --boost --sodium
python build.py --install

Finally, clone this repository:

git clone https://github.com/xade93/GRS22
cd GRS22
mkdir build/
cmake -DCMAKE_BUILD_TYPE=Release
make -j

The exectuables generated are ./tests and ./grs22. The latter one is a frontend that is work in progress.

grs22's People

Contributors

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