D-5.6 BGV’s RNS-based Modulus Switch: π–¬π—ˆπ–½π–²π—π—‚π—π–Όπ—π–±π–­π–²π–‘π–¦π–΅

BGV’s RNS-based modulus switch is not computed by ModSwitchRNS, because BGV’s original non-RNS modulus switch (SummaryΒ D-4.7 in Β§D-4.7) is performed in a different manner than BFV or CKKS’s non-RNS modulus switch (SummaryΒ C-4.4 in Β§C-4.4). BGV’s non-RNS modulus switch is computed as follows:

(Aβ€²,Bβ€²) = (⌈q^ ql AβŒ‹, ⌈q^ ql β‹…BβŒ‹) ∈R⟨n,q^⟩2

πœ–Aβ€² = q^ β‹…A βˆ’ql β‹…Aβ€² # where πœ–Aβ€² ∈ β„€ql

πœ–Bβ€² = q^ β‹…B βˆ’ql β‹…Bβ€² # where πœ–Bβ€² ∈ β„€ql

HA = qlβˆ’1 β‹…πœ–Aβ€²mod t

HB = qlβˆ’1 β‹…πœ–Bβ€²mod t

𝖼𝗍^ = (A^,B^) = (Aβ€²+ HA,Bβ€²+ HB) mod q^

Therefore, BGV’s RNS-based modulus switch only needs to compute the above formulas for A^ and B^ based on RNS’s (+,β‹…) arithmetic. In the above computations, the only part that cannot be directly computed by RNS-based (+,β‹…) operations is the rounding in ⌈q^ ql AβŒ‹ and ⌈q^ ql β‹…BβŒ‹. This rounding can be performed in RNS by using 𝖣𝖾𝖼𝖱𝖭𝖲𝖑π–₯𝖡, by setting q = ql and t = q^.