C-4.4 RLWE Modulus Switching

RLWE modulus switching is similar to LWE modulus switching. Recall that the RLWE cryptosystem (§B-3.2) comprises the following components:

RLWE modulus switching is done as follows:

⟨Summary C-4.4⟩ RLWE Modulus Switching

For an RLWE ciphertext (A,B) where B = 𝐴𝑆 + ΔM + E and M ∈R⟨n,q⟩, modulus switch of the ciphertext from q to q^ is equivalent to updating (A,B) to (A^,B^) as follows:

A^ = a^0 + a^1X + a^2X2 + ⋯ + a^n−1Xn−1, where each a^i = ⌈aiq^ q ⌋ ∈ ℤq^

B^ = b^0 + b^1X + b^2X2 + ⋯ + b^n−1Xn−1, where each b^i = ⌈biq^ q ⌋ ∈ ℤq^

𝖱𝖫𝖶𝖤S,σ(Δ^M + E^ + E⟨𝜖𝑎𝑙𝑙⟩ ) = (A^,B^) ∈R⟨n,q^⟩2

The above update effectively changes Δ and E as follows:

Δ^ = Δq^ q ▹ which should be an integer

E^ = e^0 + e^1X + e^2X2 + ⋯ + e^n−1Xn−1, where each e^i = ⌈eiq^ q ⌋ ∈ ℤq^

Meanwhile, S and M stay the same as before.

The proof is similar to that of LWE modulus switching.

Proof

1.
Note the following:

b^i = ⌈biq^ q ⌋ = biq^ q + 𝜖bi (where −0.5 < 𝜖bi < 0.5, a rounding drift error)

a^i = ⌈aiq^ q ⌋ = aiq^ q + 𝜖ai (where −0.5 < 𝜖ai < 0.5)

e^i = ⌈eiq^ q ⌋ = eiq^ q + 𝜖ei (where −0.5 < 𝜖ei < 0.5)

2.
Note the following:

B −A ⋅S

= (b0 + b1X + ⋯ + bn−1Xn−1) −(a0 + a1X + ⋯ + an−1Xn−1)(s0 + s1X + ⋯ + sn−1Xn−1)

= (b0 − (∑ ⁡ i=00(a0−isi) −∑ i=1n−1(an−isi)))

+ (b1 − (∑ ⁡ i=01(a1−isi) −∑ i=2n−1(an+1−isi))) ⋅X

+ (b2 − (∑ ⁡ i=02(a2−isi) −∑ i=3n−1(an+2−isi))) ⋅X2

⋮

+ (bn−1 − (∑ ⁡ i=0n−1(an−1−isi) −∑ i=nn−1(an+n−1−isi))) ⋅Xn−1 ▹ Grouping the terms by same exponents

= ∑ ⁡ h=0n−1 (bh − (∑ i=0h(ah−isi) −∑ i=h+1n−1(an+h−isi))) ⋅Xh

Thus,

B = ∑ ⁡ h=0n−1bhXh

A ⋅S = ∑ ⁡ h=0n−1 (∑ i=0h(ah−isi) −∑ i=h+1n−1(an+h−isi)) ⋅Xh

3.
Based on step 2,

B = A ⋅S + ΔM + E

∑ ⁡ h=0n−1bhXh = ∑ h=0n−1 (∑ i=0h(ah−isi) −∑ i=h+1n−1(an+h−isi))⋅Xh+Δ∑ h=0n−1mhXh+∑ h=0n−1ehXh ∈ ℤq

∑ ⁡ h=0n−1bhXh = ∑ h=0n−1 (∑ i=0h(ah−isi) −∑ i=h+1n−1(an+h−isi))⋅Xh+Δ∑ h=0n−1mhXh+∑ h=0n−1ehXh+H⋅q

(where modulo q is replaced by adding H ⋅q, an (n −1)-degree polynomial whose each coefficient ci is some multiple of q)

4.
According to step 1 and 3, for each j in 0 ≤j ≤n −1:

b^j = bjq^ q + 𝜖bj ∈ ℤq^

= (∑ ⁡ i=0j(aj−isi) −∑ i=j+1n−1(an+j−isi) + Δmj + ej + cj ⋅q) ⋅q^ q + 𝜖bj

= q^ q ∑ ⁡ i=0j(aj−isi) −q^ q ∑ i=j+1n−1(an+j−isi) + q^ q ⋅Δmj + q^ q ej + q^ q ⋅cj ⋅q + 𝜖bj

= ∑ ⁡ i=0j (q^ q ⋅aj−isi) −∑ i=j+1n−1 (q^ q ⋅an+j−isi) + Δ^mj + (e^j −𝜖ej) + q^ ⋅cj + 𝜖bj

= ∑ ⁡ i=0j((a^j−i−𝜖aj−i)⋅si)−∑ i=j+1n−1((a^n+j−i−𝜖an+j−i)⋅si)+Δ^mj+(e^j−𝜖ej)+q^⋅cj+𝜖bj

= ∑ ⁡ i=0j(a^j−isi)−∑ i=j+1n−1(a^n+j−isi)−∑ i=0j(𝜖aj−isi)+∑ i=j+1n−1(𝜖an+j−isi)+Δ^mj+(e^j−𝜖ej)+q^⋅cj+𝜖bj

= (∑ ⁡ i=0j(a^j−isi) −∑ i=j+1n−1(a^n+j−isi))+Δ^mj+e^j+(𝜖bj −𝜖ej −∑ ⁡ i=0j(𝜖aj−isi) + ∑ i=j+1n−1(𝜖an+j−isi))+q^⋅cj

= (∑ ⁡ i=0j(a^j−isi) −∑ i=j+1n−1(a^n+j−isi)) + Δ^mj + e^j + 𝜖𝑎𝑙𝑙 ∈ ℤq^

▹ where 𝜖𝑎𝑙𝑙 = 𝜖bj −𝜖ej −∑ ⁡ i=0j(𝜖aj−isi) + ∑ i=j+1n−1(𝜖an+j−isi) ≈0

5.
To summarize, for each 0 ≤j ≤n −1, each polynomial degree coefficient bj^ is approximately as follows:

b^j = (∑ ⁡ i=0j(a^j−isi) −∑ i=j+1n−1(a^n+j−isi)) + Δ^mj + e^j + 𝜖𝑎𝑙𝑙

≈ (∑ ⁡ i=0j(a^j−isi) −∑ i=j+1n−1(a^n+j−isi)) + Δ^mj + e^j

Thus, (A^,B^) = 𝖱𝖫𝖶𝖤S,σ(Δ^M + E^ + E⟨𝜖𝑎𝑙𝑙⟩ ), decrypting which will give us M.

□