Fully Homomorphic Encryption (FHE) is a cryptographic scheme that enables computations to be performed directly on encrypted data, as if the data were in plaintext. After all computations are performed on the encrypted data, it can be decrypted to reveal the result. The decrypted value matches the result that would have been obtained if the same computations were applied to the plaintext data. FHE supports basic operations such as addition and multiplication on encrypted numbers. Using these fundamental operations, more complex computations can be constructed, including subtraction, division, logic gates (e.g., AND, OR, XOR, NAND, MUX), and even advanced mathematical functions such as ReLU, sigmoid, and trigonometric functions (e.g., sin, cos). These functions can be implemented either as exact formulas or as approximations, depending on the trade-off between computational efficiency and accuracy. FHE enables privacy-preserving machine learning by allowing a server to process the client's data in its encrypted form through an ML model. With FHE, the server learns neither the plaintext version of the input features nor the inference results. Only the client, using their secret key, can decrypt and access the results at the end of the service protocol. FHE can also be applied to confidential blockchain services, ensuring that sensitive data in smart contracts remains encrypted and confidential while maintaining the transparency and integrity of the execution process. Other applications of FHE include secure outsourcing of data analytics, encrypted database queries, privacy-preserving searches, efficient multi-party computation for digital signatures, and more. A dynamic website version is available at (https://fhetextbook.github.io). Please report any bugs or errors to the Github issues board.
翻译:全同态加密是一种密码学方案,允许直接在加密数据上执行计算,如同数据处于明文状态。在加密数据上完成所有计算后,可将其解密以揭示结果。解密所得数值与对原始明文数据执行相同计算所获结果完全一致。全同态加密支持对加密数字执行加法与乘法等基础运算。基于这些基本运算,可构建更复杂的计算操作,包括减法、除法、逻辑门(如AND、OR、XOR、NAND、MUX),乃至ReLU、sigmoid及三角函数(如sin、cos)等高级数学函数。这些函数可根据计算效率与精度的权衡,采用精确公式或近似方法实现。全同态加密通过允许服务器以加密形式通过机器学习模型处理客户端数据,实现了隐私保护的机器学习。在此过程中,服务器既无法获知输入特征的明文版本,也无法知晓推理结果。只有客户端能使用其私钥在服务协议结束时解密并获取结果。全同态加密还可应用于机密区块链服务,在保持执行过程透明度与完整性的同时,确保智能合约中的敏感数据始终处于加密保密状态。其他应用场景包括安全的数据分析外包、加密数据库查询、隐私保护搜索、高效的数字签名多方计算等。动态网站版本可通过(https://fhetextbook.github.io)访问。如发现任何程序缺陷或错误,请在Github问题板上提交报告。