D-5.6 RNS-based Decryption
This subsection will explain how to efficiently decrypt RNS-based ciphertexts for BFV, CKKS, and
BGV.
D-5.6.1 BFV Decryption:
Suppose we have a BFV ciphertext
such that (where
). We decrypt the
ciphertext as follows:
(SummaryΒ D-2.3 in Β§D-2.3). However, RNS does not allow direct division and rounding. Therefore, we
need to express this divide-and-round operation in terms of addition and multiplication.
Letβs denote (i.e., a
decryption of ciphertext
without modulo-
reduction). In this description, we will consider only a single set of coefficients
,
, and
extracted from
polynomials ,
, and
for
simplicity.
As explained in Β§A-1.4, modulo arithmetic does not support direct division. Meanwhile, the special relation
holds if
divides
and an
inverse of
modulo
exists (i.e.,
and
are co-prime). Inspired by this, we can express the decrypted plaintext
as
follows:
where
is a
rounding error
where
is a
scaling error
where
, and
therefore is
divisible by
Now, we choose some prime number
which is co-prime to
and . Then, we derive
the expression for
as follows:
where
is a
multiplication error
where
is a
rounding error
where
is a
scaling error
Next, we derive the expression for
as follows:
assuming
and
and
since
is divisible
by , and
is co-prime
to
since
is a
multiple of
Given the above relation, notice that the computation result of
can be
expressed as follows:
where
for the base
moduli
as we previously
showed that
letβs denote the
above expression as
Then, if are small
enough such that ,
then (as
as a multiple of
). Therefore, we can effectively
remove the noise terms
and derive
as follows:
since
, which is the final decryption of ct we wanted to compute. Letβs denote the RNS vector of
as a
. Then, we can efficiently
compute the term
as follows:
since
since
since
since
and
We summarize
as follows:
SummaryΒ D-5.6.1
Input:
-
1.
- Pick some prime number
which is co-prime to
and .
-
2.
- Compute
-
3.
- Compute
D-5.6.2 CKKS and BGV Decryption
CKKS and BGV ciphertexts can be decrypted efficiently by performing the ModDrop operation
(SummaryΒ D-5.4 in Β§D-5.4) to the lowest multiplicative level. After this, there remains only a single
ciphertext modulus in the RNS base, so the regular decryption algorithm can be executed efficiently
without any RNS components.