GithubHelp home page GithubHelp logo

mii443 / final Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kuleuven-cosic/final

0.0 0.0 0.0 108 KB

The fully homomorhic encryption scheme based on NTRU and LWE.

License: MIT License

C++ 98.93% C 0.12% Makefile 0.94%

final's Introduction

FINAL

Faster FHE instantiated with NTRU and LWE

The FINAL library contains the implementation of the fully homorphic encryption schemes presented in the paper "FINAL: Faster FHE instantiated with NTRU and LWE", by Charlotte Bonte ([email protected]), Ilia Iliashenko ([email protected]), Jeongeun Park ([email protected]), Hilder V. L. Pereira ([email protected]), and Nigel P. Smart ([email protected]).

It is distributed under the MIT license. Please, check the LICENSE file for more details.

Requirements

A C++ compiler, the NTL and FFTW 3 libraries.

Run the code

  1. Run make in the main repository folder.
  2. Run the test program and check that all the homomorphic gates are computed correctly.

Usage

Use test.cpp and Makefile as reference points to create and compile your own program with FINAL.

Example

// Input bits
int b1 = 0;
int b2 = 1;

// LWE encryption base scheme
SchemeLWE s;
// LWE ciphertexts
Ctxt_LWE ct1, ct2, ct_or, ct_nand, ct_xor, ct_and, ct_not;
// Encryption of bits
s.encrypt(ct1, b1);
s.encrypt(ct2, b2);

// Computes AND
s.and_gate(ct_and, ct1, ct2);
assert(s.decrypt(ct_and) == 0);
// Computes NAND
s.nand_gate(ct_nand, ct1, ct2);
assert(s.decrypt(ct_nand) == 1);
// Computes OR
s.or_gate(ct_or, ct1, ct2);
assert(s.decrypt(ct_or) == 1);
// Computes XOR
s.xor_gate(ct_xor, ct1, ct2);
assert(s.decrypt(ct_xor) == 1);
// Computes NOT
s.not_gate(ct_not, ct1);
assert(s.decrypt(ct_not) == 1);

final's People

Contributors

hilder-vitor avatar iliailia 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.