Skip to content

Pure Modern C++ library for Function Secret Sharing

License

Notifications You must be signed in to change notification settings

muqsitnawaz/libfss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSS

FSS implements a two-party Function Secret Sharing protocol that allows non-colluding parties to execute a function without knowing the original inputs of the user.

The inputs and the function are secret shared between the parties making it information therotic secure against an adversary (given the non-colluding assumption).

Theory

Applications

Dependencies

brew install openssl

Installation

cmake -S .. -B build
cd build
make
sudo make install

This will install the library at /usr/local/include/fss.

Usage

#include <fss/fsscontext.hpp>
#include <fss/fssgenerator.hpp>
#include <fss/fssevaluator.hpp>

const auto fss_context = FSSContext::Create(plain_modulus, 10); // Creates a ring of size 2^10

FSSGenerator generator(fss_context); // Used for generating keys

ReLUKey key_p0, key_p1;
generator.relu(key_p0, key_p1);

FSSEvaluator evaluator_p0(fss_context, 0); // Used for evaluating the function
FSSEvaluator evaluator_p1(fss_context, 1); // Used for evaluating the function

const auto output_p0 = evaluator_p0.relu(key_p0, <masked_exchanged_input>);
const auto output_p1 = evaluator_p1.relu(key_p1, <masked_exchanged_input>);

const auto output = (output_p0 + output_p1) % plain_modulus; // Output of the function

License

MIT License

About

Pure Modern C++ library for Function Secret Sharing

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published