- 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 operations between step 26 have consumed 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 -multiple overflows after the mod-raise. On the other hand, BGV is an exact encryption scheme that does not allow the approximation of plaintext values. Therefore, BGV uses BFV’s digit extraction approach to eliminate its modulus overflows. To use digit extraction, as 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 the desired values (i.e., and ), BGV employs the homomorphic decryption technique, as BFV does.
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 (where ), we use the same digit extraction polynomial as in the BFV bootstrapping (§D-2.11.5) :
where , and can be any integer, and
We evaluate the digit extraction polynomial for recursively a total of times. This operation finally zeros out and right-shifts the least significant (base-) digits of as follows:
, where is some multiple of to account for the original -multiple overflow term plus additional -multiple 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. The output of the digit extraction step is stored in each input vector slot.
Handling the Divisions by : Unlike in BFV (§D-2.11.5), we cannot use scaling factor re-interpretation because the scaling factor setup of BGV is different from that of BFV. In BGV’s digit extraction, each round should explicitly homomorphically multiply the slot values by , where is the ciphertext modulus at the -th round of digit extraction. Given is the ciphertext at the 1st round of digit extraction just before inverse- division, the actual division-by- is equivalent to performing the ciphertext-to-plaintext multiplication (§D-2.6) as follows:
since
Therefore, by multiplying the coefficients of two BGV ciphertext polynomials and by , we obtain the following effect:
Verbally speaking, the above inverse- multiplication to all polynomial coefficients of has the following two effects: (2) scales down the plaintext and the noise by ; and (2) reduces the modulus garbage term to (i.e., right-shift by 1 base- digit).
BGV’s digit extraction procedure is equivalent to recursively evaluating with the input by decreasing by 1 at each round (total rounds) as follows:
Input:
1st Round:
2nd Round:
3rd Round:
-th Round:
As shown above, the entire digit extraction procedure results in two effects on the values stored in the plaintext slots: (1) scales down the message to ; and (2) zeros out the modulus garbage (i.e., ); and. The reason why gets updated to across rounds is that each -th round’s evaluation of function and is done modulo , which produces new -multiple overflow garbage values each time.
Beneficially, the rounds of inverse- multiplications yields the effect of scaling down the plaintext , and the noise , which has the desired noise scaling factor for standard BGV ciphertexts.
The Reason for Modulus Switch from : 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).
The Choice of : The larger is, the greater the (base-) digit-wise gap between and becomes; thus, the less likely it is that the decryption would fail (i.e., fail to zero out ). However, a larger means the digit extraction operation would be more expensive.
Generalization to : Like the case of BFV’s bootstrapping (Summary D-2.11.6 in §D-2.11.6), we can generalize the plaintext modulus (i.e., noise scaling factor) to where is a prime and can be any positive integer.
Both BFV and BGV’s bootstrapping use digit extraction, but for different purposes. In BFV, digit extraction is used to eliminate the noise in the lower-bit area. In BGV, digit extraction is used to eliminate the modulus garbage values in the lower-bit area generated by ModRaise from . In addition, at each round of BGV’s digit extraction, we explicitly multiply the coefficients of the ciphertext polynomials by . In BFV, this explicit inverse- multiplication is skipped and we only conceptually re-interpret the scaling factor.
CKKS’s bootstrapping does not involve digit extraction because it has no values to eliminate in the lower-bit area. Instead, regarding the modulus garbage value ModRaise from , this is eliminated by EvalExp’s homomorphic evaluation of an approximate sine function. Although CKKS’s bootstrapping resets its modulus to a large value, this operation does not decrease the noise-to-message ratio, and this ratio continuously increases over homomorphic operations.