Fully Homomorphic Encryption over the Torus (TFHE) is a homomorphic encryption scheme which supports efficient Boolean operations over encrypted bits. TFHE has a unique feature in that the evaluation of each binary gate is followed by a bootstrapping procedure to refresh the noise of a ciphertext. In particular, this gate bootstrapping involves two algorithms called the blind rotation and key-switching. In this work, we introduce several optimization techniques for the TFHE bootstrapping. We first define a new key distribution, called the block binary distribution, where the secret key can be expressed as a concatenation of several vectors of Hamming weight at most one. We analyze the hardness of (Ring) LWE with a block binary secret and provide candidate parameter sets which are secure against the best-known attacks. Then, we use the block key structure to simplify the inner working of blind rotation and reduce its complexity. We also modify the RLWE key generation and the gadget decomposition method to improve the performance of the key-switching algorithm in terms of complexity and noise growth. Finally, we use the TFHE library to implement our algorithms and demonstrate their benchmarks. Our experimentation shows that the execution time of TFHE bootstrapping is reduced from 10.5ms down to 6.4ms under the same security level, and the size of the bootstrapping key decreases from 109MB to 60MB.
In this paper, we propose an encrypted dynamic controller that executes an unlimited number of recursive homomorphic multiplications on a Ring Learning With Errors (Ring-LWE) based cryptosystem without bootstrapping. The proposed controller exhibits lower computational complexity compared to existing encrypted controllers implemented on LWE based schemes due to the polynomial structure of Ring-LWE. However, the structural difference introduces additional difficulties in analyzing the effect of error growth; Ring-LWE based schemes inject multiple error coefficients when encrypting a single message, which accumulate under recursive homomorphic multiplications. We show that their effect on the control performance can be arbitrarily bounded by the closed-loop stability, thus recovering the performance of the unencrypted controller. Furthermore, a novel method to “pack” a vector into a polynomial is presented, which enhances computational and memory efficiency when applied to the proposed encrypted controller. The effectiveness of the proposed design is demonstrated through numerical simulations.