https://github.com/muqsitnawaz/libfss
Pure Modern C++ library for Function Secret Sharing
https://github.com/muqsitnawaz/libfss
cpp cryptogrpahy
Last synced: 2 months ago
JSON representation
Pure Modern C++ library for Function Secret Sharing
- Host: GitHub
- URL: https://github.com/muqsitnawaz/libfss
- Owner: muqsitnawaz
- License: mit
- Created: 2024-04-27T15:06:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-27T19:48:59.000Z (about 1 year ago)
- Last Synced: 2025-01-21T03:42:47.140Z (4 months ago)
- Topics: cpp, cryptogrpahy
- Language: C++
- Homepage:
- Size: 363 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- [Function Secret Sharing](https://cs.idc.ac.il/~elette/FunctionSecretSharing.pdf)
- [Function Secret Sharing: Improvements and Extensions](https://eprint.iacr.org/2018/707.pdf)## Applications
- [Pika: Secure Computation
using Function Secret Sharing over Rings](https://petsymposium.org/popets/2022/popets-2022-0113.pdf)## Dependencies
```bash
brew install openssl
```## Installation
```bash
cmake -S .. -B build
cd build
make
sudo make install
```This will install the library at `/usr/local/include/fss`.
## Usage
```cpp
#include
#include
#includeconst 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 functionconst auto output_p0 = evaluator_p0.relu(key_p0, );
const auto output_p1 = evaluator_p1.relu(key_p1, );const auto output = (output_p0 + output_p1) % plain_modulus; // Output of the function
```## License
[MIT License](LICENSE)