D-1.1 Encryption and Decryption

TFHE encrypts and decrypts ciphertexts based on the LWE cryptosystem (§B-2), which is equivalent to the GLWE cryptosystem (§B-4) with n = 1. However, one distinction from the LWE cryptosystem is that TFHE samples the secret key elements from the binary set {0,1}, not from the ternary set {1,0,1}.

Summary D-1.1 TFHE Encryption and Decryption

Initial Setup: Δ = q t, s $2k where t divides q, and each element of s is a 0-degree polynomial


Encryption Input: m t, a $qk, e χσq each element of a is a 0-degree polynomial

1.
Scale up mΔ m  q
2.
Compute b = a s + Δm + e  mod q
3.
𝖫𝖶𝖤s,σ(Δm + e) = (a,b)  qk+1


Decryption Input: 𝖼𝗍 = (a,b)  qk+1

1.
𝖫𝖶𝖤s,σ1(𝖼𝗍) = b a s = Δm + e(𝑚𝑜𝑑q)
2.
Scale down Δm + e Δ = m  t i.e., modulus switch from q t

Condition for Correct Decryption:

In this section, we will often write 𝖫𝖶𝖤s,σ(Δm + e) as 𝖫𝖶𝖤s,σ(Δm) for simplicity, because 𝖫𝖶𝖤s,σ(Δm + e) 𝖫𝖶𝖤s,σ(Δm) (i.e., they decrypt to the same message). Even in the case that we write 𝖫𝖶𝖤s,σ(Δm) instead of 𝖫𝖶𝖤s,σ(Δm + e), you should assume this as an encryption of Δm + e (i.e., the noise is included inside the scaled message).