The LWE decryption formula is summarized as follows:
Summary B-2.3 LWE Decryption
Decryption Input:
For correct decryption, the noise should be .
During decryption, the secret key owner can subtract from because he can directly compute by using his secret key .
The reason we scaled the plaintext by is: (i) to left-shift by bits and separate it from the noise in the lower bits during encryption, whereas is essential to make it hard for the attacker to guess or ; and (ii) to eliminate in the lower bits by right-shifting it by bits without compromising in the higher bits during decryption. The process of right-shifting (i.e., scaling) the plaintext by bits, followed by adding the noise , is illustrated in Figure 8.
In Summary B-2.2 (§B-2.2), we assumed that divides . In this case, there is no upper or lower limit on the size of plaintext : its value is allowed to wrap around modulo indefinitely, yet the decryption works correctly. This is because any value greater than will be correctly modulo-reduced by when we perform modulo reduction by during decryption.
On the other hand, suppose that does not divide . In such a case, we set the scaling factor as . Then, provided , the decryption works correctly even if is a large value that wraps around . We will show why this is so.
In this subsection’s analysis, we choose to be an odd (prime) number, which is the general FHE practice for computational efficiency reasons (see §A-10.6.1). We assume the use of the centered residue system, where the plaintext domain is and the ciphertext domain is . We denote plaintext as , where , and is an integer that represents the -overflow portions of . We set the plaintext scaling factor as . Then, the noise-added and -scaled plaintext can be expressed as follows:
applying
where , a decimal value between
Remember that the LWE decryption relation: . Therefore, from the above expression, we can decrypt the message by computing as follows:
In order for the decryption to work, we ideally want to eliminate the inner modulo reduction. That is, assuming the centered residue system , we want , or more strictly, .
To ensure these conditions hold, we will make a special assumption: . Applying this assumption to the expression above, we can derive the following relation:
we assume is an odd prime, as that’s the general FHE practice
applying our special assumption
since
Therefore, if we assume , then can be simplified to . We continue with the following derivation:
since
applying special assumption
To summarize, if we set the plaintext’s scaling factor as and is an odd (prime) number, the decryption works correctly as long as the following error-bounding condition holds: . This condition (i.e., decryption) breaks if: (1) the noise is too large relative to ; (2) the plaintext modulus is too large relative to ; or (3) the plaintext value wraps around too many times (i.e., is too large). A general solution to ensure all these error bound conditions is to set the ciphertext modulus to be sufficiently large. To put it differently, if and , then the error bound holds.
We can generalize the formula for the plaintext’s scaling factor in Summary B-2.2 (in §B-2.2) as , where is an odd (prime) number.
Summary B-2.3.1 Noise Budget for an Odd Plaintext Modulus
Given the plaintext’s scaling factor and is an odd (prime) number, the LWE decryption works correctly as long as the error-bounding condition holds:
, where is a decimal value between , and accounts for the -overflows of the plaintext .