The post describes the implementation of fully homomorphic encryption by using Scarab library .
The following libraries are required for building hcrypt. You’d better install the libraries in the following sequence.
- GMP: GNU Multiple Precision Arithmetic Library – http://gmplib.org/ (To install GMP, you might first install m4 by the command “apt-get install m4″)
- MPIR: Multiple Precision Integers and Rationals — http://mpir.org/ (required by FLINT)
- MPFR — http://www.mpfr.org/ (required by FLINT)
- FLINT: Fast Library for Number Theory version 1.6 — http://flintlib.org/flint-1.6.tgz (Attention: Version 1.6 is a MUST for the compilation of Scarab library.
Then the compilation of Scarab Lib can be done simply using make. Please kindly notice that Scarab library is under MIT license. To avoid any issue, I will post here neither the library source code of nor the code I have appended.
After successfully building the library, you will get an executable file "integer-fhe", which runs several test of homocrypto. If you are confused by its output, just check "test.c" for reference.
You can also use the library in your own way. What I have currently accomplished is to derive ADD, SUBTRACT, MULTIPLY and DIVIDE function on the basis of Scarab Library.
References:
- C. Gentry, A fully homomorphic encryption scheme
- N. Smart and F. Vercauteren, Fully Homomorphic Encryption with Relatively Small Key and Ciphertext Sizes
- H. Perl, M. Brenner and M. Smith, POSTER: An Implementation of the Fully Homomorphic Smart-Vercauteren Crypto-System
- H. Perl, https://hcrypt.com//scarab-library/