- Reference 1: A Full RNS Variant of FV-like Somewhat Homomorphic Encryption Schemes [24]
- Reference 2: BASALISC: Programmable Hardware Accelerator for BGV FHE [25]
Suppose we have (where is a big modulus). Then, we can express by using RNS (§A-13.1) as , where each , , and are co-prime. In RNS, we define base conversion as an operation of converting the RNS residues into , where are a new base, and and are all co-prime. The relationship between and is: (where and ). The standard way of performing base conversion is assembling into by computing (where ), and then computing for . However, this computation is slow if the modulus is large. To compute the base conversion fast, we design the fast base conversion operation as follows:
Summary D-5.1 Fast Base Conversion: FastBConv
Input: # which represents the big value , where , and are co-prime
# where , and
# which represents the big value
The input to this FastBConv function is a list of RNS residues having the prime moduli as the base. This RNS vector represents the big value:
# Theorem A-13.1
The output of this FastBConv function is a list of RNS residues having the prime moduli as the base. This RNS vector represents the big value
# where and
The relationship between and is as follows:
(where is an integer with the magnitude )
# i.e. the fast-base-converted gets noise
Proof.
We will prove why a fast base conversion of into gets an additional noise (where integer ) compared to a standard base conversion. If we did a standard (i.e., exact) base conversion of from base moduli to , then we would compute the following:
But omits the intermediate (big) reduction modulo and directly applies (small) reduction modulo for the sake of fast computation, so that our conversion process does not need to handle large values whose magnitude can be as large as . In this approach of fast base conversion, for each , the computation result of is some value between , because is some integer between and . Therefore, . If we sum such values for , then the total sum (Summary A-13 in §A-13) for some integer (where represents the -multiple overflows). And since we have shown that for each , has to be greater than and smaller than (i.e., is an integer between ). Therefore, can have maximum underflows and overflows. Thus, while standard (i.e., exact) base conversion computes each residue as (i.e., ), fast (i.e., approximate) base conversion computes each residue as (i.e., , where integer ). Notice that the residual difference (i.e., error) between each and is , and the collective noise generated by fast base conversion from is . Also, note that the RNS residue vector represents the big value .
Importantly, FastBConv does not guarantee the correctness of base conversion, because the -multiple overflow would generate a non-negligible error. Yet, FastBConv is used as an essential building block for various RNS-based operations such as ModRaiseRNS (§D-5.2) and ModSwitchRNS (§D-5.4). □