Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.6 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.6 KB

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