Giter VIP home page Giter VIP logo

cyfhel's Introduction

Cyfhel

Abstraction of HElib in C++ for Homomorphic Encryption (HE) to provide higher-level routines.

  • Description: Cyfhel is a software library that implements homomorphic encryption (HE). It is an abstraction of HElib in C++ for homeomorphic encryption to provide higher-level routines. Thus, this library aims to offer the same functionality as HElib but with higher level routines to facilitate the use of homorphic encryption features offered by HElib.
  • Language: C++.
  • Dependencies: HElib, GMP, NTL
  • License: GNU GPL v3

Summary

Cyfhel implements higher level routines than HElib to facilitate the use of homorphic encryption features offered by HElib. This library is useful both for simple Homomorphic Encryption Demos as well as for complex problems such as implementing Machine Learning algorithms.

Additionally, this project contains a large series of Demos & Tests for Cyfhel.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

  1. INSTALLATION Linux Ubuntu (computer or virtual machine) :

Install a Linux Ubuntu virtual machine or use your own computer if you are running Linux Ubuntu (tested version: Ubuntu 14.04.3 64 bit) -> Install a Linux Ubuntu virtual machine

To enable the share clipboard etc... on virtual machine -> https://forums.virtualbox.org/viewtopic.php?f=3&t=15679

If git is not install yet:

sudo apt-get install git

If git is not configured yet:

git config --global user.email "[email protected]" and git config --global user.name "Your UserName"
  1. INSTALLATION Cyfhel:

In a terminal, perform the following command (the installation should take a moment: about half an hour):

git clone https://github.com/remyauda/Cyfhel
cd Cyfhel/
./configure
sudo make all
(sudo make Cyfhel)->facultatif

Or

git clone https://github.com/alexandreauda/Cyfhel
cd Cyfhel/
./configure
sudo make all
(sudo make Cyfhel)->facultatif
  1. EXECUTION OF THE DEMO:

To test if Cyfhel works, you can run the main demo of the project called Demo_Cyfhel. To do this, go in the folder Demo_Test and do:

cd src/Demo_Test/
make Demo_Cyfhel_x
./Demo_Cyfhel_x

More generally, you can run every Demo which are in the folder DemoTest. To do it you have just to go in the folder DemoTest and then run the following command:

make demoYouWantToRun_x

The previous command will compile the demoYouWantToRun.cpp you want to run and will create an executable called demoYouWantToRun_x. Then, just run the following command to run your demo:

./demoYouWantToRun_x

Important note: To make your life easier, we have provided two batch files:

  • removeAllExecutable.sh: this batch removed all the executable_x in the directory DemoTest.
  • compileAll.sh: this batch compile all the cpp file in the directory DemoTest to create executable_x for every Demo presents in the folder DemoTest.

The first batch could be run with:

./removeAllExecutable.sh

The second batch could be run with:

./compileAll.sh

WARNING:

It is very important to do:

make program_x et ./program_x

The _x is very important! If you don't put it, you will encounter some errors at the execution time (segmentation fault, etc...)

  1. COMPILATION:

If you change the source code of the project Cyfhel, you must recompile it. Otherwise your changes will be ignored. To do this, go to the root of the project and do.

sudo make Cyfhel

If you change the source code of the project HElib, you must recompile it. Otherwise your changes will be ignored. To do this, go to the root of the project and do.

sudo make HElib

Prerequisites

What things you need to install the software and how to install them: No prerequisites.

Installing

A step by step series of examples that tell you have to get a development env running

  1. INSTALLATION Cyfhel:

In a terminal, perform the following command:

git clone https://github.com/remyauda/Cyfhel
cd Cyfhel/
./configure
sudo make all
(sudo make Cyfhel)->facultatif

Or

git clone https://github.com/alexandreauda/Cyfhel
cd Cyfhel/
./configure
sudo make all
(sudo make Cyfhel)->facultatif
  1. EXECUTION OF THE DEMO:

To test if Cyfhel works, you can run the main demo of the project called Demo_Cyfhel. To do this, go in the folder Demo_Test and do:

cd src/Demo_Test/
make Demo_Cyfhel_x
./Demo_Cyfhel_x

More generally, you can run every Demo which are in the folder DemoTest. To do it you have just to go in the folder DemoTest and then run the following command:

make demoYouWantToRun_x

The previous command will compile the demoYouWantToRun.cpp you want to run and will create an executable called demoYouWantToRun_x. Then, just run the following command to run your demo:

./demoYouWantToRun_x

Important note: To make your life easier, we have provided two batch files:

  • removeAllExecutable.sh: this batch removed all the executable_x in the directory DemoTest.
  • compileAll.sh: this batch compile all the cpp file in the directory DemoTest to create executable_x for every Demo presents in the folder DemoTest.

The first batch could be run with:

./removeAllExecutable.sh

The second batch could be run with:

./compileAll.sh

WARNING:

It is very important to do:

make program_x et ./program_x

The _x is very important! If you don't put it, you will encounter some errors at the execution time (segmentation fault, etc...)

  1. COMPILATION:

If you change the source code of the project Cyfhel, you must recompile it. Otherwise your changes will be ignored. To do this, go to the root of the project and do.

sudo make Cyfhel

If you change the source code of the project HElib, you must recompile it. Otherwise your changes will be ignored. To do this, go to the root of the project and do.

sudo make HElib

Running the tests

Explain how to run the automated tests for this system:

To test if Cyfhel works, you can run the main demo of the project called Demo_Cyfhel. To do this, go in the folder Demo_Test and do:

cd src/Demo_Test/
make Demo_Cyfhel_x
./Demo_Cyfhel_x

More generally, you can run every Demo which are in the folder DemoTest. To do it you have just to go in the folder DemoTest and then run the following command:

make demoYouWantToRun_x

The previous command will compile the demoYouWantToRun.cpp you want to run and will create an executable called demoYouWantToRun_x. Then, just run the following command to run your demo:

./demoYouWantToRun_x

Important note: To make your life easier, we have provided two batch files:

  • removeAllExecutable.sh: this batch removed all the executable_x in the directory DemoTest.
  • compileAll.sh: this batch compile all the cpp file in the directory DemoTest to create executable_x for every Demo presents in the folder DemoTest.

The first batch could be run with:

./removeAllExecutable.sh

The second batch could be run with:

./compileAll.sh

WARNING:

It is very important to do:

make program_x et ./program_x

The _x is very important! If you don't put it, you will encounter some errors at the execution time (segmentation fault, etc...)

Break down into Benchmark

Appart from traditional Demo in DemoTest, we have provided some benchmarks of Cyfhel. In these Benchmark, we measure the time that Cyfhel takes to perform each homomorphic operation:

  • Time for the creation of an object Cyfhel (generation of the keys).
  • Time to perform an homomorphic addition.
  • Time to perform an homomorphic substraction.
  • Time to perform an homomorphic multiplication.
  • etc...

The results of these Benchmarks are stored in txt files within the folder ResultOfBenchmark. You can then export them into a cvs file and perform some visualisation with some graphical softwares: SAP Lumira, Qlik, Webi, Tableau etc...

BasicOperation3

PoynomialDegIncrease1

Deployment

Add additional notes about how to deploy this on a live system:

Nothing to add: just perform the installation as described.

Built With

  • HElib - Software library that implements homomorphic encryption (HE)
  • GMP - The GNU Multiple Precision Arithmetic Library
  • NTL - NTL: A Library for doing Number Theory

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.

Acknowledgments

  • The SW is based on HElib by Shai Halevi, HEIDE by Grant Frame, analysis of addition by Matheus S.H. Cruz. In compliance with their respective Licenses, I name all of them in this section. This project could not be possible without them.

cyfhel's People

Contributors

remyauda avatar

Stargazers

 avatar  avatar  avatar

Watchers

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