- Reference: Bootstrapping for BGV and BFV Revisited [14]
BGV’s bootstrapping shares some common aspects with both BFV and CKKS’s bootstrapping. The goal of BGV’s bootstrapping is the same as that of CKKS, but the internal technique is closer to that of BFV. Like CKKS, BGV’s bootstrapping resets the depleted ciphertext modulus from (strictly speaking, from such that because the bootstrapping operation itself consumes some multiplicative levels). This modulus transition effectively not only resets the multiplicative level but also reduces the noise-to-ciphertext modulus ratio. To achieve this goal, one might think that BGV’s bootstrapping can take the same ModRaise approach used by CKKS’s bootstrapping. However, this is not a directly applicable solution, because CKKS uses the sine approximation technique to eliminate the -overflows after the mod-raise. On the other hand, BGV is an exact encryption scheme which does not allow approximation of plaintext values. Therefore, BGV uses BFV’s digit extraction approach to eliminate its modulus overflows. To use digit extraction, like in the case of BFV, BGV also has to modify the plaintext modulus to a specially prepared one, . To configure both the plaintext modulus and the ciphertext modulus to desired values (i.e., and ), BGV uses the homomorphic decryption technique like BFV.
The technical details of BGV’s bootstrapping are as follows.
Suppose that we have an RLWE ciphertext , where , (a prime), and is the ciphertext modulus of the current multiplicative level.
Note that is the -multiple overflow and does not get reduced modulo , because . We saw the same situation in the CKKS bootstrapping’s ModRaise (§D-3.13.1) which resets the ciphertext modulus from at the cost of incurring a overflow, which is to be removed by EvalExp’s homomorphic (approximate) sine graph evaluation (§D-3.13.4). Likewise, BGV’s mod-raised ciphertext is , an encryption of . In the later step, we will use digit extraction to homomorphically eliminate like we did in BFV’s bootstrapping. The reason BGV’s bootstrapping uses digit extraction instead of approximated sine evaluation is that BGV is an exact encryption scheme like BFV (not an approximate scheme like CKKS).
# applying
# rearranging the terms
# where
To eliminate from the above, we will use the same digit extraction polynomial as in BFV (§D-2.11.5) :
# where , and can be any integer, and
We evaluate the digit extraction polynomial for recursively total times, at each coefficient of polynomial stored at input vector slots. This operation finally zeros out the least significant (base-) digits of as follows:
, where is some multiple of to account for the original -overflow term plus an additional -overflows generated during the digit extraction. Note that the digit extraction step reduces the ciphertext modulus from (where is an integer smaller than ), because the homomorphic evaluation of the polynomial requires some ciphertext-to-ciphertext multiplications, which consume some multiplicative levels.
Note that the plaintext value is also equivalent to (because divides ), and is also equivalent to (i.e., the message portion without the noise is ). Therefore, homomorphically multiplying to a ciphertext that encrypts is equivalent to switching the plaintext modulus from .
In an alternative design, one can eliminate this step of homomorphic multiplication by by re-designing the digit extraction algorithm to gradually shift down the digits by total (base-) digits (by multiplying by at the end of each round of digit extraction).
Meanwhile, the coefficient domain is in modulo . From modulo-’s perspective, the result of step 5 is . It is guaranteed that , because . Therefore, result of SlotToCoeff is a set of polynomial coefficients whose noise is within the noise budget of .
BGV switches the modulus from to eliminate the -multiple overflows during bootstrapping. After switching the modulus and then ModRaise, the encrypted plaintext gets the overflow term, which can be reduced to from the plaintext modulus’s perspective due to the special property (where is the plaintext modulus).
In the case of BFV’s bootstrapping, we need homomorphic decryption (§D-2.11.3) because we need to simultaneously change the ciphertext’s plaintext scaling factor from and the ciphertext modulus from . On the other hand, in the case of CKKS’s bootstrapping, ModRaise instead of homomorphic decryption is sufficient because we only need to change the ciphertext modulus from while keeping the same plaintext scaling factor . Similarly, in the case of BGV’s bootstrapping, ModRaise instead of homomorphic decryption is sufficient because we only need to change the ciphertext modulus from while keeping the noise scaling factor (i.e., the plaintext modulus) .
The larger is, the greater the (base-) digit-wise gap between and becomes, and thus the less likely it is that the decryption would fail (i.e., fail to zero out ). But a larger means the digit extraction operation would be more expensive.
Like the case of BFV’s bootstrapping (Summary D-2.11.7 in §D-2.11.7), we can generalize the plaintext modulus (i.e., noise scaling factor) to where is a prime and can be any positive integer.