D-3.2 Encryption and Decryption

CKKS’s encryption and decryption schemes are similar to BFV’s encryption and decryption schemes (Summary D-2.3 in §D-2.3).

⟨Summary D-3.2⟩ CKKS Encryption and Decryption

Initial Setup:

Δ is a plaintext scaling factor for polynomial encoding, S ←$R⟨n,𝑡𝑒𝑟𝑛⟩. The coefficients of the polynomial S are ternary (i.e., {−1,0,1}).


Encryption Input: ΔM ∈R⟨n,q⟩, Ai ←$R⟨n,q⟩, E ←ξσR⟨n,q⟩

1.
Compute B = −A ⋅S + ΔM + E  ∈R⟨n,q⟩
2.
𝖱𝖫𝖶𝖤S,σ(ΔM + E) = (A,B)  ∈R⟨n,q⟩2


Decryption Input: 𝖼𝗍 = (A,B)  ∈R⟨n,q⟩2

𝖱𝖫𝖶𝖤S,σ−1(𝖼𝗍) = ⌈B + A ⋅S mod q Δ ⌋1 Δ = ⌈ΔM + E Δ ⌋1 Δ ≈M

▹ ⌈x⌋k means rounding x to the nearest multiple of k

Property of Approximate 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 approximately 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).