arXiv:2610.29983cs.CROct 2026

Manuscript Offprint

arXiv:2610.29983

Free-XOR TFHE via Lazy Bootstrapping

Ali Ajorian, Osman Biçer

Abstract

Gate bootstrapping (GB) is a widely used technique in FHEW-like fully homomorphic encryption schemes, such as TFHE, for evaluating Boolean gates while simultaneously reducing the noise of the resulting ciphertext. However, the computational cost of GB is typically dominated by an expensive blind rotation (BR). [7] proposed a gate bootstrapping framework in which XOR gates can be evaluated simply by adding the two input ciphertexts, resulting in what they call free-XOR. To obtain a functionally complete set of operations, they further designed a GB procedure for evaluating AND gates using two lightweight blind rotations. In this work, we propose a similar gate bootstrapping framework that supports free evaluation of XOR gates while evaluating all symmetric binary Boolean gates, i.e., the 8 gates whose output is identical for the inputs (0, 1) and (1, 0), using two blind rotations. In addition to providing broader gate support, our construction is substantially simpler than that of [7], both conceptually and in terms of implementation.

CCS Concepts: • Software and its engineering → Software organization and properties.

Keywords: Fully Homomorphic Encryption, Gate Bootstrapping, Free-XOR, TFHE

1 Introduction

Fully homomorphic encryption (FHE) allows computation directly on encrypted data without decrypting it. Among FHE schemes, TFHE [11] is widely used for Boolean circuits. In the conventional TFHE approach, each bit is encrypted independently as an LWE ciphertext, and each gate is evaluated through programmable bootstrapping (PBS), which computes a function on the encrypted value while refreshing the ciphertext to control noise accumulation. PBS is one of the most expensive operations in TFHE, so the cost of evaluating a circuit is strongly influenced by the number of bootstrappings it requires.

In conventional TFHE, every gate, including XOR gates, is evaluated via PBS. Chen et al. [7] proposed an approach called free-XOR, which allows XOR gates to be evaluated without PBS. This is possible because XOR corresponds to addition modulo 2, which can be implemented directly using lightweight homomorphic addition. Therefore, circuits containing many XOR gates, such as those arising in symmetric cryptography and arithmetic, can benefit significantly from this technique.

Osman Biçer

University of Basel

Switzerland

osman.bicer@unibas.ch

Although achieving free-XOR for circuits consisting only of XOR gates is straightforward, extending the approach to support a complete set of Boolean gates is considerably more challenging. To obtain a functionally complete gate set, Chen et al. [7] proposed an algorithm for evaluating AND gates based on the NTRU hardness assumption, at the cost of two blind rotations.

Our contribution. In this work, we propose a similar gate bootstrapping framework that supports free evaluation of XOR gates while evaluating all symmetric binary Boolean gates, i.e., the 8 gates whose output is identical for the inputs (0,1)(0,1) and (1,0)(1,0), using two blind rotations. Our construction is conceptually simpler than that of [7], only based on learning with error (LWE) hardness assumption, making it easier to implement.

Our main ideas are as follows.

  • Two-bit encoding with the Free-XOR property. We encode each bit as an element of Z4Z_4, with the least significant bit representing the encoded Boolean value. Addition modulo 4 therefore computes the XOR of the underlying bits without requiring a programmable bootstrapping (PBS). The most significant bit acts as a redundant component that can be eliminated through bootstrapping when necessary. As in conventional TFHE constructions, we also reserve a padding bit to support non-negacyclic functions during programmable bootstrapping. Additionally, we introduce headroom into the encoding to accommodate multiple consecutive XOR additions over the integers without carrying into the padding bit. Since the available headroom is bounded and the noise accumulates across successive additions, we periodically estimate headroom consumption and refresh the ciphertext when necessary. We refer to this strategy as lazy bootstrapping.

• Symmetric gate evaluation with two PBS. For two input bits b0,b1∈{0,1}b_0, b_1 \in \{0,1\} of a symmetric gate, the corresponding truth-table row can be indexed by i=2b0+b1∈{0,1,2,3}i = 2b_0 + b_1 \in \{0,1,2,3\}. Given their two-bit encoded values m0m_0 and m1m_1, we obtain this index as i=2m0+π(m1)(mod4)i = 2m_0 + \pi(m_1) \pmod{4}, where π(x)=xmod  2\pi(x) = x \mod 2. The function π\pi is evaluated homomorphically using one PBS, yielding an encryption of the truth-table index. A second PBS then applies a lookup table representing the gate's truth table to obtain an encryption of the gate output. Thus, any two-input symmetric Boolean gate can be evaluated using two PBSs.

• Headroom analysis and failure probability. We analyze the constraints on the headroom, deriving a lower bound determined by the number of consecutive additions between bootstrappings and an upper bound imposed by modulus-switching noise. We also analyze the resulting failure probability to guide the selection of suitable parameters.

We implemented our approach in Rust using the low-level API of TFHE-rs [21]. As expected, our experimental results show that our framework reduces circuit evaluation time compared with standard TFHE gate bootstrapping when the number of XOR gates significantly exceeds the number of symmetric gates. This improvement stems from evaluating XOR gates without programmable bootstrapping (PBS), whereas each symmetric gate requires two PBS operations. Consequently, our approach is particularly beneficial for circuits in which XOR gates dominate the gate composition.

Organization. Section 2 reviews the necessary background, including LWE and GLWE encryption, programmable bootstrapping, and TFHE for Boolean circuits. Section 3 presents our free-XOR framework, including the noise analysis. Section 4 describes our implementation and experimental results. Finally, Section 5 summarizes our work.