GithubHelp home page GithubHelp logo

thankuyou / funshade Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibarrond/funshade

1.0 0.0 0.0 593 KB

Function Secret Sharing for Secure Thresholded Distance Metric Evaluation.

License: GNU General Public License v3.0

Python 4.49% C 15.97% CMake 0.27% Jupyter Notebook 76.90% Cython 2.37%

funshade's Introduction

Funshade

Functional Secret Sharing for Two-Party Secure Thresholded Distance Evaluation.

  • Languages: C (99+), Python (3.8+, for the wrapper)
  • Platforms: Linux, Windows, MacOS (any system with a C compiler)
  • Dependencies: libsodium (optional, for fast and secure random number generation)
  • Code Author: Alberto Ibarrondo
  • License: GNU GPLv3 (any code derived from this must be open source)
  • Version: 1.1.0

Description

Funshade is a library that implements a protocol to securely compute a distance metric between two vectors, followed by a secure comparison to a threshold. It is extremely lightweight, making use of cheap primitives such as AES and requiring a single intermediate round of communication and just two numbers sent per distance computation in the preprocessing model (besides input sharing and output reconstruction, common to all secret-sharing MPC schemes).

Consider citing the paper if you use it in your research!

Installation

The library is written in plain C to make it portable. It has been tested in Linux and Windows, but it should work in any system with a C compiler. To compile it, you can:

  • Use the provided CMakeLists.txt with cmake(mkdir build && cd build && cmake .. & cmake --build .)
  • Directly call your compiler with the -msse -msse2 -maes flags for faster hardware-based AES acceleration (and consider -O3 -march=native for further optimizations).

For conveniency and for seamless integration with higher-level languages, we also provide a Python wrapper. Install it with:

  • pip install .

As an optional dependency, it uses libsodium for fast and secure random number generation.

Usage

The library is designed to be used as a black-box, with a simple API.

Chech the bottom of fss.h for the available functions, test_fss.c for some uses in C, or test_funshade.py for a step-by-step Python example.

funshade's People

Contributors

ibarrond avatar p-hofer avatar

Stargazers

Jerry Zhang 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.