D-5.9 Decomposing Multiplication: DecompMultRNS
In FHE, gadget decomposition (Β§A-6.4) is used to compute ciphertext-to-plaintext
multiplication with small noise. For example, BFV and CKKSβs homomorphic
key switching (SummaryΒ C-5 in Β§C-5) uses gadget decomposition to compute
with small noise (where each
coefficient of the polynomial
can be any value within the range of the ciphertext modulus
).
As another example, the relinearization process of ciphertext-to-ciphertext multiplication
in BFV (SummaryΒ D-2.7.5 in Β§D-2.7.5), CKKS (SummaryΒ D-3.5.6 in Β§D-3.5.6), and BGV
(SummaryΒ D-4.8 in Β§D-4.8) uses gadget decomposition to derive the synthetic ciphertext
when
computing ,
where ,
,
,
, and
. Using
gadget decomposition, we showed the following relations:
used in
key switching
used in
relinearization
However, if we convert a value (e.g., )
into an RNS vector, then it cannot be directly expressed in a gadget-decomposed form based on the
and
parameters. Instead, given the relationship between the value
and its RNS
residues is ,
we can treat each RNS residue as a gadget-decomposed element. For example, suppose our goal is to decompose
, where the RNS
vector of has
base moduli . We
can decompose
as follows:
, where
can be pre-generated as RNS key-switching keys.
Applying the same reasoning as above, we can also derive the following for relinearization:
, where
can be pre-generated as relinearization keys.
RNS-based multiplication decomposition is summarized as follows:
SummaryΒ D-5.9
DecompMultRNS
For key-switching:
Input: ,
key-switching keys
For relinearization:
Input: ,
relinearization keys