Home Efficiently Processing Complex-Valued Data in Homomorphic Encryption
Article Open Access

Efficiently Processing Complex-Valued Data in Homomorphic Encryption

  • Carl Bootland EMAIL logo , Wouter Castryck , Ilia Iliashenko and Frederik Vercauteren
Published/Copyright: June 14, 2020
Become an author with De Gruyter Brill

Abstract

We introduce a new homomorphic encryption scheme that is natively capable of computing with complex numbers. This is done by generalizing recent work of Chen, Laine, Player and Xia, who modified the Fan–Vercauteren scheme by replacing the integral plaintext modulus t by a linear polynomial Xb. Our generalization studies plaintext moduli of the form Xm + b. Our construction significantly reduces the noise growth in comparison to the original FV scheme, so much deeper arithmetic circuits can be homomorphically executed.

MSC 2010: 94A60; 68P25; 11T06; 11T22; 68P30

1 Introduction

The goal of homomorphic encryption is to allow for arbitrary arithmetic operations on encrypted data, such that the decrypted result equals the outcome of the same calculation carried out in the clear. Since the publication of Gentry's seminal work [15], this research area has evolved rapidly and is on the verge of reaching a first degree of maturity, as was recently demonstrated e.g. by practical implementations of privacy-enhanced electricity load forecasting [2, 4], digital image processing [1, 10], and medical data management [8, 12, 17]. Most of the current focus lies on somewhat homomorphic encryption (SHE), where the schemes are capable of homomorphically evaluating an arithmetic circuit having a certain predetermined computational depth. The leading proposals for realizing this goal are the Brakerski-Gentry-Vaikunthanathan (BGV) scheme [5] and the Fan-Vercauteren (FV) scheme [13].

In actual applications, the input to the homomorphic evaluation of an arithmetic circuit 𝓒 needs to be preprocessed in two steps. The first step is encoding, where one’s task is to represent the actual ‘real world data’ as elements of the plaintext space of the envisaged SHE scheme. This plaintext space is a certain commutative ring, and the encoding should be such that real world arithmetic agrees with the corresponding ring operations, up to the anticipated computational depth.

In the original descriptions of BGV and FV, the plaintext space is a ring of the form Rt = ℤ[X]/(t, f(X)) where t ≥ 2 is an integer and f(X) ∈ ℤ[X] is a monic irreducible polynomial. Throughout this paper we will stick to the common choice of 2-power cyclotomics f(X) = Xn + 1, where n = 2k for some integer k ≥ 1. Encoding numerical input is typically done by taking an integer-digit expansion with respect to some base b, then replacing b by X and finally reducing the digits modulo t. Decoding then amounts to lifting the coefficients back to ℤ, for instance by choosing representatives in (−t/2, t/2], and evaluating the result at X = b. Thanks to the relation X−1 ≡ −Xn−1 it is possible to allow the expansions to have a fractional part. In this case the decoding step must be preceded by replacing the monomials Xi of degree i > B by −Xin, for some appropriate point of separation B. All these parameters need to be chosen in such a way that the evaluation of 𝓒 on the encoded data decodes to the right outcome. At the same time one wants t to be as small as possible, because its size highly affects the efficiency of the resulting SHE computation. Selecting optimal parameters is a tedious application-dependent balancing act to which a large amount of recent literature has been devoted, see e.g. [2, 7, 9, 11, 12, 17, 19].

Because in practice n is of size at least 1024, the plaintext spaces Rt can a priori host an enormous range of data, even for very small values of t. Unfortunately this is hindered by their structure, which is not a great match with numerical input data types like integers, rationals or floats. For example, if t = 2 then it is not even possible to add a non-zero element to itself without incorrect decoding. Because of such phenomena, values of t are required that typically consist of dozens of decimal digits, badly affecting the efficiency. An idea to remedy this situation has been around for a while [5, 14, 16] and uses a polynomial plaintext modulus, rather than just an integer. Recently the first detailed instantiation of this idea was given by Chen, Laine, Player and Xia [7], who adapted the FV scheme to plaintext moduli t = Xb for some b ∈ ℤ≥2. In this case the plaintext space becomes Rt = ℤ[X]/(Xb, Xn + 1) = ℤ[X]/(Xb,bn+1) ≅ ℤbn+1, whose structure is a much better match with the common numerical input data types. This allows for much smaller plaintext moduli (norm-wise), with beneficial consequences for the efficiency, or for the depth of the circuits 𝓒 that can be handled [7, Section 7.2].

This paper further explores the paradigm that the structure of the plaintext space Rt should match the input data type as closely as possible. Concretely, we focus on complex-valued data types, such as cyclotomic integers and floating point complex numbers. We study this setting mainly in its own right, but note that complex input data has been considered in homomorphic encryption before, e.g., in the homomorphic evaluation of the Discrete Fourier Transform studied by Costache, Smart and Vivek [10] in the context of digital image processing, where the input consists of cyclotomic integers.

Representing complex numbers

One naive way to encode a complex number z would be to view it as a pair of real numbers, for instance using Cartesian or polar coordinates. These can be fed separately to the SHE scheme, which is now used to evaluate two circuits. A more direct way is to use a complex base b. For instance, one could take b = eπi/n, as was done by Cheon, Kim, Kim and Song [9], albeit in a somewhat different context. This choice has the additional feature that f(b) = 0, so that wrapping around modulo f(X) = Xn + 1 does not lead to incorrect decoding. However, finding an integer-digit base b expansion with small norm which approximates z sufficiently well is an n-dimensional lattice problem, which is practically infeasible. To get around this Costache, Smart and Vivek [10] instead use b = ζ : = eπi/m for some divisor mn, which is small enough for finding short base ζ approximations, while preserving the feature that wrapping around modulo f(X) is unharmful. But in their approach, a huge portion of plaintext space is left unused}. Indeed, the encoding map is

Z[ζ]Rt:z=i=0m1zibii=0m1z¯iYi,

where Y = Xn/m, t ≥ 2 is an integral plaintext modulus and zi is the reduction of zi mod t, so that all plaintext computations are carried out in the subring ℤ[Y]/(t, Ym + 1), which is of index tnm in Rt. Our proposal is to resort to a plaintext modulus of the form t = Xm + b for some small integer b, with ∣b∣ ≥ 2. In this case, for m < n, we have RXm+b = ℤ[X] / (Xm + b, Xn + 1) = ℤ[X]/(bn/m + 1, Xm + b). An additional assumption (which is discussed in more detail in the next section), is that

there exists anα¯Zbn/m+1such thatb¯=α¯m,(1)

where b denotes the reduction of b modulo bn/m + 1. Throughout we fix such an α and let β be its multiplicative inverse, which necessarily exists. This implies that (β̄X)m + 1 = 0, therefore we have a well-defined ring homomorphism

Z[ζ]RXm+b:i=0m1ziζii=0m1z¯iβ¯iXi,(2)

which is surjective with kernel (bn/m + 1). In other words, while Costache, Smart and Vivek restrict their computations to an injective copy of ℤ[ζ]/(t) inside Rt, we can view RXm+b as an isomorphic copy of ℤ[ζ]/(bn/m + 1). Essentially, our approach transfers the unused part of the plaintext space coming from the large dimension n into a larger integral modulus, reflected in the exponent n/m.

In the remainder of this paper, we explain how this observation can be used to efficiently process complex-valued input data in homomorphic encryption. First, in Section 2 we explain how to encode and decode elements of the ring ℤ[ζ] of 2mth cyclotomic integers and discuss the assumption (1), with special attention to the case m = 2 where ℤ[ζ] = ℤ[i] is the ring of Gaussian integers. Next in Section 3 we explain how this can be used to encode other data types such as cyclotomic rationals or complex floats, either by resorting to LLL as in [10] or by using Chen et al.’s fractional encoder from [7]. In Section 4 we discuss how to adapt the FV scheme so that it can cope with plaintext spaces of the form RXm+b. Finally, in Section 5 we discuss the performance of this adaptation in comparison with previous approaches. In short we can reach a depth at least 5 times that of the best approach which directly encrypts encodings of complex numbers [10]. We can also reach very similar depths to the state of the art where one encrypts the real and imaginary parts separately [7]. However, since we natively encrypt complex numbers our ciphertexts are two times smaller and hence our approach is more efficient by roughly a factor two in time and three in space.

2 Encoding and decoding elements of ℤ[ζ]

Encoding

Encoding an element of ℤ[ζ] happens in two steps. The first step applies the map (2) yielding a polynomial of degree less than m which typically has very large coefficients. The second step is comparable to the hat encoder of Chen et al. [7] and switches to another representant by spreading this polynomial across the range 1, X, …, Xn−1 while making the coefficients a lot smaller. The result will then be lifted to R = ℤ[X]/(Xn + 1) and fed to our adaptation of the FV scheme, where the smaller coefficients are important to keep the noise growth bounded.

Here is how this second step is carried out in practice: we think of the coefficients ziβi as being represented by integers between −⌊bn/m/2⌋ and ⌈bn/m/2⌉. We then expand these integers to base b using digits ai,j from the range −⌊b/2⌋, …, ⌊b/2⌋ to find

z¯iβ¯i=a¯i,n/m1b¯n/m1++a¯i,1b¯+a¯i,0.

There is a minor caveat here, namely if b is odd then there are more integers modulo bn/m + 1 than there are balanced b-ary expansions of length at most n/m. This is easily resolved by allowing the last digit to be one larger. For even b the situation is opposite: since ziβi is represented by an integer of size at most bn/m/2 = b/2 ⋅ bn/m−1 we have a surplus of base-b expansions. Here it makes sense to choose an expansion with the shortest Hamming weight (e.g., if b = 2 then we simply pick the non-adjacent form). We denote the maximal number of non-zero coefficients that can appear in a fresh encoding by Nb.

Given such base-b expansions of the coefficients, we replace each occurrence of b by −Xm and then substitute the results in the image of (2). We end up with an expansion i=0n1c¯iXi where the ci are represented by integers of absolute value at most ⌊b/2⌋, or in fact ⌊(b + 1)/2⌋ if we take into account the caveat.

Decoding

In order to decode a given expansion i=0n1c¯iXi we walk through the same steps in reverse order. First we pick another representant by reducing the expansion modulo Xm + b, in order to end up with

i=0m1c¯iXiZ[X]/(bn/m+1,Xm+b).

This can be rewritten as i=0m1c¯iα¯iβ¯iXi so we decode as i=0m1ziζi ∈ ℤ[ζ] where zi is a representant of ciαi taken from the range −⌊bn/m/2⌋, …, ⌈bn/m/2⌉.

On the assumption (1)

Usually n and m are determined by security considerations and the concrete application. To apply our encoding method we want to find a small value of b for which condition (1) is met. This is easiest if n/m is small or m is small. If no satisfactory value of b can be found then one can try to enlarge m and view ℤ[ζ] as a subring of a higher degree cyclotomic ring. Below we give two lemmas constraining the possible choices for b given m and n; still assuming we are working with 2-power cyclotomic f. Their proofs are given in the full version of this paper [3]. We note that it does not help to allow for negative b in our case, that is for n = 2k, because b satisfies (1) if and only if −b does.

Lemma 2.1

Letn > m > 1. A necessary condition for(1)is that for every odd primepbn/m + 1 we have 2np − 1.

Lemma 2.2

Letgbe an element of orderninZ4n×and lettbe an element of order 2 not ingso thatZ4n× = 〈t〉 × 〈g〉. If condition(1)is satisfied for oddb > 1 andm > 1 thenb mod 4nis an element of the subgroupt〉 × 〈gm〉. In particular this implies thatb ≡ ±1 mod 4m.

In fact, one may always take g = 3 and t = −1 in the above lemma.

Our method is particularly friendly towards Gaussian integers. Indeed if m = 2 then one can always take b = 2, as one easily verifies that α2 = 2 where

α=2n/82n/41.(3)

The map (2) then defines an isomorphism between RX2+2 and ℤ[i]/(2n/2 + 1).

If this ring is not large enough to ensure correct decoding, then one can move to slightly larger values of b. The next choice which always works is b = 4, where one can simply take α = 2. Here the ring becomes ℤ[i]/(2n + 1).

3 Encoding complex-valued input data

In this section we look at the more general problem of encoding floating point complex numbers. Our approach will be to approximate these complex numbers by suitable cyclotomic rationals and then proceed as in Section 2. We have many choices for such approximations including the choice of m which defines which root of unity we are working with. We also have the choice between using integer or rational coefficients for the approximation. Perhaps the most obvious and straightforward approach is to consider our complex number z written in terms of its real and imaginary parts, say z = x + yi for some real numbers x and y. We can then approximate x and y by rationals depending on how much precision we require. This leads us to considering the case m = 2 and the question then arises of how to encode fractional coefficients.

3.1 Fractional encoding

Here we consider how to encode a rational number into the space ℤ/pℤ for some integer p, so that it can then be expanded using the technique in Section 2. This problem was considered by Chen, Laine, Player and Xia in [7, Section 6]. Their approach is to define a finite subset 𝓟 of ℚ along with an encoding map Enc : 𝓟 → ℤ/pℤ and a decoding map Dec : Enc(𝓟) → 𝓟. The maps should satisfy, firstly, correctness: Dec(Enc(x/y)) = x/y for x/y ∈ 𝓟 and secondly, Enc should be both additively and multiplicatively homomorphic so long as it still encodes an element of 𝓟.

The natural choice for the map Enc is Enc(x/y) = xy−1 mod p where the inverse of y is computed modulo p. Care thus needs to be taken to ensure that y has such an inverse, which is ensured with a careful choice of 𝓟.

In our setting the coefficient modulus p is of the form bn/2 + 1, thus if one wants roughly the same precision for the integer and fractional parts one can take for an odd base b

P=c+dbn/4:c,dbn/412,bn/412Z;

while for even b one can choose

P=c+dbn/4δ:|c|(bn/4+δ11)b2(b1);|d|(bn/4δ1)b2(b1);c,dZ,

where δ ∈ {0, 1} depending on whether you want one more base-b digit in the fractional (δ = 0) or integer (δ = 1) part.

The encoding of an element e ∈ 𝓟 is then computed as −ebn/2 mod bn/2 + 1. The important thing to note about using this encoding is that for decoding to work the result of the computations must lie in 𝓟. If your input data are complex numbers and you approximate them using n/4 fractional b-ary digits then it is likely that after one multiplication the result is no longer in 𝓟. Thus one must appropriately choose the precision with which to encode the data, depending primarily on the depth of the circuit to be evaluated and the final precision required. The only constraint is that the precision should be a divisor of bn/4 so that −ebn/2 is an integer.

We note that the fractional encoder need not require m to be 2. However in this case there appears to be no straightforward way to find a good rational approximation with small numerators and denominators except when the denominators are all equal, in this case if this denominator is r then we simply require an approximation of rz in ℤ[ζ] subject to some constraint on the coefficients. However, the problem of finding such an approximation to our complex number itself, rather than a scaling, is interesting in its own right as it avoids the need for encoding fractional values and tracking the denominator inherently present in such encodings.

3.2 Integer coefficient approximation

The task of finding a cyclotomic integer closely approximating an arbitrary complex number was considered by Costache, Smart and Vivek in [10]. Here the idea is to solve an instance of the closest vector problem (CVP) in the (scaled) lattice ℤ[ζ], where the power basis is scaled and split into real and complex part, which are approximated by integers. In detail: we choose a scaling constant C > 0, and define the constants ai and bi for i = 0, …, m − 1, where ai = ⌈ℜ(Cζi)⌋ and bi = ⌈ℑ(Cζi)⌋. The lattice we then consider is given by the m rows of the matrix

10a0b001am1bm1.

The target vector in our CVP instance will then be the appropriately scaled real and complex parts of the complex number z we wish to approximate. Concretely, this vector is (0, …, 0, ⌈ℜ(Cz)⌋, ⌈ℑ(Cz)⌋).

If (z0, …, zm−1, A, B) is a solution to the CVP instance then we must have

(Cz)A=i=0m1ziaiCi=0m1ziζi

and similarly for the imaginary part. We therefore see that i=0m1ziζi is a good approximation to z. Further, C gives some control over the quality of the approximation, larger C gives a finer-grained lattice but also increases the size of the last two coefficients of the basis vectors which may lead to a larger distance between the target vector and the closest lattice point, which in turn makes solving the CVP instance harder and negatively affects the quality of our approximation of Cz.

In [10] the authors solve this CVP instance using the embedding technique. Namely they attempt to solve the shortest vector problem in the lattice spanned by the rows of

10a0b0001am1bm1000(Cz)(Cz)T

for some non-zero constant T. With suitable parameter choices, performing LLL reduction on this lattice will return a basis of short vectors for this lattice, among which at least one has ± T in the final coordinate. The remaining coefficients then give plus or minus the target vector minus a close vector.

One issue with the embedding technique is that each new instance of the CVP problem requires performing lattice reduction which for large m is rather time-consuming. In typical applications we want to approximate many different complex numbers, using the same C so only the target vector changes. A more efficient approach therefore is to perform lattice reduction on the CVP lattice itself and since this is independent of the target vector it needs only to be done once so we can spend significantly more time in this step to find a good basis of this lattice. We can then apply a technique such as Babai’s nearest plane algorithm, or Babai’s rounding algorithm, with this reduced basis to find an approximate closest vector.

4 Adapting the Fan-Vercauteren SHE scheme

In this section we construct a variant of the FV scheme [13] with plaintext modulus Xm + b following the blueprint given in [7]. We prove correctness of this scheme (Theorem 4.1) and analyze the noise growth induced by homomorphic arithmetic operations (Theorem 4.2). The proofs of these theorems are given in the full version of the paper [3].

4.1 Basic scheme

Writing R = ℤ[X]/(Xn + 1), the ciphertext space is defined by Rq = R/(q) for some positive integer q, while the plaintext space is RXm+b = R/(Xm + b). We will assume that bq. Recall that in the original FV scheme the plaintext space is R/(t) for some positive integer tq. We define the scaling parameter Δb as

Δb=qXm+bmodXn+1=qbn/m+1i=1n/m(b)i1Xnim.

Obviously, Δb is the analogue of the scalar Δ = ⌊q/t⌋ in the original FV scheme. Other parameters are the error distribution χe = 𝓓(σ2) on R (coefficient-wise with respect to the power basis, with standard deviation σ) and the key distribution χk = 𝓤3 which uniformly generates elements of R with ternary coefficients (with respect to the power basis). We also define the decomposition base w and denote = ⌊logwq⌋.

The new encryption scheme ComFV is then defined in the same way as FV where t and Δ are replaced by Xm + b and Δb, respectively.

  • ComFV.KeyGen( ): Let sχk and e, e0, … eχe. Uniformly sample random a, a0, …, aRq and compute bi = [−(ais + ei) + wis2]q. Output the secret key sk = s, the public key pk = ([−(as + e)]q, a) and the evaluation key evk=bi,aii=0.

  • ComFV.Encrypt(pk, msg): Sample uχk and e0, e1χe. Set p0 = pk[0] and p1 = pk[1], and compute c0 = [Δb ⋅ msg + p0u + e0]q and c1 = [p1u + e1]q. Output ct = (c0, c1).

  • ComFV.Decrypt(sk, ct): Return

    msg=Xm+bqc0+c1sqmod(Xm+b).

    The security of this scheme is based on the same argument as of the original FV scheme. In particular, it is hard to distinguish the public key pk and ciphertext pairs from uniform tuples according to the decision version of the Ring-LWE problem [18]. The evaluation keyevk does not leak any information about the secret key as long as a circular security assumption holds [13].

    Recall that for an element aK the canonical (infinity) norm of a is defined as

    acan=a(ζ),a(ζ3),,a(ζ2n1).

    To verify correctness we use the notion of invariant noise introduced in [7]. The invariant noise of a ciphertext ct = (c0,c1) encrypting a plaintext msg ∈ RXm+b is an element vK with the smallest canonical norm such that

    Xm+bqc0+c1sq=msg+v+g(Xm+b)(4)

    for some gR.[1] Then decryption works correctly when vcan<1/2 that is supported by the following theorem.

Heuristic 4.1

(Fresh noise). Let ct be a fresh ciphertext encrypting the message msg, ct = ComFV.Encrypt(pk, msg), then the invariant noise of ct is bounded with very high probability by

b+1q3n2(b+1)Nb+2σn12+9n,

whereNbis the number of non-zero coefficients that can appear in a fresh encoding andσis the standard deviation of the error distributionχe.

4.2 Homomorphic operations

In this section we show how homomorphic addition and multiplication are performed in the new scheme. We prove correctness of these operations and estimate the invariant noise growth. Throughout this section, Ct(msg, v) denotes a ciphertext encrypting message msg ∈ RXm+b with invariant noise v.

Addition is the coordinate-wise sum of corresponding ciphertext components:

  • ComFV.Add(ct_0, ct1): Return ([ct0[0] + ct1[0]]q, [ct0[1] + ct1[1]]q).

The invariant noise grows additively after homomorphic addition.

Multiplication consists of two steps. The first one, denoted ComFV.BMul, returns the coefficients of the ciphertext product when expressed as of a polynomial in s, namely of (ct0[0] + ct0[1]s)(ct1[0] + ct1[1]s). The second step then maps the degree two term back to degree one using the relinearization technique.

  • ComFV.BMul(ct0, ct1): Compute

    c0=Xm+bqct0[0]ct1[0]q,c1=Xm+bq(ct0[0]ct1[1]+ct0[1]ct1[0])q,c2=Xm+bqct0[1]ct1[1]q

    and return ctBMul = (c0, c1, c2).

  • ComFV.Relin(ctBMul, evk): Writing ctBMul = (c0,c1,c2), expand c2 in base w, namely c2 = i=0c2,iwi with c2,iRw. Compute

    c0=c0+i=0evk[i][0]c2,iandc1=c1+i=0evk[i][1]c2,i

    and output cRelin = (c0, c1).

  • ComFV.Mul(ct0, ct1, evk): Return

    cMul=(c0,c1)=ComFV.Relin(ComFV.BMul(ct0,ct1),evk).

    The next theorem bounds the norm of the invariant noise upon multiplication.

Heuristic 4.2

(Multiplication noise). Given two ciphertexts ct1 = Ct(msg1, v1) and ct1 = Ct(msg2, v2), the function ComFV.Mul(ct1, ct2, evk) outputs a ciphertext ctMul = Ct(msg1 ⋅ msg2, vMul) with

vMulcan(b+1)3n+2n2v1can+v2can+3v1canv2can+b+1q3n+2n2+4n33+b+1qσnw3(+1)

with very high probability.

We note that the dominating term here is the first term and not the term containing the product of the canonical norms of the multiplicands since the canonical norms are smaller than 1/2 when the ciphertext can be decrypted correctly.

5 Comparison with FV: regular circuits

To estimate the performance of ComFV in a general setting and fairly compare it with the original FV scheme and the work of [7], we resort to regular circuits as introduced in [11]. These circuits have already been used in [7] for the same purpose.

A regular circuit consists of D computational levels where each level contains A ∈ {0, 3, 10} addition levels, requiring 2A inputs, followed by one multiplication. Therefore, in total the number of inputs required is 2D(A+1). Each circuit input is given by a complex number with real and imaginary parts from (-U, U) for some U ∈ {28, 216, 232, 264}. We will always use a precision of 16 fractional bits in this paper which in the case of a complex number refers to both the real and complex parts independently.

Our aim is to compare ComFV to the previously best known scheme allowing native complex inputs as well as to the state of the art when encoding the real and imaginary parts separately [7]. We will compare this method with our method where we use the same encoding of the complex number as a cyclotomic integer. We chose m = 4 as this is the minimal m for which ℤ[ζ] is dense in ℂ and it allows us to use b = 4h for some h ∈ ℕ, taking α = 2h/2 if h is even and α = 2(h(n+4)−4)/8(2hn/4 − 1) if h is odd. We also use m = 4 when using FV and one may wonder if taking a larger m is better. However, we found that using larger m in this case gave the same depths and only increased the time to encode a complex number.

For the current state of the art we use the scheme of Chen et al. [7], which we call CLPX, and encode the real and imaginary parts of our complex number separately. Thus an encryption now consists of two ciphertext pairs and addition is performed component-wise while we use the Karatsuba algorithm to perform multiplication using only three calls to the multiplication algorithm of the underlying scheme. We use the same values for n and q for comparison so that ciphertexts will be twice as large compared to our work. The fractional encoder is used to encode the real and imaginary parts so we use m = 2 in this case. For the optimal value of b we restrict our search space to powers of 2, since we require a precision of 2−16, the simplest way to ensure correct decoding at depth D is to require 216Dbn/4 so taking b a power of two looks a good fit. We again compare this approach with ours, in this case we also use the fractional encoder.

We computed the theoretical and heuristic maximal depth of a regular circuit which can be reached using FV, the CLPX approach of using plaintext modulus Xb and our ComFV with parameters n, q and σ given in the SEAL library [6] and the relinearization base w = 232. Our results are presented in Table 1. In the table we also give a value for b (or t) which allows one to reach this maximal depth, this b is very often not unique and in this case we give the smallest b for which there is a decryption error at the next level. To find a heuristic estimate of the maximal depth that can be reached in each scheme we take a carefully chosen complex number and use this as the complex number given for all inputs of the circuit. One reason for this can be seen in the table of results, Table 1, where we see that for A = 10, depths of 14 can be achieved, this requires 214⋅11 = 2154 inputs, meaning using different inputs would be completely infeasible in practice. Another good reason for choosing all inputs to be the same is that during addition there is no cancellation occurring, indeed the A levels of addition simply become the worst case of scaling by 2A. The precise complex number we chose depends on the encoding scheme but essentially one finds one with an encoding which has many large coefficients. If the fractional encoder is used then we take the complex number to be (U − 2−16)(1 + i) while when using the cyclotomic integer approximation approach it is a matter of trial and error but this need only be done once for each U and m.

Table 1

Maximal heuristic regular circuit depths of the original FV scheme with native complex inputs (DO), the CLPX approach encrypting the real and imaginary parts separately (DM), ComFV with the approximation encoding (DA) and the fractional encoding (DF) depending on input size (U), number of additions per level (A), n and q. A corresponding t or b is provided.

n409681921638432768
log q116226435889
A0310031003100310
U = 28DO110111222332
tO2352412182352412552702882130216421822202
DM6541098131211151514
bM222252422216214210237234231
DA654997121110141313
bA222222262626218218210240240238
DF654997121210141413
bF22224242221621528232233233
U = 216DO110111222332
tO2352412182352412552702882130216421732201
DM6541097121211151413
bM222252422217214210237238235
DA654997121110141313
bA222222262626218218210240240238
DF654997121110141313
bF2222252623217215210233241237
U = 232DO000111111222
tO233233233265271284265271285220622052198
DM554997121110141413
bM2222272522217216213240239235
DA554887111010 131312
bA222222262626218218214240240240
DF554987111010 131312
bF22222292624217215214233241238
U = 264DO000111211
tO265265265212921352149225822662262
DM554887111110131312
bM22222292623219218213244241239
DA54487710109121212
bA2424222102626218218214240240244
DF55488710109121212
bF232322292926217218214233241243

From Table 1 we see that in all cases our methods greatly outperform the best scheme natively encrypting complex numbers. At a minimum we can achieve 5 times the depth and for larger n our method becomes even more efficient as the amount of plaintext space not being efficiently used only grows in the current solution. The CLPX method on the other hand is able to achieve slightly larger depths than our scheme, at most one more for the largest n we consider. Where our method improves is on efficiency, we effectively halve the ciphertext size and are expected to be roughly three times faster due to the fact that we can use one multiplication operation per level whereas the CLPX approach requires three.

6 Conclusion

We constructed a new encoding algorithm for complex data values and a corresponding somewhat homomorphic encryption scheme by utilizing a polynomial plaintext modulus of the form Xm + b. This choice allows for a much better use of the available plaintext space and much slower noise growth compared to existing solutions encrypting complex numbers. As a result, for the same ciphertext modulus q and degree n, we can homomorphically evaluate between 5 and 12 times deeper circuits compared to existing solutions based on FV and natively encoding complex numbers. In comparison to the state of the art, which encrypts the real and imaginary parts of the complex numbers separately, our method reduces the size of ciphertexts by a factor of 2 making our scheme at least twice as efficient in time and three times more efficient in space.

Acknowledgement

The first author is supported by a PhD fellowship of the Research Foundation - Flanders (FWO). The third author has been supported in part by ERC Advanced Grant ERC-2015-AdG-IMPaCT.

References

[1] Anthony Barnett, Jay Santokhi, Michael Simpson, Nigel P. Smart, Charlie Stainton-Bygrave, Srinivas Vivek and Adrian Waller, Image Classification using non-linear Support Vector Machines on Encrypted Data, 2017, Cryptology ePrint Archive: Report 2017/857.Search in Google Scholar

[2] Charlotte Bonte, Carl Bootland, Joppe W. Bos, Wouter Castryck, Ilia Iliashenko and Frederik Vercauteren, Faster Homomorphic Function Evaluation Using Non-integral Base Encoding, in: CHES 2017, LNCS 10529, pp. 579–600, Springer, Heidelberg, September 2017.10.1007/978-3-319-66787-4_28Search in Google Scholar

[3] Carl Bootland, Wouter Castryck, Ilia Iliashenko and Frederik Vercauteren, Efficiently Processing Complex-Valued Data in Homomorphic Encryption, 2018, Cryptology ePrint Archive: Report 2018/785.Search in Google Scholar

[4] Joppe W. Bos, Wouter Castryck, Ilia Iliashenko and Frederik Vercauteren, Privacy-Friendly Forecasting for the Smart Grid Using Homomorphic Encryption and the Group Method of Data Handling, in: AFRICACRYPT 17, LNCS 10239, pp. 184–201, Springer, Heidelberg, May 2017.10.1007/978-3-319-57339-7_11Search in Google Scholar

[5] Zvika Brakerski, Craig Gentry and Vinod Vaikuntanathan, (Leveled) fully homomorphic encryption without bootstrapping, in: ITCS 2012, pp. 309–325, ACM, January 2012.10.1145/2090236.2090262Search in Google Scholar

[6] Hao Chen, Kim Laine and Rachel Player, Simple Encrypted Arithmetic Library - SEAL v2.1, in: FC 2017, 10323, pp. 3–18, Springer, Heidelberg, 2017.10.1007/978-3-319-70278-0_1Search in Google Scholar

[7] Hao Chen, Kim Laine, Rachel Player and Yuhou Xia, High-Precision Arithmetic in Homomorphic Encryption, in: CT-RSA 2018 (Nigel P. Smart, ed.), LNCS 10808, pp. 116–136, Springer, Heidelberg, 2018.10.1007/978-3-319-76953-0_7Search in Google Scholar

[8] Jung Hee Cheon, Jinhyuck Jeong, Joohee Lee and Keewoo Lee, Privacy-Preserving Computations of Predictive Medical Models with Minimax Approximation and Non-Adjacent Form, in: FC 2017, 10323, pp. 53–74, Springer, Heidelberg, 2017.10.1007/978-3-319-70278-0_4Search in Google Scholar

[9] Jung Hee Cheon, Andrey Kim, Miran Kim and Yong Soo Song, “Homomorphic Encryption for Arithmetic of Approximate Numbers, in: ASIACRYPT 2017, Part I, LNCS 10624, pp. 409–437, Springer, Heidelberg, December 2017.10.1007/978-3-319-70694-8_15Search in Google Scholar

[10] Anamaria Costache, Nigel P. Smart and Srinivas Vivek, Faster Homomorphic Evaluation of Discrete Fourier Transforms, in: FC 2017, LNCS 10322, pp. 517–529, 2017.10.1007/978-3-319-70972-7_29Search in Google Scholar

[11] Anamaria Costache, Nigel P. Smart, Srinivas Vivek and Adrian Waller, Fixed-Point Arithmetic in SHE Schemes, in: SAC 2016, LNCS 10532, pp. 401–422, Springer, Heidelberg, August 2016.10.1007/978-3-319-69453-5_22Search in Google Scholar

[12] Nathan Dowlin, Ran Gilad-Bachrach, Kim Laine, Kristin Lauter, Michael Naehrig and John Wernsing, Manual for using homomorphic encryption for bioinformatics, MSR-TR-2015-87, Microsoft Research, Report, 2015.Search in Google Scholar

[13] Junfeng Fan and Frederik Vercauteren, Somewhat Practical Fully Homomorphic Encryption, Cryptology ePrint Archive, Report 2012/144, 2012, http://eprint.iacr.org/2012/144.Search in Google Scholar

[14] Matthias Geihs and Daniel Cabarcas, Efficient Integer Encoding for Homomorphic Encryption via Ring Isomorphisms, in: LATINCRYPT 2014, LNCS 8895, pp. 48–63, Springer, Heidelberg, September 2015.10.1007/978-3-319-16295-9_3Search in Google Scholar

[15] Craig Gentry, Fully homomorphic encryption using ideal lattices, in: 41st ACM STOC, pp. 169–178, ACM Press, May / June 2009.10.1145/1536414.1536440Search in Google Scholar

[16] Jeffrey Hoffstein, Jill Pipher and Joseph H. Silverman, NTRU: A ring-based public key cryptosystem, in: Algorithmic Number Theory, Third International Symposium, ANTS-III, pp. 267–288, Springer, Heidelberg, 1998.10.1007/BFb0054868Search in Google Scholar

[17] Kristin Lauter, Adriana López-Alt and Michael Naehrig, Private Computation on Encrypted Genomic Data, in: LATINCRYPT 2014, LNCS 8895, pp. 3–27, September 2015.10.1007/978-3-319-16295-9_1Search in Google Scholar

[18] Vadim Lyubashevsky, Chris Peikert and Oded Regev, On Ideal Lattices and Learning with Errors over Rings, in: EUROCRYPT 2010, LNCS 6110, pp. 1–23, Springer, Heidelberg, May 2010.10.1007/978-3-642-13190-5_1Search in Google Scholar

[19] Michael Naehrig, Kristin E. Lauter and Vinod Vaikuntanathan, Can homomorphic encryption be practical?, in: ACM Cloud Computing Security WorkshopCCSW, pp. 113–124, ACM, 2011.10.1145/2046660.2046682Search in Google Scholar

Received: 2020-02-05
Accepted: 2020-02-08
Published Online: 2020-06-14

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

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

Articles in the same Issue

  1. MathCrypt 2018
  2. Preface to the First Annual MathCrypt Proceedings Volume
  3. Multiparty Non-Interactive Key Exchange and More From Isogenies on Elliptic Curves
  4. Recovering Secrets From Prefix-Dependent Leakage
  5. Quasi-subfield Polynomials and the Elliptic Curve Discrete Logarithm Problem
  6. A signature scheme from the finite field isomorphism problem
  7. Efficiently Processing Complex-Valued Data in Homomorphic Encryption
  8. Flattening NTRU for Evaluation Key Free Homomorphic Encryption
  9. Self-dual DeepBKZ for finding short lattice vectors
  10. Designing Efficient Dyadic Operations for Cryptographic Applications
  11. Characterizing overstretched NTRU attacks
  12. New Techniques for SIDH-based NIKE
  13. A subexponential-time, polynomial quantum space algorithm for inverting the CM group action
  14. Nutmic JMC Special Edition
  15. Preface for the Number-Theoretic Methods in Cryptology conferences
  16. A framework for cryptographic problems from linear algebra
  17. Improved cryptanalysis of the AJPS Mersenne based cryptosystem
  18. New number-theoretic cryptographic primitives
  19. New Zémor-Tillich Type Hash Functions Over GL2 (𝔽pn)
  20. Protecting ECC Against Fault Attacks: The Ring Extension Method Revisited
  21. Hash functions from superspecial genus-2 curves using Richelot isogenies
  22. Can we Beat the Square Root Bound for ECDLP over 𝔽p2 via Representation?
  23. A variant of the large sieve inequality with explicit constants
  24. CHIMERA: Combining Ring-LWE-based Fully Homomorphic Encryption Schemes
  25. Equidistribution Among Cosets of Elliptic Curve Points in Intervals
  26. Integer factoring and compositeness witnesses
  27. Short Principal Ideal Problem in multicubic fields
  28. Algorithms for CRT-variant of Approximate Greatest Common Divisor Problem
  29. Orienting supersingular isogeny graphs
  30. Delegating a Product of Group Exponentiations with Application to Signature Schemes (Submission to Special NutMiC 2019 Issue of JMC)
  31. Complexity bounds on Semaev’s naive index calculus method for ECDLP
  32. Regular Articles
  33. An elementary proof of Fermat’s last theorem for all even exponents
  34. Retraction of: An elementary proof of Fermat’s Last Theorem for all even exponents
  35. Survey on SAP and its application in public-key cryptography
  36. Privacy-preserving verifiable delegation of polynomial and matrix functions
  37. New approach to practical leakage-resilient public-key cryptography
Downloaded on 22.11.2025 from https://www.degruyterbrill.com/document/doi/10.1515/jmc-2015-0051/html
Scroll to top button