Inferensys

Glossary

TFHE Scheme

A fully homomorphic encryption scheme optimized for fast gate-by-gate bootstrapping of binary circuits, enabling efficient evaluation of arbitrary boolean functions on encrypted bits.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
FULLY HOMOMORPHIC ENCRYPTION

What is the TFHE Scheme?

TFHE is a fully homomorphic encryption scheme optimized for fast gate-by-gate bootstrapping of binary circuits, enabling efficient evaluation of arbitrary boolean functions on encrypted bits.

TFHE (Torus Fully Homomorphic Encryption) is a fully homomorphic encryption scheme that represents ciphertexts as points on a mathematical torus, enabling the evaluation of arbitrary boolean circuits on encrypted data. Unlike schemes optimized for arithmetic on packed vectors, TFHE excels at evaluating individual binary gates with an extremely fast bootstrapping procedure that refreshes ciphertext noise after every operation, achieving sub-0.1-second latency per gate.

The scheme's core innovation is programmable bootstrapping, which simultaneously resets the noise budget and evaluates a univariate lookup table function, allowing non-linear operations like activation functions to be computed directly on ciphertexts. This makes TFHE the foundation for frameworks like Concrete ML, where standard machine learning models are converted into FHE-compatible circuits for encrypted inference without exposing raw input data.

SCHEME ARCHITECTURE

Key Features of TFHE

TFHE (Torus Fully Homomorphic Encryption) is a fast FHE scheme that operates on individual encrypted bits, enabling efficient evaluation of binary circuits with a unique gate-by-gate bootstrapping approach.

01

Gate Bootstrapping

TFHE's defining feature is its ability to bootstrap after every single binary gate operation. Unlike leveled schemes that exhaust a noise budget, TFHE evaluates a boolean circuit gate-by-gate, refreshing the ciphertext noise immediately after each NAND or XOR. This enables unlimited circuit depth without pre-computing multiplicative depth. The bootstrapping procedure itself is the core computational unit, not a fallback recovery mechanism.

< 13ms
Bootstrapping latency per gate
02

Torus Representation

TFHE operates over the real torus (the continuous circle group R mod Z), representing plaintexts as points on a circle and ciphertexts as torus polynomials with added noise. This toroidal structure enables a natural mapping between continuous Gaussian error and discrete plaintext values. The scheme leverages TLWE (Torus Learning With Errors) samples, which generalize LWE over the torus, providing a unified framework for both encryption and bootstrapping operations.

04

Binary Circuit Efficiency

TFHE excels at evaluating boolean circuits rather than arithmetic circuits. Each encrypted bit is an independent TLWE ciphertext, and operations proceed as logical gates. This makes TFHE ideal for:

  • Decision trees and random forests
  • Integer comparisons and sorting networks
  • Lookup table evaluation
  • Finite state machines The scheme is less suited for deep arithmetic circuits where packed SIMD schemes like CKKS dominate, but outperforms them on branching logic and bitwise operations.
05

Circuit Bootstrapping

A specialized bootstrapping variant that produces a low-noise ciphertext suitable for subsequent operations, rather than just a refreshed one. This enables composable function evaluation where the output of one bootstrapped gate feeds cleanly into the next. Circuit bootstrapping evaluates a lookup table while simultaneously reducing noise to a level compatible with linear operations like key switching, enabling deeper compositions of programmable bootstrapping blocks.

06

External Product

The core mathematical operation enabling TFHE bootstrapping is the external product between a TLWE ciphertext and a TRGSW (Torus Ring GSW) ciphertext. This operation multiplies an encrypted bit by an encrypted integer in the exponent, forming the basis for the accumulator update during bootstrapping. The external product is the computational bottleneck of TFHE, and its optimization through FFT-accelerated polynomial multiplication directly determines scheme performance.

TFHE SCHEME

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the TFHE fully homomorphic encryption scheme, its mechanisms, and its role in encrypted computation.

The TFHE scheme (Torus Fully Homomorphic Encryption) is a fully homomorphic encryption scheme optimized for fast gate-by-gate bootstrapping of binary circuits. It enables the efficient evaluation of arbitrary boolean functions on encrypted bits. Unlike schemes that operate on packed integers or real numbers, TFHE represents ciphertexts as points on a mathematical torus (a circle of real numbers modulo 1). Its core innovation is an extremely fast programmable bootstrapping procedure that simultaneously refreshes ciphertext noise and evaluates a lookup table (LUT) function in approximately 13 milliseconds on modern hardware. This makes TFHE uniquely suited for applications requiring low-latency evaluation of non-linear functions, such as neural network activation layers, on encrypted data. The scheme's security relies on the Ring Learning With Errors (RLWE) and Learning With Errors (LWE) lattice-based hardness assumptions, providing post-quantum security guarantees.

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.