Implementation of Fully Homomorphic Encryption

本文介绍使用Scarab库实现全同态加密的方法。文章详细列出所需库的安装步骤,包括GMP、MPIR、MPFR及特定版本的FLINT等,并提供编译Scarab库的具体指导。成功构建后将获得名为'integer-fhe'的可执行文件,用于运行多项同态加密测试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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:

  1. C. Gentry, A fully homomorphic encryption scheme
  2. N. Smart and F. Vercauteren, Fully Homomorphic Encryption with Relatively Small Key and Ciphertext Sizes
  3. H. Perl, M. Brenner and M. Smith, POSTER: An Implementation of the Fully Homomorphic Smart-Vercauteren Crypto-System
  4. H. Perl, https://hcrypt.com//scarab-library/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值