This document presents TFHE-rs, Zama’s Rust library implementing an enhanced variant of TFHE. TFHE is a well-known fully homomorphic encryption (FHE) scheme that enables fast bootstrapping for small messages. TFHE-rs introduces advanced encoding techniques to support larger message sizes and employs ciphertext compression to mitigate expansion overhead. To provide a complete foundation, we first recall the necessary cryptographic concepts required to understand TFHE. We then present a comprehensive overview of TFHE-rs, detailing part of its core algorithms and the methods used to construct homomorphic integer ciphertexts—capable of encrypting, for example, a u64—thus significantly expanding the range of possible message spaces. The document systematically presents the operations available on these homomorphic integer types, integrating references to the TFHE-rs API. Additionally, we offer extensive benchmarking results that justify the design choices made in the library, evaluating the latency of all integer operations introduced in this work. Finally, we present recommended parameter sets that ensure secure and efficient execution of these algorithms across a range of failure probabilities.
The code is available here.
- TFHE Deep Dive - Part I - Ciphertext types
- TFHE Deep Dive - Part II - Encodings and linear leveled operations
- TFHE Deep Dive - Part III - Key switching and leveled multiplications
- TFHE Deep Dive - Part IV - Programmable Bootstrapping
Full, comprehensive documentation is available here: https://docs.zama.ai/tfhe-rs.
🌟 If you find this project helpful or interesting, please consider giving it a star on GitHub! Your support helps to grow the community and motivates further development.