ComputeFHE让开发者轻松用加密数据进行通用计算,性能提升最高达3.9倍。
ComputeFHE: A Privacy-Preserving General-Purpose Computation Library

- 基于TFHE构建,支持加密整数与定点数的常规运算
- 通过优化ALU架构减少需重启次数,最快提速3.9倍
- 内置模拟模式,可无加密运行测试算法复杂度
全同态加密(FHE)可在加密数据上直接计算并保持隐私,但高计算开销和开发复杂性限制了其应用。本文提出ComputeFHE,一个开源的C++库,基于TFHE密码体系,提供加密整数与固定点数据类型,支持算术、逻辑、比较、条件及无感知数组访问操作,使开发者能以熟悉的命令式编程范式实现算法。该库既支持传统基于双输入门的TFHE运算,也采用面向FHE优化的算术逻辑单元(ALU)架构。实验表明,关键操作的重启次数显著减少,性能最高提升3.9倍。此外,库内含模拟模式,可在不执行实际加密计算的情况下测试、调试和分析电路复杂度及重启成本。ComputeFHE基于OpenFHE构建,为隐私保护算法与应用的开发与评估提供了实用且易用的框架。
原文摘要 · Abstract (English)
Fully Homomorphic Encryption (FHE) enables computations to be performed directly on encrypted data while preserving data confidentiality. However, its practical applications remain limited by high computational costs and development complexity. This paper presents ComputeFHE, an open-source C++ library that facilitates the development of privacy-preserving applications based on the TFHE cryptosystem. The library provides encrypted integer and fixed-point data types together with arithmetic, logical, comparison, conditional, and oblivious array-access operations which allow developers to implement algorithms using a familiar imperative programming paradigm. ComputeFHE supports both conventional TFHE arithmetic based on standard two-input logic gates and an optimized Arithmetic Logic Unit (ALU) architecture utilizing FHE-friendly logic primitives. Experimental results demonstrate significant reductions in the number of required bootstrapping operations, achieving performance improvements of up to 3.9x for selected operations. In addition, the library includes a simulation mode that enables testing, debugging, and complexity analysis without performing actual cryptographic computations while providing circuit complexity and bootstrapping costs. Built on top of OpenFHE, ComputeFHE offers a practical and accessible framework for developing and evaluating privacy-preserving algorithms and applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。