Skip to content
/ CSGN Public

Homomorphic Encryption scheme from monoid algebras

License

Notifications You must be signed in to change notification settings

certfhe/CSGN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSGN - Bounded Homomorphic Encryption from Monoid Algebras

CSGN is a homomorphic encryption (HE) library that implements the scheme presented here.

The library is implemented in C++.

Documentation can be found here.

Building CSGN library

Linux

mkdir build
cd build
cmake ../
make

Windows

To build on Windows using cmake and VS:

mkdir build
cd build
cmake ../

Then, open the VS solution from build server and build all from VS.

Example

// initializing library (using local time as seed for further pseudo random generator calls)
certFHE::Library::initializeLibrary();

// setup the certFHE context 
certFHE::Context context(1247,16);

// the secret key
certFHE::SecretKey seckey(context);

// use two bits: 0,1
Plaintext p1(1);
Plaintext p0(0);

// encrypt the bits using secret key 
Ciphertext c1 = seckey.encrypt(p1);
Ciphertext c0 = seckey.encrypt(p0);

// multiply two ciphertexts 
c1 = c1*c2;
c1 *= c2;

// add a ciphertexts
c1 = c1+c2;
c1 += c2;

// decrypt the result
Plaintext result = seckey.decrypt(c1);

//print the results 
std::cout<<result;

License

This software is distributed under a proprietary license. If you have any question, please contact us at certfhe@certsign.ro.

About

Homomorphic Encryption scheme from monoid algebras

Resources

License

Stars

Watchers

Forks

Packages

No packages published