D-4.8 Ciphertext-to-Ciphertext Multiplication

- Reference: Introduction to the BGV encryption scheme

Since BGV uses a leveled ciphertext modulus chain like CKKS, BGV’s ciphertext-to-ciphertext multiplication scheme is exactly the same as CKKS’s scheme (Summary D-2.7 in §D-2.7), except for the rescaling step which uses BGV’s modulus switch (§D-4.7).

Summary D-4.8 BGV Ciphertext-to-Ciphertext Multiplication

Suppose we have the following two RLWE ciphertexts:

𝖱𝖫𝖶𝖤S,σ(M1+ ΔE1) = (A1,B1), where B1 = A S + M1+ ΔE1

𝖱𝖫𝖶𝖤S,σ(M2+ ΔE2) = (A2,B2), where B2 = A S + M2+ ΔE2

Multiplication between these two ciphertexts is performed as follows:

1.
Basic Multiplication

Compute the following:

D0 = B1B2

D1 = A1B2+ A2B1

D2 = A1A2

, where M1M2+ Δ (M1E2+ M2E1) + Δ2E1E2

= B1B2 D0 + (B2A1+ B1A2) D1 S + (A1A2) D2 S S S2

= D0 + D1 S + D2 S2

2.
Relinearization

𝖱𝖫𝖶𝖤S,σ(M1M2+ Δ (M1E2+ M2E1) + Δ2E1E2)

= 𝖱𝖫𝖶𝖤S,σ( D0 + D1 S + D2 S2 )

Cα + Cβ, where  Cα = (D1,D0),   Cβ =  𝖣𝖾𝖼𝗈𝗆𝗉β,l(D2),𝖱𝖫𝖾𝗏S,σβ,l(S2) 

3.
(Optional) Rescaling

To suppress the noise’s growing scaling factor from Δ2 to Δ, switch the ciphertext’s modulo from q q^ by updating (A,B) to (A^,B^) according to BGV’s modulus switch explained in Summary D-4.7 (§D-4.7).

After the above update of (A,B) to (A^,B^), the noise scaling factor Δ = t and the plaintext M stay the same, as we proved in §D-4.7 that ((A^ S + B) mod q^) mod t = M.

Swapping the Order of Relinearization and Rescaling: The order of relinearization and rescaling is interchangeable. Running rescaling before relinearization reduces the size of the ciphertext modulus, and therefore the subsequent relinearization can be executed faster.

Details of the Optional Rescaling: Before rescaling, the contents of the ciphertext are M1M2+ Δ (M1E2+ M2E1) + Δ2E1E2+ 𝜖, where 𝜖 is a relinearization error. Therefore, after each ciphertext-to-ciphertext multiplication, the noise’s scaling factor will become squared as Δ2,Δ4,Δ8,. To reduce such exponential noise growth rate, we can optionally rescale down the ciphertext by wl = ql ql1 > Δ at the end of each relinearization at multiplicative level l, which is the noise’s growth rate (effectively keeping the noise scaling factor as Δ). After rescaling, the ciphertext gets scaled down by wl and then added by a new noise 𝜖2, which generates a new noise 𝜖2. Before the rescaling, the noise grew roughly by the factor of Δ = t (as the largest noise term is Δ2E1E2), but the rescaling process reduces this growth rate by the factor of wl and then introduces a new constant noise 𝜖2. Therefore, if wl is sufficiently bigger than Δ = t, the resulting noise will decrease compared to both ΔE1 and ΔE2. Due to this reason, when we design the modulus chain of BGV, we require each wl to be sufficiently bigger than Δ = t to effectively reduce the noise growth rate upon each ciphertext-to-ciphertext multiplication (while ensuring the property that its reduction modulo t gives the plaintext M as explained in §D-4.7). Meanwhile, the constant noise term 𝜖2 gets newly added upon each rescaling, but this term becomes part of the rescaled ciphertext, which will be later reduced by the factor of wl1 in the future rescaling. Therefore, BGV’s rescaling upon ciphertext-to-ciphertext multiplication effectively suppresses the noise growth.

On the other hand, the above design strategy of noise reduction is inapplicable to CKKS, because in CKKS, we use the scaling factor Δ to scale the message M (not the noise E), and thus CKKS requires each wl Δ in order to preserve the plaintext’s scaling factor Δ as the same value across ciphertext-to-ciphertext multiplications. Because of this difference in design, CKKS inevitably increases the noise after each ciphertext-to-ciphertext multiplication.