Inferensys

Glossary

TFHE Scheme

A fast fully homomorphic encryption scheme that evaluates individual binary gates on encrypted bits via blind rotation, enabling programmable bootstrapping and efficient evaluation of arbitrary functions.
Data scientist reviewing AI evaluation metrics on dashboard, comparison charts visible, casual WeWork analytics setup.
FULLY HOMOMORPHIC ENCRYPTION

What is TFHE Scheme?

TFHE is a fast fully homomorphic encryption scheme that evaluates arbitrary binary gates on encrypted data, enabling unbounded computation through an efficient programmable bootstrapping operation.

The TFHE scheme (Torus Fully Homomorphic Encryption) is a fully homomorphic encryption variant that represents ciphertexts as points on a mathematical torus, enabling the direct evaluation of individual binary gates on encrypted bits. Unlike schemes optimized for arithmetic circuits, TFHE excels at evaluating arbitrary boolean functions through a unique blind rotation operation that homomorphically selects entries from an encrypted lookup table.

TFHE's defining innovation is programmable bootstrapping, which simultaneously refreshes the ciphertext's noise budget and evaluates a user-defined function in a single step. This enables gate bootstrapping—where each binary gate operation automatically resets noise—allowing circuits of unbounded depth without pre-computing multiplicative depth, making TFHE ideal for applications requiring branching logic and non-polynomial functions.

FAST FULLY HOMOMORPHIC ENCRYPTION

Key Features of TFHE

The TFHE scheme distinguishes itself from other homomorphic encryption approaches through its unique gate-by-gate bootstrapping and ability to evaluate arbitrary functions on encrypted data without decryption.

01

Gate-Level Bootstrapping

Unlike leveled schemes that require pre-determined circuit depths, TFHE performs bootstrapping after every binary gate evaluation. This refreshes the noise budget immediately, enabling unbounded computation depth without prior knowledge of the circuit. Each NAND gate operation triggers a blind rotation that simultaneously resets noise and evaluates the gate function, making TFHE ideal for complex, branching programs where the computation path is not known in advance.

02

Programmable Bootstrapping (PBS)

TFHE's defining innovation extends bootstrapping beyond noise management. Programmable bootstrapping evaluates a lookup table (LUT) during the noise refresh, mapping an encrypted input to an arbitrary encrypted output in a single operation.

  • Evaluates any univariate function on encrypted data
  • Replaces polynomial approximations with exact LUT evaluations
  • Enables non-linear activations like ReLU or sigmoid directly on ciphertexts
  • Serves as the foundation for encrypted neural network inference
03

Blind Rotation Core

The cryptographic engine of TFHE is the blind rotation, which homomorphically shifts a polynomial ring element by an encrypted value. This operation effectively performs a circular shift on an encrypted vector, enabling the extraction of specific coefficients that encode the result of a lookup table evaluation. The blind rotation leverages RLWE-based key switching and Gadget decomposition to achieve sub-second bootstrapping latencies, making TFHE the fastest FHE scheme for evaluating individual gates.

04

Binary vs. Integer Arithmetic

TFHE natively operates on encrypted bits rather than encrypted integers, evaluating circuits gate by gate. This contrasts with schemes like CKKS and BFV that perform word-level arithmetic via SIMD packing.

  • TFHE: Optimal for boolean circuits, comparisons, and bitwise operations
  • CKKS/BFV: Optimal for vectorized arithmetic on large datasets
  • Trade-off: TFHE excels at low-latency, single-bit operations; word-level schemes offer higher throughput for batched computations
  • Hybrid approaches now combine TFHE bootstrapping with CKKS arithmetic for optimal performance across diverse workloads
05

Fastest Bootstrapping Latency

TFHE achieves bootstrapping in under 13 milliseconds on modern hardware, a dramatic improvement over earlier schemes that required seconds or minutes. This speed enables practical interactive applications:

  • Encrypted real-time control systems
  • Privacy-preserving biometric authentication
  • Secure database queries with response times acceptable for user-facing applications

The scheme's computational efficiency stems from its use of torus-based arithmetic and optimized FFT-based polynomial multiplications.

< 13 ms
Bootstrapping Latency
Single Gate
Granularity
06

Torus-Based Ciphertext Encoding

TFHE represents ciphertexts as elements on the real torus (the continuous circle group), enabling efficient discretization and noise management. This mathematical structure allows:

  • Exact representation of binary values as torus phases
  • Natural compatibility with floating-point-like operations
  • Efficient blind rotations via polynomial ring structures over the torus

The torus formulation bridges the gap between continuous real-number arithmetic and discrete lattice-based cryptography, providing a clean algebraic framework for gate-level homomorphic evaluation.

TFHE SCHEME DEEP DIVE

Frequently Asked Questions

Explore the core mechanics of the TFHE scheme, from its unique gate-by-gate bootstrapping to its role in low-latency encrypted inference.

The TFHE scheme (Torus Fully Homomorphic Encryption) is a fast fully homomorphic encryption scheme that evaluates individual binary gates on encrypted bits via a unique blind rotation operation, enabling programmable bootstrapping and efficient evaluation of arbitrary functions. Unlike CKKS and BFV, which operate on large vectors of encrypted integers or real numbers using SIMD packing, TFHE operates on single bits or small integers. This fundamental design choice allows TFHE to perform a bootstrapping operation after every single gate evaluation, effectively resetting the noise budget immediately. This gate-by-gate bootstrapping eliminates the need to pre-calculate a multiplicative depth, making it ideal for evaluating data-dependent branching logic and lookup tables that are difficult to express in leveled schemes. The trade-off is that TFHE has a higher computational cost per operation compared to batched vector operations, but it achieves significantly lower latency for individual function evaluations.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.