D-5.2 RNS-based ModRaise: ModRaiseRNS

- Reference: A Full RNS Variant of Approximate Homomorphic EncryptionΒ [26]

ModRaise is an operation of raising a ciphertext’s modulus from q to π‘žπ‘ (where q β‰ͺπ‘žπ‘). We used ModRaise in BFV’s ciphertext-to-ciphertext multiplication (SummaryΒ D-2.7.5 in Β§D-2.7.5) and in CKKS’s modulus bootstrapping (SummaryΒ D-3.13.7 in Β§D-3.13.7). The RNS-based ModRaise operation is designed as follows:

⟨Summary D-5.2⟩ ModRaiseRNS

Input: (x1,x2,β‹―,xk) ∈ β„€q1 Γ— β„€q2 Γ—β‹― Γ— β„€qk # which represents the big value x ∈ β„€q

π–¬π—ˆπ–½π–±π–Ίπ—‚π—Œπ–Ύπ–±π–­π–²({xi}i=1k,q,π‘žπ‘) # where q and b are co-prime

= π–₯π–Ίπ—Œπ—π–‘π–’π—ˆπ—‡π—π–±π–­π–²({xi}i=1k,q,π‘žπ‘)

= (x1,x2,β‹―,xk,π–₯π–Ίπ—Œπ—π–‘π–’π—ˆπ—‡π—({xi}i=1k,q,b))

= (x1,x2,β‹―,xk,c1,c2,β‹―,cl) ∈ β„€q1 Γ— β„€q2 Γ—β‹― Γ— β„€qk Γ— β„€b1 Γ— β„€b2 Γ—β‹― Γ— β„€bl

= (Ο‡1,Ο‡2,β‹―,Ο‡k+l) ∈ β„€q1 Γ— β„€q2 Γ—β‹― Γ— β„€qk Γ— β„€b1 Γ— β„€b2 Γ—β‹― Γ— β„€bl

# which represents the value Ο‡ ∈ β„€π‘žπ‘

The relationship between Ο‡ and x is as follows:

Ο‡ ≑x + u β‹…q mod π‘žπ‘ # the noise generated by ModRaiseRNS is |π‘’π‘ž|π‘žπ‘ (where integer |u|≀k 2 + 1)

Ο‡ ≑x mod q

Proof.

In Β§D-5.1, we proved that xβ€² = βˆ‘ ⁑ i=1k|xi β‹…zi|qi β‹…yi = x + u β‹…q (where integer |u|≀k 2 + 1). Therefore, the following holds:

xβ€² ≑xi mod qi for i ∈[1,k] # since xβ€² = x + u β‹…q ≑xi mod qi (as qi divides q, so x ≑xi mod qi)

xβ€² ≑cj mod bj for j ∈[1,l] # where each cj = x + π‘’π‘ž mod bj

Therefore, xβ€²mod π‘žπ‘ can be represented as the following RNS residues:

(x1,x2,β‹―,xk,c1,c2,β‹―,cl) ∈ β„€q1 Γ— β„€q2 Γ—β‹― Γ— β„€qk Γ— β„€b1 Γ— β„€b2 Γ—β‹― Γ— β„€bl

= (x1,x2,β‹―,xk,π–₯π–Ίπ—Œπ—π–‘π–’π—ˆπ—‡π—({xi}i=1k,q,b)) ∈ β„€q1 Γ— β„€q2 Γ—β‹― Γ— β„€qk Γ— β„€b1 Γ— β„€b2 Γ—β‹― Γ— β„€bl

Our ideal goal of mod-raising x ∈ β„€q from q β†’π‘žπ‘ is to derive an RNS vector of x mod π‘žπ‘. However, the above RNS vector represents xβ€²mod π‘žπ‘, where xβ€² = x + π‘’π‘ž (with integer |u|≀k 2 + 1). Therefore, we can interpret the above RNS vector as representing x mod π‘žπ‘ with the additional noise |π‘’π‘ž|π‘žπ‘. β–‘