Skip to content
BY 4.0 license Open Access Published by De Gruyter August 7, 2020

CHIMERA: Combining Ring-LWE-based Fully Homomorphic Encryption Schemes

  • Christina Boura , Nicolas Gama , Mariya Georgieva and Dimitar Jetchev

Abstract

This paper proposes a practical hybrid solution for combining and switching between three popular Ring-LWE-based FHE schemes: TFHE, B/FV and HEAAN. This is achieved by first mapping the different plaintext spaces to a common algebraic structure and then by applying efficient switching algorithms. This approach has many practical applications. First and foremost, it becomes an integral tool for the recent standardization initiatives of homomorphic schemes and common APIs. Then, it can be used in many real-life scenarios where operations of different nature and not achievable within a single FHE scheme have to be performed and where it is important to efficiently switch from one scheme to another. Finally, as a byproduct of our analysis we introduce the notion of a FHE module structure, that generalizes the notion of the external product, but can certainly be of independent interest in future research in FHE.

MSC 2010: 94A60

1 Introduction

Homomorphic encryption enables computations on encrypted data without decrypting it. Shortly after the development of the first fully homomorphic encryption (FHE) scheme by Gentry [23], extensive research has been carried out on the design, implementation and cryptanalysis of various other FHE schemes.

Several constructions based on the Ring-LWE problem [26] are today among the most promising FHE candidates, each of them having particular advantages that depend on the type of the target homomorphic operations and arithmetic. More precisely, certain schemes are better for integer arithmetic whereas others have advantages for performing arithmetic with real numbers; some are more suitable for vector operations whereas others perform well in the case of sequential combinatorial operations on individual slots such as the evaluation of Boolean circuits, finite state machines or lookup tables. In addition, different constructions typically tolerate different amounts of noise and hence, homomorphic evaluation of circuits of different multiplicative depth.

It is thus of central importance to be able to use the optimal scheme for each type of operation in a particular computation. This motivates the need for building an efficient hybrid solution combining more than one scheme and switching between these schemes during the individual operations.

This paper proposes such a practical hybrid solution based on efficient switching algorithms for three different Ring-LWE schemes, where each scheme is best suited for certain types of operations: 1) TFHE [18, 19] particularly suitable for combinatorial operations on individual slots and tolerating large noise and thus, large multiplicative depth. 2) B/FV [6, 13, 21] allowing to perform large vectorial arithmetic operations as long as the multiplicative depth of the evaluated circuit remains small; 3) HEAAN [15, 16] - a mixed encryption scheme shown to be very efficient for floating-point computations.

We achieve such a hybrid solution by first mapping the different plaintext spaces of the different schemes to a common algebraic structure using certain natural algebraic homomorphisms. Once such a uniformization of the plaintext spaces has been achieved, we describe our scheme switching algorithms. The main idea here is to replace the expensive bootstrapping algorithms with more efficient key-switching operations. Recall that if 𝓢1 and 𝓢2 are two homomorphic encryption schemes then the concept of bootstrapping, originally introduced by Gentry [23], is a homomorphic evaluation (under the scheme 𝓢2) of the decryption function for the scheme 𝓢1. Since all Ring-LWE-based FHE decryption functions evaluate an inner product followed by a rounding function and since the rounding function is a step function, instead of first applying the expensive bootstrapping and then evaluating a function f, one can replace the last rounding step in the bootstrapping by a more general step function g that approximates f and use a homomorphic lookup table evaluation. This is essentially the idea of the key-switching algorithms described in Section 2.2 that are later used to achieve a switch between the schemes in Sections 3 and 4. Note that the concept of functional key-switch is not new (it appeared already in the context of TFHE [18] and implicitly in the work of Ducas and Micciancio [20]). Yet, its application to scheme switching presented in this work is novel.

To better explain the algebraic aspects of our approach, we let 𝓡m denote the quotient ring (ℤ/mℤ)[X]/(XN + 1) for some integers m and N and we let 𝕋 = ℝ/ℤ be the torus. To introduce the algebraic structure of the plaintext spaces in TFHE, we distinguish two different underlying encryption schemes (an encryption scheme on a ring and a homomorphic one on a module over that ring):

  1. TRGSW : encryption scheme on the ring 𝓡 := ℤ[X]/(XN + 1),

  2. TRLWE : HE scheme on the 𝓡-module 𝕋𝓡 := (ℝ[X]/(XN+1))/𝓡.

The plaintext space for the scheme TRGSW is the ring 𝓡 whereas its ciphertext space is (𝕋N)2 for some integer that depends on various precision and noise parameters (see Section 2 for details). Elseways, the plaintext space for the scheme TRLWE is the 𝓡-module 𝕋𝓡 and the ciphertext space is (𝕋N)2 (see Section 2.2 for details as well as for the definition of the external product which is the homomorphic evaluation algorithm for the ring action on the module).

On the other hand, the plaintext space of B/FV is 𝓡p for some integer p (a prime, a power of 2 or a small number 1 mod 2N, depending on the functionality that we want) and the ciphertext space is Rq2 for some larger integer q. Finally, HEAAN has for message space a ball of radius B in 𝓡q with respect to a certain -norm defined in Section 2.4 and its ciphertext space is Rq2.

It is not too hard to verify that in the three cases listed above, the ciphertext spaces share very similar algebraic structures. For B/FV and HEAAN this is trivial to do; for TFHE, it suffices to identify the ciphertext space Rq2 with a subgroup of the torus (𝕋N)2 as follows: using that Rq2 ≃ ((ℤ/qℤ)N)2, we simply identify q−1 ℤ/ℤ ≃ ℤ/qℤ, the latter being the multiplication-by-q isomorphism of ℤ-modules.

Yet, the plaintext spaces are a priori rather different. In order to apply any key-switching technique, one thus needs to uniformize them (i.e., map them to the same algebraic structure). In addition, this algebraic structure should carry a specific metric allowing us to quantify and measure the noise in the decryption function. We achieve this by using the plaintext space of TFHE, namely ℝ[X]/(XN + 1) modulo ℤ (a space we introduce in Section 2 and denote by 𝕋𝓡 throughout the paper). We then show how to map both B/FV and HEAAN plaintexts to 𝕋𝓡 in Sections 3 and 4.

Our hybrid solution has many practical applications. First and foremost, it becomes an integral tool for the recent standardization initiatives of homomorphic schemes and common APIs [8], especially since TFHE, B/FV (Seal) and HEAAN are part of this standardization process.

Then, imagine a scenario where operations on large datasets must be performed and a decision must be taken on the result. The first part would be easier via the B/FV scheme, whereas the decision function can be evaluated faster in TFHE. Therefore, one would like an efficient method to pass from B/FV to TFHE. Similarly, if more approximate computations have to be performed, one would benefit from a scheme switching between HEAAN and TFHE. Another example comes from the recent Idash’18 Track 2 [1] competition on designing homomorphic solutions for semi-parallel Genome Wide Association Studies (GWAS). One of the operations needed for the challenge required to compute homomorphically the product G−1S, for a small 4 × 4 symmetric matrix G and a much larger 4 × 10000 matrix S. In this scenario, the bootstrapping of TFHE can be used to compute the 10 coefficients of G−1 (via either Gaussian elimination or Cholesky factorization), so these algorithms that include loops, inversions and have very high multiplicative depth, benefit from fast bootstrapping on individual data. Then, the matrix multiplication G−1S can be massively vectorized using the SIMD operations of HEAAN. Similarly, different machine learning algorithms use SIMD operations to produce an output vector and at the end, one needs to compute the maximum of its coordinates. Conversely, various financial systems need to perform small computations on an encrypted database with a potentially very large multiplicative depth over a long period of time and at the end of the period provide statistics on the current dataset. In this case, it is essential to operate in bootstrapped mode as in TFHE and then perform the low-depth statistical calculations in B/FV or HEAAN. In such a scenario, it is important to transform TFHE ciphertexts to B/FV or HEAAN ones.

As a byproduct of our analysis of the three above schemes from the perspective of TFHE, we propose the general definition of a FHE module structure, that is, an external product allowing to homomorphically evaluate the action of the ring R on the module M whenever M is equipped with an HE scheme and R is equipped with a FHE scheme. This concept already appears in a particular case in [18] (named as external product), but it can certainly be of independent interest in future research in FHE. For instance, it permits to express the relinearization in the internal products of HEAAN and B/FV in terms of the FHE module structure for TFHE and this without loss as it is the same algorithm.

Figure 1 Bridges between Ring-LWE homomorphic schemes. Plain arrows represent bridges between the different schemes. Dotted arrows represent inclusion. Finally, the spaces P = p and P = X − p are instantiations of P−1𝓡/𝓡.
Figure 1

Bridges between Ring-LWE homomorphic schemes. Plain arrows represent bridges between the different schemes. Dotted arrows represent inclusion. Finally, the spaces P = p and P = Xp are instantiations of P−1𝓡/𝓡.

2 Preliminaries

Let 𝕋 = ℝ/ℤ be the real torus and let 𝓡 = ℤ[X]/(XN + 1) be the ring of polynomials with integer coefficients modulo XN + 1. For a ring A (e.g., A = ℤ, ℝ, ℂ), let 𝓡A := 𝓡 ⊗A = A[X]/(XN + 1) be the ring of polynomials modulo XN + 1 with coefficients in A. In particular, 𝓡 = 𝓡, so we interchangeably omit the index.

Let 𝕋𝓡 = 𝓡/𝓡 (a.k.a ℝ[X] mod XN + 1 mod ℤ) which we view as an 𝓡-module (it has no ring structure). We often refer to the left action of 𝓡 on 𝕋𝓡 as an external multiplication with coefficients in 𝓡. Moreover, let 𝓑 be the subset of all polynomials of 𝓡 with coefficients in {0, 1} (here, we identify 𝓡 ≃ ℤN as ℤ-modules in the natural way). Finally, if x ∈ 𝓡, let 𝓡x = 𝓡/x 𝓡 and let πx : 𝓡 → 𝓡x be the natural surjection.

We use the p-distance on the N-dimensional torus 𝕋N and write ∥xyp for the distance between two elements x, y ∈ 𝕋. Note that it satisfies ∀ m ∈ ℤ, ∥mxp ≤ ∣m∣ ∥xp. For an integer element a ∈ 𝕋𝓡, consider any representative a(X) = a0 + … + aN−1XN−1 ∈ ℝ[X]. We will (unambiguously) write ∥ap for the norm of the image of (a0, …, aN−1) in 𝕋N.

The notion of Lipschitz function always refers to the -distance: a function f : 𝕋m → 𝕋n is said to be κ-lipschitz if ∥f(x) − f(y)∥κxy for all inputs x, y, where ∥ ⋯ ∥ is the -infinity norm.

In this work, we revisit the three scale-invariant families of HE schemes (TFHE in Section 2, B/FV in Section 3 and HEAAN in Section 4), all of them based on the Ring-LWE problem introduced in [26].

More precisely, we present a slightly different interpretation of these schemes through the concept of FHE module structure that provides a more conceptual interpretation of the corresponding homomorphic evaluation of the action of a ring on a module over that ring. More importantly, in the subsequent sections, we realize each of the plaintext spaces of the schemes B/FV, TFHE and HEAAN as subsets of the 𝓡-module 𝕋𝓡 which enables the scheme-switching algorithms.

2.1 The concept of FHE module structure

The definition below assumes that the decryption algorithms do not introduce any noise in the plaintext (i.e., the decryption is exactly the original message). Note that this allows for probabilistic encryption algorithms.

Definition 1

(Noiseless FHE Module Structure) By a noiseless FHE module structure}, we mean a 7-tuple (R, M, EncR, DecR, EncM, DecM, ⊡) where

  1. R is a ring with an encryption scheme (EncR, DecR) on R without decryption noise and with ciphertext space 𝓒R,

  2. M is an R-module with a homomorphic encryption scheme (EncM, DecM) without decryption noise and with ciphertext space 𝓒M,

  3. ⊡ : 𝓒R × 𝓒M → 𝓒M is an operation (external product) satisfying

    DecM(EncR(r)EncM(m))=rm,rR,mM.

Although quite general, the above definition has several drawbacks as detailed through the following remarks.

Remark 1

While TFHE fits exactly in this definition (with the algorithms TRGSW and TRLWE), the scheme HEAAN falls outside of its scope, as its decryption is noisy (i.e., no rounding is used).

Remark 2

In practice, the above definition is not sufficient to model the properties of the FHE schemes with bootstrapping where the notion of noise in the decryption algorithm is of primary importance. The algebraic structures above are too general to enable a proper model for the noise distributions. Without further assumptions on M (e.g., metric properties, Gaussian distributions supported on M), this definition is incapable of:

  1. Abstracting an adequate model for the correctness of the decryption.

  2. Abstracting the security properties of these schemes.

To address these two major questions, the pure probabilistic approach seems insufficient. In the next section, we will restrict the above definition to M = 𝕋𝓡 and use the metric properties of the torus to define a noisy version that would address points 1. and 2. above.

2.2 TFHE

Here, we revisit the TFHE scheme using the definition of the FHE module structure. In practice, the definition of the FHE module structure does not directly apply to TFHE. One needs here a leveled version of this definition (i.e., after each operation, the standard deviation or the noise in the decryption increases until it is impossible to decrypt by rounding).

TFHE consists of three major encryption/decryption schemes, each represented by a different plaintext space. First, the scheme TLWE encrypts messages over the entire torus 𝕋 and produces ciphertexts in 𝕋N+1. The other two schemes are:

  1. TRGSW encrypts elements of the ring 𝓡 (integer polynomials) with bounded -norms (of the corresponding vectors in ℤN under the natural identification 𝓡 ≃ ℤN).

  2. TRLWE encrypts elements μ of the 𝓡-module 𝕋𝓡 that can also be viewed as elements of 𝕋N via the natural bijection 𝕋𝓡 ≃ 𝕋N.

There is an external product ⊡α depending on a noise parameter α [18, Cor. 3.14] that we recall in detail in Theorem 1 below. This theorem yields a FHE module structure on the schemes TRGSW and TRLWE.

In TFHE, TLWE ciphertexts of a message μ ∈ 𝕋 have the form (a, b = 〈s, a〉 + μ + e) ∈ 𝕋N+1 where s ∈ {0, 1}N is the secret key, a ∈ 𝕋N is uniformly random and e ∈ 𝕋 is sampled according to a noise distribution centered at zero. Similarly, for TRLWE, ciphertexts of μ ∈ 𝕋𝓡 are of the form (a, b = sa + μ + e) ∈ TR2 where s ∈ 𝓑, a ∈ 𝕋𝓡 is uniformly random and e ∈ 𝕋𝓡.

The decryption in TLWE (resp. TRLWE) uses a secret κ-Lipschitz function (here, κ > 0 is small and we mean “with respect to the -norm on the torus”) φs : 𝕋N × 𝕋 → 𝕋 (resp. φs : 𝕋𝓡 × 𝕋𝓡 → 𝕋𝓡) called phase parametrized by a small (often binary) secret key s ∈ {0, 1}N (resp. s ∈ 𝓑) and defined by (a, b) ∈ 𝕋N × 𝕋 ↦ b − 〈s, a〉 (resp. (a, b) ↦ bsa). The fact that the phase is a κ-Lipschitz function for small κN + 1 makes the decryption tolerant to errors and allows working with approximated numbers.

Ciphertexts are either fresh (i.e., generated by directly encrypting a plaintext) or they are produced by a sequence of homomorphic operations. In both cases, one views the ciphertext as a random variable depending on the random coins used to generate a and e as well as all random coins used in all these homomorphic operations.

Since φs(a, b) = bsa = μ + e, the decryption μ and the noise parameter α are the mean and the standard deviation of the phase function φs(a, b), respectively (here, the mean and standard deviation are computed over the random coins in the encryption algorithm).

The expectation, variance and standard deviation on the torus are well defined only for concentrated distributions (defined in [18, 2.1]) whose support is included in a ball of radius 1/4 (up to negligible tails). This is the case of the error distribution of T(R)LWE. More information on the definition of expectation and standard deviation for concentrated distributions on the torus can be found in [18, 19]. The benefit of the definition of the message as the expectation of the phase is that it is valid with infinite precision on any (discrete or non-discrete) subset of 𝕋𝓡. Note that this definition is only useful for analysis (e.g., proving the correctness of the cryptosystem) and cannot be used for decryption since the expectation of the phase cannot be computed in practice from a single sample of the distribution.

Below, we describe the parameters and the algorithms that are used for TFHE with the TRLWE encryption scheme.

  1. A security parameter λ and a minimal noise parameter α. These parameters implicitly define a minimal key size N. For more details see the FHE standardization workshop security document [2].

  2. A uniformly random binary key s ∈ 𝓑. This key implicitly defines the secret phase function

    φs:TR2TR,(a,b)(bsa).
  3. To encrypt a message μ ∈ 𝕋𝓡, choose a uniformly random a ∈ 𝕋𝓡 and a small Gaussian error e ← 𝓓𝕋𝓡,α, and return

    Encrypt(μ,s,α)=def(a,sa+μ+e).
  4. Return φs(c) which is close to the actual message.

  5. Round φs(c) to the nearest point in 𝓜. Here, 𝓜 ⊂ 𝕋𝓡 is subset of plaintext messages and the nearest point is with respect to the distance function on 𝕋𝓡 ≃ 𝕋N.

  6. This is the expectation of φs(c) (with respect to the random coins used in the noise). It can be viewed as a perfect decryption algorithm with infinite precision.

  7. return i=1kaici, where ciTR2 and ai ∈ 𝓡 for i = 1, …, k.

  8. Given a TRGSW ciphertext A encrypting a message μA ∈ 𝓡 and a TRLWE ciphertext b of a message μb ∈ 𝕋𝓡, compute Aαb at precision α > 0, which encrypts μAμb ∈ 𝕋𝓡 (see [18] and Theorem 1)

    α:TRGSW×TRLWETRLWE.
  9. use a key-switch algorithm (Theorem 2 and described in Algorithm 2 in [18]).

  10. Given a TRLWE ciphertext c of a message μ ∈ 𝓡, extract from c the TLWE sample that encrypts the ith coefficient μi with at most the same noise variance or amplitude as c (see [18] Section 4.2), defined as:

    SampleExtracti(c)=def((ai,ai1,,aiN+1),bi).

To ease the reading of this paper, we specify only one particular instantiation of TFHE[1], all bit-decompositions are binary. We present all theorems with decomposition in base 2 (for bootstrapping, key-switch, external product and bitdecomp) to minimize the number of parameters in the formulas. To perform an operation at precision α ≪ 1 (i.e. noise standard deviation α during the operation), we always use = − log2(α) terms in every bit decomposition.

The primary definition of α is the noise’s standard deviation during the current operation: α is thus not a static parameter of the framework. Then, the notions of noise rate, precision and approximate decomposition error, key-switch noise and bootstrapping noises are equal to α or proportional to it.

Any TLWE, TRLWE, TRGSW ciphertext, bootstrapping key or key-switching key given at a higher precision, can always be rounded and truncated to match the current precision α. Working with precision α implies a minimal size for the current binary key (as a simple rule of thumb, the minimal key size N that provides 128 bits of security is roughly the smallest power of two larger than max(256, 40 ∣ log2α ∣). The actual key size should be determined either from the standardization document [2] or from the LWE estimator by Albrecht et al. [3]. Whenever α varies (e.g. increases after each multiplication, or decreases after a bootstrapping), we always use the last key-switching and bootstrapping operation to switch to the smallest possible key that matches from the security estimates.

External product

There is a compatibility between the ciphertexts of TRGSW and TRLWE that can be expressed algebraically in the following manner: observe that the plaintext space for TRGSW is the ring 𝓡 and the plaintext space for TRLWE is the 𝓡-module 𝕋𝓡. In this case, one can define the following external product (a homomorphic action) (first introduced in [7] and formalized on the torus in [19]) of 𝓡 on 𝕋𝓡:

Theorem 1

(External product [18, Cor. 3.14]) Letcrbe a TRGSW ciphertext of a messager ∈ 𝓡and letcmbe a TRLWE ciphertext of a messagem ∈ 𝕋𝓡such thatcmis independent of the random coins used forcr. There exists a homomorphic external product algorithm (described explicitly in [18, Sec. 3.3]) and denoted bycrαcmsuch that Messages(crαcm) = rmwith noise standard deviationα > 0 and

Var(Err(crαcm))2NVar(Err(cr))+1+N4r22α2+r22Var(Err(cm)).

In general, this theorem will be used to multiply a TRLWE ciphertext cm by a precomputed TRGSW ciphertext cr (e.g., a ciphertext of the binary secret key in the case of bootstrapping): in this case, we can choose$Var(Err(cr)) = α2, and we have r22N (or even r22 = 1 if TRGSW ciphertexts encrypt only single bits, as in [19] and [18]). In this case, the working precision α equals the targeted output precision divided by N, so that the first two error terms in the theorem remain negligible.

Key-switching

In order to switch between the scalar and polynomial message spaces 𝕋 and 𝕋𝓡, the authors of [18] generalized the notions of sample extraction and key-switching. On one side, a PubKS(f, KS, c1, …, cn) algorithm homomorphically evaluates linear morphisms f from any ℤ-module 𝕋n to 𝕋N[X] using the functional key-switching key KS. It is possible to evaluate also a private linear morphism, but the algorithm is slower.

Theorem 2

(Functional key-switch adapted from [18, Thm. 4.2]) Givenr TLWE ciphertexts ci ∈ TLWES(μi), a publicκ-Lipschitz ℤ-module homomorphism

f:TrTR

and KSi,j ∈ T(R)LWEK,α(Si2j)with standard deviationαandSithei-th coefficient of the keyS, Algorithm 2 described in [18] outputs a T(R)LWE samplec ∈ T(R)LWEK(f(μ1, …, μr)) such that

Var(Err(c))κ2max(Var(Err(ci)))+α2(N2+N4).

Non-linear functions

In TFHE, a negacyclic function f : 𝕋 → 𝕋 (i.e. f(x + 1/2) = −f(x)) can be homomorphically applied to the phase of an individual TLWE ciphertext c ∈ 𝕋n+1 with a n-bit key K where each individual coefficient is rounded to the nearest multiple of 1/2N. More precisely, given the values f(i/2N) for i = 0, 1, …, 2N − 1, [18, Alg.4] outputs a ciphertext c′ ∈ 𝕋N+1 of the plaintext f(⌊φK(c)⌉) encrypted with key S ∈ {0, 1}N.

Theorem 3

(Functional bootstrap adapted from [18, Thm. 4.3]) Given a TLWE ciphertext c ∈ 𝕋n+1encrypted with ann-bit keyK ∈ {0, 1}nwhere each individual coefficient of c is rounded to the nearest multiple of 1/2N, a negacyclic functionf : 𝕋 → 𝕋 restricted to (2N)−1 ℤ/ℤ ⊂ 𝕋 and a bootstrapping keyBK = TRGSWS(Ki) with standard deviationα, Algorithm 4 described in [18] outputs a TLWE sample c′ ∈ 𝕋N+1encryptingf(φK(c)) with keyS ∈ {0, 1}Nsuch that:

Var(Err(c))α2n(2N+N+54+).

Until now, the most frequent non-linear function used in bootstrapping is the rounding function, since rounding the phase of a ciphertext is equivalent to decrypting it, and homomorphic decryption is the noise-reduction method proposed by Gentry in 2009 [23].

2.3 B/FV (Brakerski, Fan–Vercauteren, and Seal)

In this scheme, the message space is the finite ring 𝓡p = (ℤ/pℤ)[X]/(XN + 1) for some integer p (typically a power of 2 or a prime number). A message μ ∈ 𝓡p is encrypted on a quotient ring 𝓡q (for a larger modulus q) as a ciphertext (a, b) ∈ Rq2 where a ∈ 𝓡q is chosen uniformly at random and b is sampled from DRq,σ,sa+pqμ. Here, 𝓓𝓡q,σ,μ is the discrete Gaussian distribution over 𝓡q centered at μ with standard deviation σ (discrete means that the values are integers only). In addition, s ∈ 𝓑 is the secret key.

Homomorphic addition of two ciphertexts (a1, b1) and (a2, b2) is achieved by component-wise addition. The idea behind the homomorphic multiplication of two ciphertexts (a1, b1) and (a2, b2) is a technique referred to as relinearization: one first lifts (ai, bi) ∈ Rq2 to (i, i) ∈ 𝓡2 where each coefficient is lifted to [−q/2, q/2) and then view of μi as being expressed as a linear polynomial on s (i.e., μipq (bi + sai)). One then computes the quadratic polynomial corresponding to the product, namely pq(b1+sa1)pq(b2+sa2), and uses the relinearization described in [21, p.7–9] to write this product as pq (b + sa) and determine the coefficients (a, b) ∈ 𝓡q.

The noise amplitude grows by a small factor O(N) on average after each multiplication, so it is a common practice to perform a modulus-rescaling step, that divides and rounds each coefficient as well as the modulus q by the same scalar in order to bring the noise amplitude back to O(1) so that the subsequent operations continue on smaller ciphertexts. For more details and formal definitions see [6, 21].

We will show in Section 3 how to embed the plaintext space of B/FV in 𝕋𝓡 and how to then use the TFHE module structure to evaluate the above B/FV homomorphic product in a natural way.

2.4 HEAAN

In this scheme, the message space is the subset of 𝓡q containing all elements of norm ≤ B for some bound B, where the norm of an element x ∈ 𝓡q is defined as ∥. Here ∈ 𝓡 is the minimal lift of x, i.e., coefficients lifted to [−q/2, q/2). The message is decrypted up to a constant number of least significant bits which are considered as noise.

A HEAAN ciphertext is also a Ring-LWE pair (a, b) ∈ Rq2 where a ∈ 𝓡q is uniformly random and b is equal to sa + μ up to a Gaussian error of small standard deviation. This time, plaintexts and ciphertexts share the same space, so no rescaling factor p/q is used. Multiplication of two messages uses the same formula as in B/FV including relinearization: if both input messages are bounded by B with O(1) noise, the product is a message bounded by B2 with noise O(B), so it is a common practice at this point to perform a modulus-rescaling step that divides everything by B to bring the noise back to O(1) (see [16]). Unlike B/FV, this division in the modulus switching scales not only the ciphertext but also the plaintext by B. This can be fixed by adding a (public) tag to the ciphertext to track the number of divisions by B performed (see more details in Section 4).

2.5 𝕋𝓡 as the common plaintext algebraic structure

As mentioned earlier, the three homomorphic schemes use nearly the same ciphertext space (up to rescaling by a factor q). In addition, all decryption methods make use of the phase function up to minor differences: bsa versus b + sa in B/FV or i=0msiai,sR,aiTR for various values of m in Seal [13]. Yet, the plaintext spaces are à priori different as they are based on different mathematical structures (groups, rings, intervals, random sets).

In order to exploit the advantages of each scheme, we need to be able to homomorphically switch between the different plaintext spaces, and most importantly, to give a meaningful semantic to these transformations.

The main idea that enables us to give a meaningful semantic to the scheme switching transformation is to interpret all the plaintext spaces as being embedded in the same module 𝕋𝓡 as shown in Figure 2 and to use the distance function on the torus to quantify the transformation error. In this setting, all schemes use the same ciphertext space TR2, the same key space 𝓑 and the same phase function φs(a, b) = bsa. Thus, the probabilistic characterization of the message and error as the expectation and the standard deviation of the TFHE phase, respectively, are automatically extended to all schemes.

Figure 2 Representation of the plaintext space over the 𝕋𝓡
Figure 2

Representation of the plaintext space over the 𝕋𝓡

2.6 Real and complex slots for B/FV, TFHE and HEAAN

In this section we recall the representation of the plaintext spaces of the three schemes via the user slots. This is indeed the representation used in the current implementations.

B/FV

In B/FV, homomorphic operations are performed either on N SIMD slots modulo a medium-size integer p [13, 21], or more recently, on a single big-number slot modulo pN + 1 [14]. In both cases, the set of these slots has a ring structure and is isomorphic to a quotient of 𝓡 by a principal ideal (the native plaintext in [14]).

HEAAN

In HEAAN, homomorphic operations are performed on N/2 SIMD slots containing complex numbers in fixed-point representation with the same public exponent and the same precision. By interpolating the complex roots of XN + 1, the native plaintext can be mapped to small polynomials of 𝕋𝓡 (i.e., a zero-centered ball of small fixed radius) since the complex DFT matrix is Hermitian. We achieve this in Section 4.

TFHE

Finally, in TFHE, the message space is an arbitrary subset of 𝕋𝓡, without any particular structure.

Preserving the user slots

In order to introduce the notion of slots (real or complex), we use the following two isomorphisms of ℝ-vector spaces:

RRRN,f=a0++aN1XN1(a0,,aN),(1)

and

RRCN/2,f(f(ζ),f(ζ3),,f(ζN1)).(2)

Here ζ = eπi/N is a primitive root of XN + 1. Representation (1) corresponds to what is called the coefficient packing and representation (2) corresponds to what is called the slot packing.

The unified native plaintext spaces and the correspondence with the user-space slots are shown in Figure 3.

Figure 3 Unifying the plaintext space in RLWE-schemes. See the following sections for the definition of the notation.
Figure 3

Unifying the plaintext space in RLWE-schemes. See the following sections for the definition of the notation.

3 A general abstraction of B/FV over the torus

The B/FV scheme is very efficient in evaluating arithmetic circuits (i.e. polynomials on the plaintext). Yet, huge slowdowns are observed when evaluating comparisons, the sign function or other non-linear decision diagrams that do not correspond to sparse low-degree polynomials.

Here, we propose an alternative approach that switches to a different scheme, and for instance, executes the non-arithmetic operation via TFHE’s gate bootstrapping. We explain how to represent the plaintext spaces in order to enable this conversion.

Originally, the construction of B/FV uses 𝓡p as the plaintext space, where p ≥ 2 is a plaintext modulus. For more flexibility (see, e.g., the B/FV with big numbers below), one can use an arbitrary element P ∈ 𝓡 and take 𝓡/P 𝓡 as the plaintext space.

Following the ideas of [14, 22], given an element P ∈ 𝓡 that is invertible in 𝓡, let 𝓛(P) and 𝓛(P−1) be the real lattices generated by the rows of the matrices associated to P and P−1, respectively. Recall that these are the matrices (with respect to the standard basis {1, X, …, XN−1}) corresponding to the linear transformation of the ℝ-vector space 𝓡 that is multiplication by P. The native plaintext space 𝓜 is precisely the subgroup P−1 𝓡/𝓡 ⊂ 𝓡/𝓡 = 𝕋𝓡. We then have

P1RZ/RZRP:=RZ/PRZ,

where the isomorphism is induced by uPu for uP−1 𝓡/𝓡. Thus, 𝓜 ≃ 𝓡P. Geometrically, 𝓜 can be thought of as the vectors in the lattice 𝓛(P−1) whose coordinates are taken modulo ℤ. Algebraically, 𝓜 is the P-torsion of the 𝕋𝓡.

Via this isomorphism, the native plaintext space 𝓜 is equipped with the following internal Mongomery-type product:

Definition 2

(Native plaintext product) Given an element P ∈ 𝓡 as above, we define a product ⊠P : 𝓜 × 𝓜 → 𝓜 by μ1Pμ2 := Pμ1μ2. Here, the product Pμ1μ2 is defined in 𝓡 by choosing arbitrary lifts of μ1, μ2 to P−1𝓡. Notice that this definition is independent of the choices of these lifts.

Multiplication in B/FV

We will now deploy our definition of an FHE module structure to recover the internal homomorphic product of B/FV in terms of the external product. We view the plaintext space M := 𝓡P as an R := 𝓡-module and let s ∈ 𝓑 ⊂ 𝓡 be the key.

Given a TRLWE ciphertext c = (a, b) ∈ TR2, we denote by (,) ∈ RZ2 the optimal lift of c to RR2, that is the pair of the unique lifts of c for which all coefficients of and are in [−1/2, 1/2). Let (a1, b1), (a2, b2) ∈ TR2 be two ciphertexts of plaintexts μ1, μ2 ∈ 𝓜 ⊂ 𝕋𝓡. We are searching for a ciphertext (a, b) that is a valid encryption of the product μ1Pμ2. Since μi = bisai for i = 1, 2, we can write

μ1Pμ2=Pb~1b~2s(a~1b~2+a~2b~1)+s2a~1a~2.

We would like to define the internal product (a1, b1) ⊠P (a2, b2) as a pair (a, b) with the property that

DecM(a,b)=Pb~1b~2s(a~1b~2+a~2b~1)+s2a~1a~2

The important point here is that we would like to find a, b ∈ 𝕋𝓡 such that

asb=Pb~1b~2s(a~1b~2+a~2b~1)+s2a~1a~2.

This would have been trivial without the s2 term. To deal with the latter, we use an encryption EncR(s) =: RK (the relinearization key) and the definition of an FHE module structure to deduce that

s2a~1a~2=DecM(EncR(s)EncM(sa~1a~2)).

To summarize, we get

(a,b)=(a1~b2~+a2~b1~,b~1b~2)+RK(a~1a~2,0).

Alternatively, the term s212 can also be computed as RK′ ⊡ EncM(12) where RK′ = EncR(s2).

Letting RK be a relinearization key as above, that is a TRGSW encryption of s with key s (denoted by TRGSWs(s)), this analysis in the noiseless setting motivates the following definition of a B/FV internal homomorphic product in the presence of noise:

Definition 3

(Internal homomorphic product) We define the internal homomorphic product between two ciphertexts c1,c2 ∈ (𝕋𝓡)2 as c1P,αc2 as follows:

c1P,αc2=(C1,C0)RKα(C2,0),(3)

where C0 = P12, C1 = P ⋯ (12+ 21) and C2 = P12.

Note that this definition of the internal homomorphic B/FV product relies on a precomputed TRGSW external product, or homomorphic action, which is faster than the internal product. The relation between the two products is possible thanks to the common plaintext space for B/FV and TFHE. A formulation closer to the original B/FV relinearization presented in [6], [21] would rather take RK′ an encryption of s2 and compute (C1,C0) + RK′ ⊡α (0, C2).

Yet, this approach generates more noise than using directly the encryption of s since the propagation depends on the norm of the plaintext in TRGSW.

Proposition 1

(B/FV noise propagation) Let RK be a relinearization key, letc1, c2be two TRLWE ciphertexts ofμ1,μ2 ∈ 𝓜 = P−1 𝓡/𝓡, respectively, with the same keys ∈ 𝓑 as inDefinition 3. The internal homomorphic productc1P,αc2is then an encryption ofμ1Pμ2and the noise variance satisfies

Var(Err(c1P,αc2))1+N+N22P22max(Var(Err(ci))+(2N+N2+N4)α2.(4)

Proof

Let μ1,μ2, e1,e2 ∈ 𝓡 be the smallest representatives of the message and error of c1 and c2, respectively. By definition, for each i = 1, 2, we have bisai = μi + ei + Ii where Ii is an integer and the variance of Ii is ≤ N.

φs(c1P,αc2)=C0+sC1+s2C2+Err(RKα(0,C2))modZ=(b1sa1)(b2sa2)P+Err(RKα(0,C2))modZ=(μ1+e1+I1)(μ2+e2+I2)P+Err(RKα(C2,0))modZ=μ1μ2P+e1μ2P+e2μ1P+e1e2P+e1I2P+e2I1P+Err(RKα(C2,0))modZ=μ1Pμ2+e1μ2P+e2μ1P+e1e2P+e1I2P+e2I1P+Err(RKα(C2,0))modZ

Taking the expectation, since all multiples of ei as well as Err(RK ⊡ (0, C2)) have a null expectation, the message of c1P,αc2 is μ1Pμ2. By bounding the variance of each error term, we prove Eq. (4).□   □

The working precision α of the input ciphertexts is set in a way that the term in α2 remains negligible compared to the first one in (4). Thus, the noise standard deviation multiplicative overhead is bounded by O(N∣∣P∣∣2) in the average case.

3.1 Bridging B/FV slots with TFHE

In the classical description of B/FV or Seal, P(X) is usually chosen as a constant integer p. In this case, the plaintext space 𝓜 consists in all the multiples of P−1 = p−1 mod (XN + 1) mod ℤ, which is a rescaling of the classical plaintext space description 𝓡p (as shown in Figure 4). In particular, if XN + 1 has N roots modulo p, 𝓜 is isomorphic to N independent integer slots modulo p (else, there are less slots, in extension rings or fields). From a lattice perspective, 𝓜 is viewed as the orthogonal lattice generated by 1/pIN (IN is the N × N identity matrices). The packing radius of 𝓜 is 1/2p which is the maximal error tolerable by the phase. Rounding an element to 𝓜 consists of rounding each coordinate independently to the nearest multiple of 1/p.

Figure 4 The B/FV plaintext space over the 𝕋𝓡
Figure 4

The B/FV plaintext space over the 𝕋𝓡

In the literature, the isomorphism used to obtain the slot representation is

p1RZ/RZRp(Z/pZ)N,μ(μ(r0),,μ(rN1)).(5)

Here, one assumes that the polynomial XN + 1 mod p factorizes into distinct linear factors Xr0, …, XrN−1 (i.e., it has N distinct roots r0, …, rN−1 mod p). This isomorphism allows to manipulate N independent slots in parallel. Typical values are N = 215 and p = 216 + 1 (allowing a very small noise α ≈ 2−886 according to [8], so a multiplicative depth of ≈ 28 without key-switch according to the propagation of Lemma 1).

If we identify a polynomial in 𝓡p with its coefficient vector in (ℤ/pℤ)N, the bijection between the coefficients and the slot then corresponds to the Vandermonde matrix of (r0, …, rN−1) mod p

VDM=1r01r0N11r11r1N11rN11rN1N1modp.(6)

3.1.1 B/FV → TFHE

In this section we show how B/FV ciphertexts, interpreted as TRLWE ciphertexts with plaintext (slots in) 𝓡p, can be transformed into k independent TLWE ciphertexts.

Let z = (z0, …, zN−1) ∈ (ℤ/pℤ)N be a B/FV plaintext and, as in the previous section, let p−1 𝓡/𝓡 ≃ (ℤ/pℤ)N be the identification (5) and let μp−1 𝓡/𝓡 ⊂ 𝕋𝓡 be the preimage of z. More generally, suppose that we start with a ℤ-module homomorphism f : (ℤ/pℤ)N → (ℤ/pℤ)N with a matrix F ∈ 𝓜N(ℤ), where 𝓜N(ℤ) is the class of integer N × N matrices (this could arise in practice as either a projection, extraction or permutation of the slots) and get the output f(z) as a polynomial i=0N1μiXip−1 𝓡/𝓡 where[2]μ′ := (μ0,,μN1)=1pf(z0,,zN1) mod ℤ.

Then, by definition, we have μ′ = (F⋯VDM)μ mod ℤ, where F ⋯ VDM can be any integer representative of F ⋯ VDMmod p. In particular, we can always take the representative with all coefficients in [−p/2, p/2). This is a (Np/2)-Lipschitz ℤ-module homomorphism, and can be evaluated via the functional key-switch of Theorem 2 (see Algorithm 1). Coefficients can then be homomorphically extracted as individual TLWE ciphertexts with the SampleExtract of TFHE.

Algorithm 1

Public Functional Switching B/FV to TFHE

Input:TRLWE ciphertext c(X) = (a(X), b(X)) encoding N slots (z0, …, zN−1)mod p with key K ∈ 𝓑, a public ℤ-module homomorphism f : (ℤ/pℤ)N → (ℤ/pℤ)N with matrix F ∈ 𝓜N(ℤ), and key switch key KSi,jTRLWES(Ki2j), where S ∈ 𝓑.
Output: a TRLWE ciphertext c′ ∈ TR2 encrypted with key S ∈ 𝓑 whose message is i=0N1μiXi where (μ0,,μN1)=1pf(z0,,zN1)
1: F′ = FVDM mod p (all coefficients lifted in [−p/2, p/2))
2: Compute B = F′(b(X)) ∈ 𝕋N
3: fori ∈ 0 → N − 1 do do
4:     Compute Ai = F′(Xia(X)) = A ∈ 𝕋N
5:     Decompose Ai=j=0lAi,j2j with Ai,j ∈ 𝔹N
6: end for
7: return(0,B)i=0N1j=0lAi,jKSi,j

Proposition 2

(B/FV slots → TFHE) Letc = (a, b) ∈ TR2be a TRLWE ciphertext encryptingNslots (z0, …, zN−1) mod pwith keyK ∈ 𝓑, letf : (ℤ/pℤ)N → (ℤ/pℤ)Nbe a public ℤ-module homomorphism with matrixF ∈ 𝓜N(ℤ). LetKSi,j ∈ TRLWES,α(Ki/2j) be a key switching key (0 ≤ i < N, 1 ≤ j < log2α) andKiis thei-th coefficient ofK. By applying the functional key-switch ofTheorem 2using the integer transformationFVDM mod pwhose coefficients are between [−p/2, p/2) and we obtain a TRLWE ciphertextc′ ∈ 𝕋𝓡encrypted with keyS ∈ 𝓑 whose message isi=0N1μiXiwhere(μ0,,μN1)=1pf(z0,,zN1). The noise variance satisfies

Var(Err(c))Np22Var(Err(c))+α2N2+N4.

3.1.2 TFHE → B/FV

Conversely, we would like to transform k independent TLWE ciphertexts (encryptions of messages (μ0, …, μk−1) ∈ 𝕋k) into a TRLWE ciphertext with slots in ℤ/pℤ. Again, we will need to define a Lipschitz ℤ-module homomorphism g : 𝕋k → (ℤ/pℤ)N. Unfortunately, since for all x ∈ 𝕋k there exists y ∈ 𝕋 such that x = py, we have g(x) = pg(y) = 0 in (ℤ/pℤ)N and this implies that g is zero everywhere, which is of limited interest.

Therefore, we need to restrict the message space only to multiples of 1/p (this prevents division by p). Such a plaintext space restriction may imply that input TLWE ciphertexts must be bootstrapped before exporting them as B/FV slots using gate bootstrapping from Theorem 3. Note that B/FV manages with a noise that is smaller than in the TFHE. Therefore for this transformation, it is not enough to only switch between different ciphertexts types, but also to decrease the noise. Also the bootstrapping of the input permits to map the plaintext space to the space composed of exact multiples of 1/p.

Then, let g : (ℤ/pℤ)k → (ℤ/pℤ)N be a ℤ-linear map whose matrix G is in 𝓜N,k(ℤ). To obtain a B/FV ciphertext whose slots are g(0 mod p, …, k−1 mod p), the actual transformation to apply is VDM−1G mod p (see Algorithm 2). Again, we can choose the representative with coefficients in [−p/2,p/2) which is (Np/2)-Lipschitz.

Algorithm 2

Public Functional Switching TFHE to B/FV

Input:k < N TLWE ciphertexts (ai, bi) encoding μi ∈ 𝓜N,k(ℤ) with key S ∈ 𝔹n, a public (Np/2)-Lipschitz ℤ-module morphism g : (ℤ/pℤ)k → (ℤ/pℤ)N, whose matrix G ∈ 𝓜N,k(ℤ) and KSi = TRGSWK (Si) with K ∈ 𝓑 and 1 ≤ in.
Output: a B/FV ciphertext (a(X),b(X)) encoding a plaintext with slots are g(0 mod p, …, k−1 mod p), with key K ∈ 𝓑
1: G′ = VDM−1 × G mod p (all coefficients lifted in [−p/2, p/2))
2: Compute B = G′(b0,…, bk) ∈ 𝕋𝓡
3: fori ∈ 0 → N − 1 do do
4:     Compute A[i] = G′( a0[i], …, ak[i]) ∈ 𝕋𝓡
5: end for
6: return(0,B)i=0N1KSi(0,A[i])

Bootstrapping in B/FV

If we want to decrease the noise of the output, different possibilities for the algorithm of bootstrapping exist in the literature [12, 21]. The first one is the naive bootstrapping, where we evaluate the rounding function. In this case for p > 2N + 1 prime (p = 1 mod N), we need O(p) internal products for the evaluation and we preserve the N slots. The second one is the bootstrapping proposed in [12], where p = re is a power of a prime number, and we need only (e − 1)(r − 1) multiplications, but the number of slots is reduced.

Non-linear functions in B/FV

In B/FV, an arbitrary function f : ℤ/pℤ → ℤ/pℤ, for a prime p, can be interpolated by a polynomial of degree ≤ p − 1 (by Lagrange interpolation) and can thus be evaluated as an arithmetic circuit of multiplicative depth 2log2p. The evaluation of the polynomial is performed simultaneously on the N slots. If the function f is viewed as a function f : 𝕋 → 𝕋, both the domain and the range are in this case rounded to exact multiples of 1/p. Compared to TFHE, the output is constrained in the subset p−1 ℤ/ℤ (e.g., only to multiples of 1/p), but on the other hand, there is no negacyclic constraint on the input, so the graph of the non-linear function can be arbitrary everywhere. However, except in very special circumstances, the polynomial to evaluate is dense, so the number of homomorphic operations is Θ(p) which is impractical for large p’s and thus, the method does not apply to big-number slots. One notable exception to this rule is the bootstrapping in [12] modulo pk, which proves that the rounding function is the composition of sparse polynomials.

3.2 Scheme-switching between B/FV-big-number and TFHE

In the case of [14], using the NTRU trick [25], the plaintext space is 𝓡/(Xp)𝓡 ≃ ℤ/(1 + pN) ℤ. Usually, p is small, but pN + 1 is large, so a slot corresponding to ℤ/(1 + pN) ℤ allows us to perform arithmetic operations on big numbers. If P = Xp then the native plaintext space 𝓜 is P−1 𝓡/𝓡 with

P1=1pN+1i=0N1pN1iXi.

Interestingly, since the leading coefficient of the polynomial P−1 is 1/(pN + 1), the isomorphism M1pN+1Z/Z corresponds to extracting the coefficient in XN − 1 (i.e. the map μ=i=0N1μiXiμN1 mod ℤ). On this native plaintext space, the naïve rounding algorithm computing μ = P−1 ⋯ ⌊φs(c) ⋯ P⌉ can solve the BDD problem up to a distance ≈ 1/2p (which is the packing radius of the lattice 𝓜; note that the vector P ∈ 𝓡 is a short vector). Here, by φs(c), we mean an arbitrary lift in 𝓡. This allows to operate on ciphertexts with very large noise 1/2Np.

3.2.1 B/FV-big-number → msb-TFHE

Given a TRLWE ciphertext c = (a, b) ∈ TR2 encrypting μ ∈ 𝕋N with a key K, to obtain the TLWE encryption of the most significant bit of μ with key K, it is enough to extract cN−1 = SampleExtractN−1(c).

3.2.2 TFHE → B/FV-big-number

Conversely, to transform k < N TLWE independent ciphertexts c0, …, ck−1 encrypting μi = xi/pp−1 ℤ/ℤ (for xi ∈ [0,p − 1]) with key S ∈ 𝔹N into a TRLWE ciphertext encrypting the big-number R = i=0k1xipN−1−i mod pN + 1 with key K ∈ 𝓑, we can return an encryption of (μ0, …, μk−1) → i=0k1μiXN−1−ip−1 𝓡/𝓡. Indeed, this polynomial is very close to our target P−1R mod 𝓡. To that end, we can just apply the public key-switch c = PubKS(id, KS, (c0, …, ck−1)), where the key-switching key is composed by KSi = TRGSWK(Si) to pack the k ciphertexts as a single TRLWE ciphertext.

4 A general abstraction of HEAAN over the torus

For HEAAN, the homomorpic encryption scheme of approximate numbers, the idea is that instead of correcting the error during the decryption for the sake of increased noise, one keeps the approximation error and thus, reduces the noise. In this scheme only the significant digits are used and the phase is taken as a good approximation of the plaintext. HEAAN is a mixed encryption scheme dedicated to fixed-point arithmetic with public exponent. Similarly to scale invariant schemes, the noise is appended to the least significant bits of the phase, but unlike B/FV, the space of valid messages is a small bounded interval rather than evenly-distributed in the whole space. Also, the maximal amount of noise is interpreted in terms of the ratio between the diameter of the message space and the scale modulus q rather than the usual noise amplitude versus packing radius. As we keep performing homomorphic operations, the message space diameter increases until the majority of the space is covered at this point, the scale invariance property enables to extract the message as a classical LWE sample that can be processed, for instance, by TFHE. To fully enable this switch between schemes, it is necessary to relate the message spaces of HEAAN and TFHE.

Tags of ciphertexts

To do this, we revisit the representation of HEAAN ciphertexts by adding the following three tags/parameters that we define and clarify below:

  1. L ∈ ℕ: level exponent of the ciphertext - overall, it quantifies the maximum amount of homomorphic operations before performing a bootstrapping (the native plaintext ∥μ ≤ 2L),

  2. ρ ∈ ℕ: bits of precision of the plaintext, that is, the number of bits in the mantissa. Since it is a global constant, we omit it in general.

  3. τ ∈ ℤ: slot exponent (order of magnitude of the complex values in each slot). Here, we use floating-point representation for which the exponent is public and fixed across all the coordinates of the vector and only the mantissas are secret. More precisely, a complex number z is represented as z = m ⋯ 2τ where τ is public and m ∈ 2ρ ⋯ (ℤ + i ℤ) with 0 ≤ ∣m∣ < 1.

In Figure 5, we show the plaintext space (with the rounding error) using the tags defined before.

Figure 5 The HEAAN plaintext space over the 𝕋𝓡, where the error ε is an approximation error of the same order as α = 2−(L+ρ).
Figure 5

The HEAAN plaintext space over the 𝕋𝓡, where the error ε is an approximation error of the same order as α = 2−(L+ρ).

More precisely, L is needed since HEAAN can be viewed as an instantiation of TRLWE whose native plaintext space is the subset of all polynomials μ ∈ 𝕋𝓡 of small norm ∥μ ≤ 2L. The integer L > 0 is the level exponent of the ciphertext, it is public and decreases with each multiplication. When the level is too low, the ciphertext must be bootstrapped to allow further processing.

The plaintext space is always described with a global and fixed number ρ of significant bits. One can define the noise amplitudeα := 2−(L+ρ). Finally, since the goal is to represent ρ-bit fixed-point values of any order of magnitude, each ciphertext carries a public integer exponent τ ∈ ℤ which represents the order of magnitude of its slots.

We choose these three tags because they are helpful for the parameter selection of the cryptosystem (N and α) from the user point of view. For that, the first step is to fix ρ, the precision needed at the end of the algorithm, the second step is to determine the range of each variable (so the slot exponents τ): this can be done either from the domain of the evaluated function or experimentally by running the algorithm on a fake data. Then, using the noise propagation formula for elementary operations given in this section, we compute the smallest level exponent L > 1 for each variable by traversing the arithmetic graph of the algorithm. Finally, we use the security API document [8] (or the LWE estimator) to find the smallest key size N that supports a noise rate α = 2−(L+ρ) to the desired security parameter.[3] The original HEAAN choice of tags is inherent and to determine the final system parameters, we have to solve a complex system of equations.

Complex-valued slots for plaintexts

Recall that N is always a power of 2. Given a message μ ∈ 𝓡 where ∥μ ≤ 2L, its complex slots (z1, …, zN/2) are defined as the (rescaled) evaluation on the complex roots of XN + 1, so zk = 2L+τμ(ζk) ∈ ℂ. We omit the values on the last N/2 roots as they are complex conjugates of the first ones since μ is real. If ∥μ ≈ 2L, this indeed implies that slot values |zk|N2τ and that the slot precision is up to 2τρ.

In order to unify the message spaces, we redefine tagged HEAAN ciphertexts as a quadruple (a, b, τ, L) ∈ TR2 × ℤ × ℕ where (a, b) is a TRLWE ciphertext. As usual, the phase of a ciphertext is (bsa) ∈ 𝕋𝓡 and the message is the expectation of the phase. The slots of a ciphertext are the slots of its message μ ∈ 𝕋𝓡 represented by a lift in 𝓡 of small real norm ≤ 2L. From a matrix point of view, the transformation between the coefficients and the slots is the multiplication with 2τ+L times the complex DFT matrix of ζk. We have (z1, …, zN/2) = DFT ⋯ (μ0, …, μN−1) and (μ0, …, μN−1) = 2Re(IDFT ⋯ (z1, …, zN/2)).

DFT=1ζ11ζ1N11ζ21ζ2N11ζN/21ζN/2N1,IDFT=1N111ζ¯11ζ¯21ζ¯N/21ζ¯1N1ζ¯2N1ζ¯N/2N1(7)

4.0.1 Tag propagation formulas

We now describe the tag propagation formulas for the homomorphic operations over the slot representation of the ciphertext[4]:

  1. HeaanAdd((c1, τ1, L1), (c2, τ2, L2)) →

    c=2τ1+L1τLc1+2τ2+L2τLc2modZ,τ=max(τ1,τ2)+1,L=min(L1+τ1,L2+τ2)τ

Proof

We can check that this transformation changes the slot value into 2τ+Lμ(ζk) = 2τ1+L1μ1(ζk)+ 2τ2+L2μ2(ζk) = (z1+ z2), that proves the correctness of the sum of two slots. The fact that τi + LiτL ≥ 0, for i ∈ {1, 2} means that the sum is an integer combination of the ciphertexts. At the end, we verify that

μ(X)2τ1+L1τLμ1(X)+2τ2+L2τLμ2(X)2τ1+L1τLL1+2τ2+L2τLL22L.

  1. HeaanRSLL ((c, τ, L), L′ < L) → (2LLc′ mod ℤ, τ, L′)

Proof

We verify that the slot values are preserved and that ∥μ(X)∥ < 2LLμ′(X)∥ ≤ 2LL′−L = 2L.

  1. HeaanBS(t, (c, τ, L)) → (c,τ + t, L)

Proof

Slots are indeed transformed as z′ = 2τ+t+Lμ(ζk) = 2tz where t is the shift and z = 2τ+Lμ(ζk) is the slot value. Since the TRLWE part does not change, the native plaintext does not change either and the bound 2L is preserved.□

  1. HeaanMultCst(a ∈ ℤ   s.t. ∣a∣ ≤ 2ρ, (c,τ, L) → (ac mod ℤ,τ + ρ, Lρ)

Proof

We can check that multiplication with a ≤ 2ρ transforms the slot value into z′ = 2τ+L aμ(ζk).□

  1. HeaanSlotMult((u1, …, uN/2), (c,τ, L))

    Let u1, …, uN/2 be N fixed-point complex slots of the same order of magnitude (e.g. uk = (xk + iyk).2ρ where xk, yk are integers in [−2ρ,2ρ].

    Interpolate (or find by least mean square) an integer polynomial d(x) with coefficients in [−2ρ,2ρ] and t an integer exponent such that the slots of d(X)2t are all good approximations of z1, …, zN/2, up to precision 2tρ. Namely,

    |d(ζk)2tuk|2tρ for all k[1,N/2].(8)

    Then all we need is to multiply the input ciphertext by d(x) and shift the result by τ bits. The level decreases by ρ bits, where 2ρ is the norm of d.

    d(X)RZ(d2ρ),(c,τ,L):d(X)cmodZ,τ=τ+ρ+t,L=Lρ.

Proof

It follows from (8) that zk = 2τ′+Lμ(ζk)d(ζk) = 2τ+Lμ(ζk)d(ζk)2t = zk ⋯ (uk + εk) where ∣zkεk∣ ≤ 2τ′−ρ and that the native plaintext norm verifies ∣∣μ′(X) ∣∣ ≤ 2L+ρ = 2L.□

  1. HeaanPrivSlotMult(TRGSW(D), (c,τ, L))

    In the previous multiplication, d(x) can be provided encrypted as a TRGSW ciphertext of D.

  2. ((c1, τ1, L′), (c2, τ2, L′)) use the Algorithm 3 below, proved in Proposition 3.

Algorithm 3

HEAAN homomorphic product on 𝕋𝓡

Input: Two HEAAN ciphertexts (a1, b1, τ1,L1), (a2, b2, τ2, L2) ∈ 𝕋2 × ℤ × ℕ whose slots are (z1(1),,zN/2(1)) and (z1(2),,zN/2(2)) under the same key s and precision ρ > log2N.
Output: a HEAAN ciphertext (a, b, τ, L) whose slots are zj=zj(1)zj(2) for j ∈ [1, N/2] with the same key s
1: Set τ = τ1 + τ2 (slot exponent)
2: Set L′ = min(L1, L2) and use HeaanRSLiL to decrease both ciphertexts to level L
3: Let q = 2L′+ρ, α = q−1, and L = L′-ρ
4: Round (ai,bi) to the nearest multiple of α = q−1.
5: Let (a, b) = (a1, b1) ⊠q,α (a2, b2) (with ⊠q,α the internal homomorphic product defined in the Definition 3)
6: return (a, b, τ, L)

Proposition 3

(HEAAN product) Let (a1, b1, τ1, L1), (a2, b2, τ2, L2) ∈ TR2 × ℤ × ℕ whose slots are(z1(1),,zN/2(1))and(z1(2),,zN/2(2))under the same keys. Suppose that the precisionρis larger than log2N. Algorithm 3 computes a HEAAN ciphertext (a, b, τ, L) whose slots arezj=zj(1)zj(2)forj ∈ [1, N/2] with the same keyssuch thatVar(Err((a, b))) remains implicitly 4Lρ.

Proof

(sketch) Since Algorithm 3 rescales both ciphertexts to the same level, we can assume that both inputs have the same level L′. Compared to the proof of Lemma 1, defining the same auxiliary quantities C0, C1, C2, we have

φs(a,b)=μ1qμ2+e2μ1q+e1μ2q+e1e2q+e2I1q+e1I2q+Err(RKα(C2,0))mod1=μ1qμ2+e2μ1q+e1μ2q+e1e2q+Err(RKα(C2,0))mod1

Here, the terms e1I2q and e2I1q disappear because ei are exact multiples of 1q after the rounding. The expectation of the phase is still μ1qμ2, so the output slots contain zk = qμ1(ζk)μ2(ζk)2τ+L = z1,kz2,k since L = 2L′−log2(q). The native plaintext μ1qμ2 itself is bounded by q2−2L = 2L′+ρ−2L = 2L. The phase variances of e2μ1q, e1μ2q are bounded by q2L2Lρ2=4Lρ,e1e2q by 4L−2ρ, and Var(Err(RK⊡α (C2, 0)) ≤ 2N+N2+N4α2N2α24log2(N)Lρ<4L4Lρ because ρ > log2(N). Overall, the output noise standard deviation is 2Lρ, which corresponds to ρ bits of fixed-point precision.□ □

4.1 Scheme switching between TFHE and HEAAN

4.1.1 TFHE → HEAAN

Let S = (S1, …, Sn) ∈ {0, 1}n be a TLWE key and let N be the power of 2 in the HEAAN cryptosystem. Let (a1, b1), …, (aN/2, bN/2) ∈ 𝕋n × 𝕋 be TLWE ciphertexts encrypted under the secret key S. For every 1 ≤ kN/2, let νk = φS(ak, bk) be their phases. Suppose that N is the modulus used in HEAAN and K ∈ 𝓑 is a HEAAN secret key. Here, we describe an algorithm (functional switching from TFHE to HEAAN) that outputs a HEAAN ciphertext (a, b, τ, L) which, when decrypted with the key K, yields a vector of size N/2 whose components are the complex values zk = exp(2πiνk) for 1 ≤ kN/2. This allows us to evaluate trigonometric polynomials and have various practical applications such as evaluating continuous functions via rapid convergence of Fourier series. We describe this algorithm as a variant of the bootstrapping for HEAAN [15].

Letting BKi = TRGSWK(Si) be the components of the bootstrapping key BK, this algorithm is a combination of a homomorphic evaluation of the mod ℤ operation (the bootstrapping proposed by HEAAN in [15]) and a multiplication with the DFT matrix in order to switch between coefficients and slots.

Once we have the complex exponential, we can represent any other piecewise continuous function f from 𝕋 to ℂ and obtain f(ν1), …, f(νN/2) in the slots, by just evaluating the first terms of the Fourier series of f.

Proposition 4

(Functional switching TFHE to HEAAN) In the setting described above where the noise standard deviation isαand the precision parameter isρ ∈ ℕ, Algorithm 4 computes a HEAAN ciphertext (a, b,τ, L) decrypting to (z1, …, zN/2) underKand having precisionρ,p=ρ+log2(2πn/ρ)and level ciphertext exponent

L=log2α(p+log2ρ)ρ12log22nNlog2α+n1+N4.

Proof

(sketch) We approximate exp(2πiνk) using the idea of [15] by first taking a small real representative of the input ciphertexts and divide them by 2p for a suitable p (that depends on the target precision). This way, the (real) phase of the rescaled ciphertext νk/2p is guaranteed to be bounded by n/2p. We first compute a good approximation, up to an error ≤ 2ρ, for exp(2πiνk/2p) using the first ρ terms of the Taylor expansion of the exponential function. For instance, the Taylor–Lagrange inequality gives exp(ix)k=0ρ1(ix)kk!|x|ρρ!, so for xn/2p, it suffices to choose p=ρ+log2(2πn/ρ) to get the required approximation within 2ρ. Then, we square and multiply (we square and square in this case) the result to raise exp(2πiνk/2p) to the power 2p to obtain the desired plaintext exp(2πiνk). From Theorem 1 on the external product for TFHE, the noise of the ciphertext c of line 4 is

Var(Err(c))(2nlog2αN+n1+N4)α24L(p+log2(ρ))ρ.

We then evaluate the Taylor expansion of the complex exponential (up to degree d = ρ) via the algorithm of Paterson–Stockmayer []: this requires a depth of 2log2d = log2ρ, it uses 3d non-constant (HeaanMult) as well as d constant multiplications (HeaanSlotMult). After this step, the level decreases by ρ times the multiplicative depth, so the level of E is ≤ L + . Finally, we square the ciphertext p times to obtain the desired result.

□ □

Algorithm 4

Switching TFHE to HEAAN

Input: N/2 TLWE ciphertexts (ak,bk), 1 ≤ kN/2 whose phases are νk ∈ 𝕋 under the same key S ∈ {0, 1}n and BKi = TRGSWK (Si).
Output: A HEAAN ciphertext (a, b) ∈ TR2 at level L that decrypts (under K) to the slots (z1, …, zN/2) where zk = e2πiνk and νk = φS(ak, bk).
1: Let A be the N/2 × (n + 1) real matrix where Ai,j is the representative of the j-th coefficient of ai ∈ [−1/2, 1/2) and the last column Aj,n+1 contains the representative of bj ∈ [−1/2, 1/2).
2: Let p=ρ+log2(2πn/ρ)
3: Compute Pj12pNRe(IDFTAj) for 1 ≤ jn + 1. Here, Pj is the polynomial whose slots are 12pAj.
4: c(0,2(L+(p+1)ρ)Pn+1)j=1nBKjα(0,2(L+(p+1)ρ)Pj).
5: Let C = (c, τ = 0, L + (p + 1)ρ)
6: Evaluate homomorphically E=k=0ρ1ikk!Ck using Paterson–Stockmayer algorithm [] (in depth log2ρ), HeaanMult for non-constant multiplications and HeaanSlotMult for constant multiplications. Here, E has parameters τ = 0 and level L + .
7: forj = 1 to pdo
8:     E ← HeaanMult(E, E) (the new E has parameters τ = 0 and level L + (pj)ρ)
9: end for
10: returnE at level L

4.1.2 HEAAN → TFHE

Conversely, to switch from HEAAN to TFHE ciphertexts, we use the observation that a HEAAN ciphertext of level 1 is automatically a TFHE ciphertext. Starting from a ciphertext HEAAN of level L, we use the level decrease function HeaanRSL→1 followed by a slot extraction to obtain a TFHE ciphertext of μ. Here, by slot extraction, we mean the slots to coefficients procedure described in [15] to extract HEAAN slots into coefficients of TRLWE (i.e. applying the IDFT complex transformation homomorphically).

4.2 Non-linear functions in HEAAN

In HEAAN, non-linear functions can be evaluated via approximations by either complex-valued polynomials (via traditional products) or trigonometric polynomials (Fourier approach within the bootstrapping).

As explained in [4], Fourier series of smooth and regular functions converge rapidly: for instance, the Fourier series of a C-function converges super-algebraically and if one smooths any periodic function by convolution with a small Gaussian, its Fourier series converges exponentially fast. However, the convergence is slower if the function has discontinuities (pointwise convergence in Ω(1/k)), or discontinuities in its derivative (uniform convergence in Ω(1/k2)) where k is the number of harmonics used in the series.

Compared to classical approximations of functions by polynomials in [10, 24] (i.e. Taylor series or Weierstrass approximation theorem), Fourier series have three main advantages: they do not diverge to ∞ outside of the interval (better numerical stability), the Fourier coefficients are small (square integrable), and the series converge uniformly to the function on any interval that does not contain any discontinuity in the derivative.

With this bootstrapping trick, HEAAN can at the same time evaluate a non-linear function and bootstrap its output to a level L even higher than its input. Taking this fact into account, instead of writing ReLU(x) = max(0, x) as 12(∣x∣ + x) like in TFHE, where the term +x/2 is not bootstrapped, it is actually better to extend the graph of ReLU from a half period (−1/4, 1/4) directly to a 1-periodic continuous function and to decompose the whole graph as a Fourier series. In the latter case, the output level L can be freely set to an arbitrary large value. Figure 6 shows a degree-7 approximation of the odd-even periodic extension of the graph of ReLU(x).

Figure 6 ReLU for HEAAN
Figure 6

ReLU for HEAAN

5 Implementation of some major components of Chimera

Some of the algorithms presented in this paper have been implemented and tested in the context of an IDash 2018 [1] submission described in [9]. This submission was selected in October 2018 to be among the finalists of the competition.

Since the challenge was mostly about real-valued algorithms, we implemented the TFHE/HEAAN bridges, and we left the implementation of the TFHE-B/FV bridges as a future work. In the implementation, torus arithmetic is represented either by double-precision floats (for α ≥ 2−52), or by a fixed-size array of 64-bit gmp limbs, and polynomial multiplications are implemented via the complex FFT. Since the total precision required was always lower than 128 bits for external products and 192 bits for internal products (so at most two or three gmp limbs), there was no advantage in switching to an alternative RNS/NTT representation. All bit-decompositions for the TRGSW external products (also used in the internal product) have been carried-on in base 216 and 232 rather than in base 2. The implemented algorithms are:

  1. Evaluation of a sigmoid on a TLWE ciphertext via gate bootstrapping followed by a functional key-switch to HEAAN (noise reduction from (α = 2−7, N = 650) to (α = 2−80, N = 4096)). The time for the evaluation of the bootstrapped sigmoid is: 32s for the bootstrapping to TLWE and 7s for the public key-switch TLWE to TRLWE.

  2. External product to multiply a HEAAN ciphertext by a fresh TRGSW ciphertext, using both the slot packed ciphertexts (N/2 slots) and coefficient-packed ciphertexts (N slots). The time is 80ms with parameters α = 2−80, N = 4096.

  3. TRLWE internal product for HEAAN slotwise multiplication, using the tagging system proposed here, and relinearization via the external product formula. The time is 160$ms for parameters α = 2−80, N = 4096.

  4. Evaluation of the non-linear function log ∣x∣ on 1024 slots in parallel during the bootstrapping for HEAAN (Algorithm 4), versus the traditional bootstrapping followed by a Taylor approximation.

The implementation of the algorithms described in this section is now public and available at: https://github.com/DPPH/chimera-iDash2018. Other directions that we leave as a future work is the elaboration of a bridge towards the BGV scheme as well as the introduction of RNS in this framework. The presented framework has already been applied to some concrete use-cases in the domain of machine-learning [5, 9] but we are wishing to provide more applications in this or other directions. The remaining bridges will be implemented when specific use cases are identified for them.

Conclusion

Some recent works introduce alternatives to the methods presented in this article. In [17], the authors propose a new method for the evaluation of the sign function by staying in the HEAAN encoding by multiple compositions of polynomials. This extends to the evaluation of the RELU function and can be very efficient in amortized running time. This SIMD sign evaluation, can be viewed as a bootstrapping for BFV via HEAAN, which is not covered in this work.

Furthermore, in [11], an alternative method for switching between RLWE ciphertexts is presented. This is an orthogonal direction to ours and uses composition with Galois polynomials. In this work, the authors obtain speed-up by one order of magnitude in particular on the LWE-RLWE conversion. As a counterpart the noise overhead is no longer additive since the phase is multiplied by a power of 2. This method can speed-up the Chimera framework by replacing some of the underlying KS methods.

References

[1] Track 2: Secure parallel genome wide association studies using homomorphic encryption. www.humangenomeprivacy.org/2018/competition-tasks.html, 2018.Search in Google Scholar

[2] M. Albrecht, M. Chase, H. Chen, J. Ding, S. Goldwasser, S. Gorbunov, S. Halevi, J. Hoffstein, K. Laine, K. Lauter, S. Lokam, D. Micciancio, D. Moody, T. Morrison, A. Sahai, and V. Vaikuntanathan. Homomorphic encryption security standard. Technical report, HomomorphicEncryption.org, Toronto, Canada, November 2018.Search in Google Scholar

[3] M. R. Albrecht, R. Player, and S. Scott. On the concrete hardness of learning with errors. J. Mathematical Cryptology, 9(3):169–203, 2015.10.1515/jmc-2015-0016Search in Google Scholar

[4] C. Boura, I. Chillotti, N. Gama, D. Jetchev, S. Peceny, and A. Petric. High-precision privacy-preserving real-valued function evaluation. IACR Cryptology ePrint Archive, 2017:1234, 2017.10.1007/978-3-662-58387-6_10Search in Google Scholar

[5] C. Boura, N. Gama, M. Georgieva, and D. Jetchev. Simulating homomorphic evaluation of deep learning predictions. In CSCML 2019, volume 11527 of LNCS, pages 212–230. Springer, 2019.10.1007/978-3-030-20951-3_20Search in Google Scholar

[6] Z. Brakerski. Fully homomorphic encryption without modulus switching from classical gapsvp. In CRYPTO 2012, volume 7417 of LNCS, pages 868–886. Springer, 2012.10.1007/978-3-642-32009-5_50Search in Google Scholar

[7] Z. Brakerski and R. Perlman. Lattice-based fully dynamic multi-key FHE with short ciphertexts. In CRYPTO 2016, Part I, LNCS, pages 190–213. Springer, 2016.10.1007/978-3-662-53018-4_8Search in Google Scholar

[8] M. Brenner, W. Dai, S. Halevi, K. Han, A. Jalali, M. Kim, K. Laine, A. Malozemoff, P. Paillier, Y. Polyakov, K. Rohloff, E. Savaş, and B. Sunar. A standard api for rlwe-based homomorphic encryption. Technical report, HomomorphicEncryption.org, Redmond WA, July 2017.Search in Google Scholar

[9] S. Carpov, N. Gama, M. Georgieva, and J. R. Troncoso-Pastoriza. Privacy-preserving semi-parallel logistic regression training with fully homomorphic encryption. Cryptology ePrint Archive, Report 2019/101, 2019. https://eprint.iacr.org/2019/101.10.1186/s12920-020-0723-0Search in Google Scholar PubMed PubMed Central

[10] H. Chabanne, A. de Wargny, J. Milgram, C. Morel, and E. Prouff. Privacy-preserving classification on deep neural network. Cryptology ePrint Archive, Report 2017/035, 2017. https://eprint.iacr.org/2017/035.Search in Google Scholar

[11] H. Chen, W. Dai, M. Kim, and Y. Song. Efficient homomorphic conversion between (ring) LWE ciphertexts. IACR Cryptology ePrint Archive, 2020:15, 2020.10.1007/978-3-030-78372-3_18Search in Google Scholar

[12] H. Chen and K. Han. Homomorphic lower digits removal and improved FHE bootstrapping. In EUROCRYPT 2018, Proceedings, Part I, volume 10820 of LNCS, pages 315–337. Springer, 2018.10.1007/978-3-319-78381-9_12Search in Google Scholar

[13] H. Chen, K. Laine, and R. Player. Simple encrypted arithmetic library - SEAL v2.1. In Financial Cryptography and Data Security - FC 2017, pages 3–18, 2017.10.1007/978-3-319-70278-0_1Search in Google Scholar

[14] H. Chen, K. Laine, R. Player, and Y. Xia. High-precision arithmetic in homomorphic encryption. In CT-RSA 2018, LNCS, pages 116–136. Springer, 2018.10.1007/978-3-319-76953-0_7Search in Google Scholar

[15] J. H. Cheon, K. Han, A. Kim, M. Kim, and Y. Song. Bootstrapping for approximate homomorphic encryption. In EUROCRYPT 2018, Proceedings, Part I, volume 10820 of LNCS, pages 360–384. Springer, 2018.10.1007/978-3-319-78381-9_14Search in Google Scholar

[16] J. H. Cheon, A. Kim, M. Kim, and Y. S. Song. Homomorphic encryption for arithmetic of approximate numbers. In ASIACRYPT 2017, Proceedings, Part I, volume 10624 of LNCS, pages 409–437. Springer, 2017.10.1007/978-3-319-70694-8_15Search in Google Scholar

[17] J. H. Cheon, D. Kim, and D. Kim. Efficient homomorphic comparison methods with optimal complexity. IACR Cryptology ePrint Archive, 2019:1234, 2019.10.1007/978-3-030-64834-3_8Search in Google Scholar

[18] I. Chillotti, N. Gama, M. Georgieva, and M. Izabachène. TFHE: Fast Fully Homomorphic Encryption over the Torus. IACR Cryptology ePrint Archive, 2018:421.10.1007/s00145-019-09319-xSearch in Google Scholar

[19] I. Chillotti, N. Gama, M. Georgieva, and M. Izabachène. Faster fully homomorphic encryption: Bootstrapping in less than 0.1 seconds. In ASIACRYPT 2016, Proceedings, Part I, volume 10031 of LNCS, pages 3–33. Springer, 2016.10.1007/978-3-662-53887-6_1Search in Google Scholar

[20] L. Ducas and D. Micciancio. FHEW: bootstrapping homomorphic encryption in less than a second. In EUROCRYPT 2015, Proceedings, Part I, volume 9056 of LNCS, pages 617–640. Springer, 2015.10.1007/978-3-662-46800-5_24Search in Google Scholar

[21] J. Fan and F. Vercauteren. Somewhat practical fully homomorphic encryption. IACR Cryptology ePrint Archive, 2012:144, 2012.Search in Google Scholar

[22] M. Geihs and D. Cabarcas. Efficient integer encoding for homomorphic encryption via ring isomorphisms. In LATINCRYPT 2014, LNCS, pages 48–63. Springer, 2015.10.1007/978-3-319-16295-9_3Search in Google Scholar

[23] C. Gentry. Fully homomorphic encryption using ideal lattices. In STOC 2009, pages 169–178, 2009.10.1145/1536414.1536440Search in Google Scholar

[24] R. Gilad-Bachrach, N. Dowlin, K. Laine, K. E. Lauter, M. Naehrig, and J. Wernsing. Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pages 201–210.Search in Google Scholar

[25] J. Hoffstein and J. Silverman. Optimizations for NTRU, January 2000.Search in Google Scholar

[26] V. Lyubashevsky, C. Peikert, and O. Regev. EUROCRYPT, chapter On Ideal Lattices and Learning with Errors over Rings, pages 1–23. Springer, 2010.10.1007/978-3-642-13190-5_1Search in Google Scholar

[27] M. Paterson and L. J. Stockmeyer. On the number of nonscalar multiplications necessary to evaluate polynomials. SIAM J. Comput., 2(1):60–66, 1973.10.1137/0202007Search in Google Scholar

Received: 2019-07-12
Accepted: 2020-05-11
Published Online: 2020-08-07

© 2020 C. Boura et al., published by De Gruyter

This work is licensed under the Creative Commons Attribution 4.0 International License.

Downloaded on 27.5.2024 from https://www.degruyter.com/document/doi/10.1515/jmc-2019-0026/html
Scroll to top button