D-2.3 Encryption and Decryption

BFV encrypts and decrypts ciphertexts based on the RLWE cryptosystem (§B-3) with the sign of each A S term flipped in the encryption and decryption formula. Specifically, this is equivalent to the alternative version of the GLWE cryptosystem (§B-4.4) with k = 1. Thus, BFV’s encryption and decryption formulas are as follows:

Summary D-2.3 BFV Encryption and Decryption

Initial Setup: Δ = q t is a plaintext scaling factor for polynomial encoding, S $Rn,2

, where plaintext modulus t is either a prime (p) or a power of prime (pr), and ciphertext modulus q t. As for the coefficients of polynomial S, they can be either binary (i.e., {0,1}) or ternary (i.e., {1,0,1}).


Encryption Input: ΔM Rn,q, Ai $Rn,q, E χσRn,q

1.
Compute B = A S + ΔM + E  Rn,q
2.
𝖱𝖫𝖶𝖤S,σ(ΔM) = (A,B)  Rn,q2


Decryption Input: 𝖼𝗍 = (A,B)  Rn,q2

𝖱𝖫𝖶𝖤S,σ1(𝖼𝗍) = B + A S mod q Δ mod t = ΔM + E Δ mod t = M mod t

(The noise E = i=0n1eiXi gets eliminated by the rounding process)

Conditions for Correct Decryption:

1.
Each noise coefficient ei growing during homomorphic operations should never exceed: ei < Δ 2.
2.
Each plaintext coefficient mi being updated across homomorphic operations should never overflow or underflow q (i.e., mi < q)
3.
The specific noise bound is as explained in §B-2.3.1:

kit + ei q t < 1 2 # kit accounts for the plaintext mi’s wrapped-around value as multiples of t