CKKS RNS KeySwitching - error is too big

I am writing a toy example of CKKS RNS KeySwitching code. I go through the paper “Approximate Homomorphic Encryption with Reduced Approximation Error” 2021, page 9, Key Switching in RNS.

In the formulas WD and PW we use partial products of the moduli. In case when alpha=1 i.e. dnum=L+1, Q~’s are the same as q_i. And, in this case, RNS representation of WD and PW will have only elements corresponding to RNS channels, because cross elements are equal to zero. So, it is the same as multiplying by some coefficients. In the dot product therefore, the coefficients cancel out, and do not reduce the error (noise). The error is reduced only by P which is not enough, if P is one extra digit – a modulus close by value to other moduli q’s.

Am I missing something here? I would assume that a proper digit decomposition must involve MRS (Mixed Radix System) to do something similar to binary decomposition, but I cannot find any support for this assumption. My question is: how is the error (noise) being reduced by digit decomposition if the dot product in RNS does not involve any summation? There is no summation because only diagonal elements are non-zero.

Hi @oleg,

The digit decomposition in RNS (no MRS is needed) was proposed in two prior papers: An Improved RNS Variant of the BFV Homomorphic Encryption Scheme (Section 3.3; improved version) and A Full RNS Variant of FV like Somewhat Homomorphic Encryption Schemes (Section 4.5; original version). Note that this digit decomposition is not specific to hybrid key switching (the auxiliary modulus P is not relevant); it was originally proposed for the BV method.

A more general treatment of RNS gadget decomposition is presented in Section 6 of Building an Efficient Lattice Gadget Toolkit: Subgaussian Sampling and More

Please let me know if this clarifies the details of RNS digit decomposition for you.