B-2.3 Decryption

1.
Given the ciphertext (A,b) where b = A S + Δ m + e q, compute b A S, which gives the same value as Δ m + e q.
2.
Round Δ m + e q to the nearest multiple of Δ (i.e., round it as a base Δ number), which is denoted as Δ m + eΔ. This rounding operation successfully eliminates e and gives Δm, provided e is small enough to be e < Δ 2. If e Δ 2, then some of the higher bits of the noise e will overlap the plaintext m, won’t be blown away and corrupt some lower bits of the plaintext m.
3.
Compute Δm Δ , which is equivalent to right-shifting Δ m + eΔ by log2Δ bits.

The LWE decryption formula is summarized as follows:

Summary B-2.3 LWE Decryption

Decryption Input: C = (A,b)  qk+1

1.
𝖫𝖶𝖤S,σ1(C) = b A S = Δm + e(𝑚𝑜𝑑q)
2.
Scale down Δm + e Δ mod t = m  t

For correct decryption, the noise e should be e < Δ 2.

During decryption, the secret key owner can subtract A S from b because he can directly compute A S by using his secret key S.

The reason we scaled the plaintext m by Δ is: (i) to left-shift m by log2Δ bits and separate it from the noise e in the lower bits during encryption, whereas e is essential to make it hard for the attacker to guess m or S; and (ii) to eliminate e in the lower bits by right-shifting it by Δ bits without compromising m in the higher bits during decryption. The process of right-shifting (i.e., scaling) the plaintext m by log2Δ bits followed by adding the noise e is illustrated in Figure 8.

B-2.3.1 In the Case of t not Dividing q

In Summary B-2.2 (§B-2.2), we assumed that t divides q. In this case, there is no upper or lower limit on the size of plaintext m: its value is allowed to wrap around modulo t indefinitely, yet the decryption works correctly. This is because any m value greater than t will be correctly modulo-reduced by t when we do modulo reduction by q during decryption.

On the other hand, suppose that t does not divide q. In such a case, we set the scaling factor as Δ = q t. Then, provided q t, the decryption works correctly even if m is a large value that wraps around t. We will show why this is so.

We can denote plaintext m mod t as m = m+ 𝑘𝑡, where m t and k are some integers we use to represent the modulo t wrap-around value portion of m. And we set the plaintext scaling factor as Δ = q t. Then, the noise-added scaled plaintext value is as follows:

q t m + e = q t m+ q t 𝑘𝑡 + e # by applying m = m+ 𝑘𝑡

= q t m+ q t 𝑘𝑡 (q t q t) 𝑘𝑡 + e # where 0 q t q t < 1

= q t m+ 𝑞𝑘 (q p q t) 𝑘𝑡 + e

We treat the above noisy scaled ciphertext as = q t m+ 𝑞𝑘 e+ e, where e = 𝑘𝑡, the maximum possible value of q t) 𝑘𝑡. In other words, we overestimate the noise caused by (q p q t) 𝑘𝑡 to 𝑘𝑡, because the maximum value this term can become is less than 𝑘𝑡.

Given the LWE decryption relation b A S mod q = Δm + e, we can decrypt the above message by performing:

1 q t (q t m+ 𝑞𝑘 e+ e mod q) mod t

= 1 q t (q t m+ 𝑞𝑘 𝑘𝑡 + e mod q) mod t

= 1 q t (q t m𝑘𝑡 + e) mod t

= m𝑘𝑡 + e q t mod t

= m # provided 𝑘𝑡 + e q t < 1 2

To summarize, if we set the plaintext’s scaling factor as Δ = q t where t does not divide q, the decryption works correctly as far as the error bound 𝑘𝑡 + e q t < 1 2 holds. This error bound can break if: (1) the noise e is too large; (2) the plaintext modulus t is too large; and (3) the plaintext value wraps around t too many times (i.e., k is too large). A solution to ensure 𝑘𝑡 + e q t < 1 2 is that the ciphertext modulus q is sufficiently large. To put it differently, if q t, then the error bound will hold.

Therefore, we can generalize the formula for the plaintext’s scaling factor in Summary B-2.2 (in §B-2.2) as q t where t does not necessarily divide q.