ACCELERATED DIVISION OF HOMOMORPHICALLY ENCRYPTED DATA

Information

  • Patent Application
  • 20220416995
  • Publication Number
    20220416995
  • Date Filed
    June 28, 2022
    2 years ago
  • Date Published
    December 29, 2022
    a year ago
Abstract
Methods and systems for performing an operation on at least one homomorphically encrypted ciphertext, the method include determining, by a computing device, a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext; and iteratively improving, by the computing device, the value using a recurrence relation wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error.
Description
FIELD OF THE INVENTION

The invention relates generally to inversion operations on homomorphically encrypted data, in particular division.


BACKGROUND

Homomorphic encryption (HE) can allow many computations to be performed securely over encrypted data, without decrypting and/or exposing the underlying data. However, computations performed over HE data can be significantly more complex and time-consuming than, for example, their plaintext counterparts. In particular many HE schemes fail to support certain operations (e.g., inversion operations such as division).


In some existing HE schemes a numerator and denominator are determined, the numerator and denominator are decrypted, and the division is performed on the unencrypted data between the plaintext numerator and the plaintext denominator. Decryption of the numerator and denominator can reveal sensitive information, such as person information, presenting a security issue. Accordingly, it can be desired to perform operations such as division on HE data which can allow for performing the operation while the data is encrypted.


SUMMARY

Embodiments of the invention provide a technique to accelerate processor execution of computations over homomorphically encrypted data. Further, embodiments of the invention may improve the accuracy of numerical approximations for those computations. Embodiments of the invention may have the additional advantage of increased data security because the data used by embodiments of the invention does not need to be decrypted in order to perform the computation.


According to one or more embodiments, there is provided a method for performing an operation on at least one homomorphically encrypted ciphertext, the method including: determining, by a computing device, a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext; and iteratively improving, by the computing device, the value using a recurrence relation wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error.


According to some embodiments, the predetermined accuracy is based on a word length of the computing device.


According to some embodiments, the approximation error is a uniform relative error.


According to some embodiments, the operation is division.


According to some embodiments, the recurrence relation is a modified Newton iteration recurrence relation.


According to some embodiments, the modified Newton iteration recurrence relation is given by the formula: yl+1=yll−yll−x·yl) wherein γl is a predefined natural number and σl is a predefined number greater than zero.


According to some embodiments, γl<<1 and σl<<1.


According to some embodiments, a sequence (γ1, σ1), (γ2, σ2), . . . , is obtained by training using at least one of: random testing; and selection based on a fitness function.


According to one or more embodiments, there is provided a method for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x, the method including: receiving a first value, l, corresponding to a degree of the polynomial approximation to be calculated; receiving a second value, α, and a third value, β, wherein the second value and the third value define a range over which the polynomial approximation is to be calculated; and calculating the polynomial approximation using the expression:









k
=
0


2
l




(



a

k
-
1


2

+


a

k
+
1


2


)




T
k

(

ξ

(
x
)

)






wherein ak(l)=2ξak+1(l)+ak+2(l) for k=2l−3, 2l−4, . . . , 1, 0, wherein








ξ

(
x
)

=

1
-

2



β
-
x


β
-
α





,




and wherein Tk(x) is a Chebyshev polynomial of the first kind of degree k.


According to some embodiments, 0 is included in the range defined by the second value and the third value.


According to one or more embodiments, there is provided a system for performing an operation on at least one homomorphically encrypted ciphertext, the system comprising at least one processor and a memory containing instructions which, when executed by the at least one processor, cause the at least one processor to: determine a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext; and iteratively improve the value using a recurrence relation wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error.


According to some embodiments, the predetermined accuracy is based on a word length of the at least one processor.


According to some embodiments, the approximation error is a uniform relative error.


According to some embodiments, the operation is division.


According to some embodiments, the recurrence relation is a modified Newton iteration recurrence relation.


According to some embodiments, the modified Newton iteration recurrence relation is given by the formula: yl+1=yll·yll−x·yl) wherein γl is a predefined natural number and a1 is a predefined number greater than zero.


According to some embodiments γl>>1 and σl<<1.


According to some embodiments, a sequence (γ1, σ1), (γ2, σ2), . . . , is obtained by training using at least one of: random testing; and selection based on a fitness function.


According to one or more embodiments, there is provided a system for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x, the system comprising at least one processor and a memory containing instructions which, when executed by the at least one processor, cause the at least one processor to: receive a first value, l, corresponding to a degree of the polynomial approximation to be calculated; receive a second value, α, and a third value, β, wherein the second value and the third value define a range over which the polynomial approximation is to be calculated; and calculate the polynomial approximation using the expression:










k
=
0


2
l




(



a

k
-
1


2

+


a

k
+
1


2


)



T
k



(

ξ

(
x
)

)



,




wherein ak(l)=2ξ0ak+1(l)+ak+2(l) for k=2l−3, 2l−4, . . . , 1, 0, wherein








ξ

(
x
)

=

1
-

2



β
-
x


β
-
α





,




and wherein Tk(x) is a Chebyshev polynomial of the first kind of degree k.


According to some embodiments, 0 is included in the range defined by the second value and the third value.





BRIEF DESCRIPTION OF THE DRAWINGS

Non-limiting examples of embodiments of the disclosure are described below with reference to figures attached hereto. Dimensions of features shown in the figures are chosen for convenience and clarity of presentation and are not necessarily shown to scale. The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may be understood by reference to the following detailed description when read with the accompanied drawings. Embodiments are illustrated without limitation in the figures, in which like reference numerals indicate corresponding, analogous, or similar elements, and in which:



FIG. 1 is a flow chart of a method for performing an operation on homomorphically encrypted ciphertext, according to some embodiments of the invention;



FIG. 2 is a flowchart of a method for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x, according to some embodiments of the invention;



FIG. 3A is a block diagram of an exemplary computing device which may be used with embodiments of the present invention; and



FIG. 3B is schematic drawing of a system, according to some embodiments of the invention;





It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements for clarity. Further, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements.


DETAILED DESCRIPTION

In general, the invention can provide efficient and/or secure systems for performing computations in a homomorphically encrypted environment implementing accelerated algorithms for division for HE schemes. It will be understood that the methods and systems presented herein may be used for other mathematical operations/functions similar to division, e.g., matrix inversion.


In general, the invention can provide two methods for approximating the function ƒ(x)=1/x. The first method can relate to accelerated Newton iterations, and the second method can relate to minimax polynomial approximation. Both methods can produce a polynomial approximation minimizing the uniform relative error, as shown below in EQN. 1:











max



p
n

(
x
)





n

[
x
]







"\[LeftBracketingBar]"



1
/
x

-


p
n

(
x
)




"\[RightBracketingBar]"





"\[LeftBracketingBar]"


1
/
x



"\[RightBracketingBar]"




=


max



p
n

(
x
)





n

[
x
]






"\[LeftBracketingBar]"


1
-

x
·


p
n

(
x
)





"\[RightBracketingBar]"







EQN
.

1







where custom-charactern[x] denotes a set of polynomials with real coefficients whose degree is less than or equal to n. This criterion can be of relevance to HE computations due to, for example, the magnitude of the approximated function being, in general, unavailable for HE evaluated functions. In some embodiments relating to the minimax polynomial approximation method, the minimax polynomial approximation method of the invention can differ from standard minimax approximation techniques typically used in the prior art, which typically aim to minimize the uniform absolute error. The minimax polynomial approximation method of the invention can aim to minimize the uniform relative error. Minimizing the uniform relative error may allow greater choice of parameter selection.



FIG. 1 is a flowchart of a method 200 for performing (e.g., via computing device 100A shown in FIG. 3A herein) an operation on at least one homomorphically encrypted ciphertext, according to some embodiments of the invention. The operation can be division, matrix inversion, logarithm, cosine, sine, and/or any function capable of being approximated by polynomials, or any combination thereof.


According to some embodiments, method 200 includes determining (e.g., via computing device 100A as shown below in FIG. 3A), a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext (Step 202).


The value may be input by a user and/or determined automatically by the computing device. A value that is an initial approximation of a result of the operation may be a naïve guess of the result of the operation. For example, an initial approximation of the result of the division 5/2 may be 4, because 4 is less than 5.


According to some embodiments, method 200 includes iteratively improving (e.g., via the computing device 100A as shown above in FIG. 3A) the value using a recurrence relation, wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error (Step 204).


The predetermined accuracy can be based on a word length of the computing device. For example, the predetermined accuracy may be based on the 64 bit word length of current computer processors. In general the predetermined accuracy can be based on the needs of the application.


According to some embodiments, the recurrence relation corresponds to simulated annealing. According to some embodiments, the recurrence relation is a modified Newton iteration recurrence relation.


Typically, Newton iterations for the division problem can be defined by the relation as shown below in EQN. 2:











y

l
+
1


=



y
l

-


g

(

y
l

)



g


(

y
l

)



=


y
l

(

2
-

x
·

y
l



)



,


g

(
y
)

=

x
-

1
y







EQN
.

2







where the initial approximation y0(x)≈1/x can be predetermined according to the interval of values [a, b]. Typically, y0(x) is set to as a low-order minimax polynomial approximation. For the case 0<a<b, setting a constant initial guess y0(x)=c0custom-character where






b·c
0∈(1−∈,1+∈),∈∈[0,1)  EQN. 3


can ensure convergence and produce a polynomial of degree 2l at iteration l∈custom-character.


The acceleration of Newton iterations away from zero can be achieved by modifying the Newton iteration recurrence relation in a manner that can accelerate a departure from zero, according to some embodiments of the invention. The modified Newton iteration recurrence relation may be referred to as an accelerated Newton iteration recurrence relation. According to some embodiments, the Newton iteration recurrence relation is modified as shown below in EQN. 4:






y
l+1
=y
ll·yll−x·yl),γlcustom-characterl>0  EQN. 4


Note that for γll=1 the accelerated Newton iteration recurrence relation reduces to the Newton iteration recurrence relation shown in EQN. 2. As shown in EQN. 4, setting large values (e.g., >>1) for the gamma and small values (e.g., <<1) for the sigma at the initial iterations can effectively accelerate the slow departure from zero. A total number of required iterations can be reduced compared to, for example, the conventional approach of EQN. 2. Imposing γl custom-character can reduce a required number of homomorphic multiplications required at each iteration to one to, for example, reduce a computational complexity of the execution of the operation. Setting excessively large values for γl (e.g. anything where γl custom-character does not hold) can lead to instability (e.g. a failure to converge to a single value), and should therefore be avoided.


In some embodiments, for any given range of values [a, b], an acceleration sequence (γ1, σ1), (γ2, α2), . . . , can be obtained by training (e.g. random testing and selection based on a fitness function). Typically, γl ∈{1, 2, . . . , 8} where for sufficiently large l, γl ∈{1}, in other words γl=1 ∀l≥l0. Thus, for any given sequence {σl} the training for {γl} may be implemented using a simple search over all options.


Table 1 shows pseudocode for the accelerated Newton iteration method, according to embodiments of the invention.










TABLE 1






Algorithm 1 Accelerated Newton Iterations

















Ensure: 0 < a < b and L ∈ custom-character  (x ∈ |a, b| is assumed)



Ensure: γl ∈ custom-character  and custom-character  > 0 for all l = 0, 1, . . . , L − 1










 1:
procedure ACCELNEWT(a, b, x, y0, L, custom-character



 2: 
 z0 ← x * y0



 3: 
 for custom-character  = 1, 2, . . . , L do



 4: 
  [custom-character , custom-characterl] ← [custom-character − 1, custom-character − 1 * (custom-character− 1 − custom-character − 1)]



 5: 
  [custom-character , custom-character ] ← [custom-character − 1, custom-character − 1 * (custom-character− 1 − custom-character − 1)]



 6: 
  for m = 1, . . . , γl − 1 do



 7: 
   custom-character  ← custom-character  + custom-characterl



 8: 
   custom-character  ← custom-character  + custom-character



 9: 
  end for



10: 
 end for



11: 
 return yL



12: 
end procedure









An initial approximation, e.g. the value that is an initial approximation of the result of the operation, may be set as y0=1/b. According to some embodiments, the value that is an initial approximation is generated using pseudocode as shown in Table 2 below.



FIG. 2 shows a flowchart of a method 300 for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x (e.g., via computing device 100A shown below in FIG. 3A).


Method 300 may include receiving a first value, l, corresponding to a degree of the polynomial approximation to be calculated (Step 302). The first value l can be low (e.g., less than 10), corresponding to a low degree polynomial because, for example, low degree polynomials have less computational complexity and/or accumulated encryption noise. According to some embodiments, polynomials of degree 7 are used.


Method 300 may include receiving a second value, α, and a third value, β, wherein the second value and the third value define a range over which the polynomial approximation is to be calculated (Step 304). For example the polynomial approximation may be calculated over one of the ranges (α,β),(α,β], [α,β), or [α,β].


Method 300 may include calculating the polynomial approximation using the expression as shown below in EQN. 5:













k
=
0


2
l




(



a

k
-
1


2

+


a

k
+
1


2


)




T
k

(

ξ

(
x
)

)



,




EQN
.

5







wherein ak(l)=2ξ0ak+1(l)+ak+2(l) for k=2l−3, 2l−4, . . . , 1, 0, wherein








ξ

(
x
)

=

1
-

2



β
-
x


β
-
α





,




and wherein Tk(x) is a Chebyshev polynomial of the first kind of degree k (Step 306).


Assuming |x|≥1 the optimal polynomial approximation whose degree is less than or equal to some predetermined n∈custom-character with respect to the relative error satisfies the following minimax problem as shown below in EQN. 6:












p
ˆ

n

(
x
)

=

arg


min

p


n

(
x
)





n

[
x
]





max

x


[

a
,
b

]






"\[LeftBracketingBar]"


1
-

x
·


p
n

(
x
)





"\[RightBracketingBar]"







EQN
.

6







The solution to the minimax problem for the case 0 ∉[a, b] can be available from a result in approximation theory. For example, let [a, b] be a non-empty interval in R and let τ∉[a, b], then the minimum, as shown in EQN. 7:










min



ϕ

(
x
)





n

(
x
)


,


ϕ

(
τ
)

=
1




max

x


[

a
,
b

]






"\[LeftBracketingBar]"


ϕ

(
x
)



"\[RightBracketingBar]"






EQN
.

7







can be attained by the polynomial, as shown in EQN. 8:












ϕ
^

n

(


x
;
a

,
b
,
τ

)

=



T
n

(

1
+

2



x
-
b


b
-
a




)



T
n

(

1
+

2



τ
-
b


b
-
a




)






EQN
.

8







where Tn(x) denotes a Chebyshev polynomial of the first kind of degree n.


Since the polynomial ϕ(x)=1−x·pn(x) can satisfies ϕ(0)=1, setting τ=0 can imply that the optimal solution to the minimax problem given in EQN. 6 can be given by EQN 9:












p
^

n

(
x
)

=


1
x

·

(

1
-



T
n

(

1
-

2



b
-
x


b
-
a




)



T
n

(

1
-

2


b

b
-
a




)



)






EQN
.

9







Denoting:













ψ
ˆ

l

(
x
)

=




p
ˆ


2
l


(
x
)

=


1
x



(



C
l

(
x
)



C
l

(
0
)


)




,



C
l

(
x
)

=


T

2
l


(

ξ

(
x
)

)






EQN
.

10







where








ξ

(
x
)

=

1
-

2



b
-
x


b
-
a





,




using the identity as shown in EQN. 11:






C
l+1(x)=T2l+1(ξ(x))=2Cl2(x)−1  EQN. 11


EQN 12 can follow:















ψ
^


l
+
1


(
x
)

=




2



C
l

(
0
)




C

l
+
1


(
0
)


·

(



C
l

(
x
)

+



C
l

(
0
)

·



ψ
ˆ

l

(
x
)











=



(

1
+

1


C

l
+
1


(
0
)



)

·

(

2
-

x
·



ψ
ˆ

l

(
x
)



)

·



ψ
ˆ

l

(
x
)








=





ψ
ˆ

l

(
x
)

+


γ
l

·

(


σ
l

-

x
·



ψ
ˆ

l

(
x
)



)

·



ψ
ˆ

l

(
x
)










EQN
.

12







Thus,











γ
l

=


1
+

1


C

l
+
1


(
0
)



=


2



C
l
2

(
0
)




2



C
l
2

(
0
)


-
1




,




EQN
.

13










σ
l

=


2
-

1

γ
l



=

1
+

1


C
l
2

(
0
)








which, except for the restriction γlcustom-character, can agree with the accelerated Newton iterations formula in EQN. 6. As l increases, Cl(0) eventually increases exponentially. For sufficiently large l the recurrence relation can effectively coincide with the Newton iterations recurrence relation of EQN. 2.


Denoting:











ξ
0

=


ξ

(
0
)

=

-


b
+
a


b
-
a





,




EQN
.

14










x

(
ξ
)

=




b
+
a

2

+



b
-
a

2


ξ


=



b
-
a

2



(

ξ
-

ξ
0


)







then the formula for the Chebyshev polynomials approximation can be as shown in EQN. 15 below:













ψ
ˆ

l

(
x
)

=



a
0

(
l
)


2

+






2
l

-
1



k
=
1




a
k

(
l
)





T
k

(

ξ

(
x
)

)





,




EQN
.

15











x


(

a
,
b

)






and can satisfy EQN 16 as shown below:












b
-
a

2



(

ξ
-

ξ
0


)





ψ
ˆ

l

(
ξ
)


=

1
-




T

2
l


(
ξ
)



T

2
l


(

ξ
0

)


.






EQN
.

16







Employing EQN 17 as shown below:





2Tj(ξ)·Tk(ξ)=Tj+k(ξ)+T|j−k|(ξ)  EQN. 17


then










ξ
·

(



a
0

2

+




k
=
1



2

l
+
1


-
1




a
k




T
k

(
ξ
)




)


=




k
=
0


2
l




(



a

k
-
1


2

+


a

k
+
1


2


)




T
k

(
ξ
)







EQN
.

18







where ak=0 for all k∈{0, 1, . . . , 2l-1}. Thus, the recurrence relation for the coefficients is obtained as shown below in EQN. 18:






a
k
(l)=2ξ0ak+1(l)+ak+2(l),k=2l−3,2l−4, . . . ,1,0  EQN. 19


which can satisfy initial conditions as shown below in EQN. 20 and EQN. 21:











a


2
l

-
1


(
l
)


=


4

b
-
a


·


-
1



T

2
l


(

ξ
0

)




,




EQN
.

20













a


2
l

-
2


(
l
)


=


4

b
-
a


·



-
2



ξ
0




T

2
l


(

ξ
0

)







EQN
.

21







as well as the consistency condition as shown in EQN. 22 below:











a
1

(
l
)


-


ξ
0



a
0

(
l
)




=

4

b
-
a






EQN
.

22







Table 2 shows an algorithmic implementation (e.g., pseudocode) of a recursive formula for generating the polynomial approximation {circumflex over (p)}n(x) according to embodiments of the invention.










TABLE 2






Algorithm 2 Relative Error Minimax Division

















Ensure: 0 < a < b and L ∈ custom-character  (x ∈ [a, b] is assumed)











1:
procedure REMIDI(a, b, x, L)




2:
 ξ0 ← −(b + a)/(b − a)




3:
 a ← [0, . . . , 0, 8 * ξ0/(a − b)/T2L (ξ0), 4/(a − b)/T2L0)]

custom-character  2L slots




4:
 for k = 2L − 3, 2L − 4, . . . , 1, 0 do




5:
  a[k] ← 2 * ξ0 * a[k + 1] + a[k + 2]




6:
 end for




7:
 return a




8:
end procedure









The returned outcome “a” may be an array (e.g., ordered list) containing the coefficients for the polynomial approximation. Following a convention in computing of counting starting with 0, the first value in the array (position 0) may be the coefficient for the 0th power of x in the polynomial, e.g., x0=1 in other words a constant, the second value in the array (position 1) may be the coefficient for the first power of x, e.g. x1=x, the third value in the array may be the coefficient for the second power of x, e.g. x2, and so on.


If |T2l0)|<<1, algorithm 2 may be combined with algorithm 1, for example by using the polynomial approximation of algorithm 2 as the initial approximation of algorithm 1.


Embodiments of the invention can attain a significant reduction of total number of homomorphic multiplications compared to current state of the art techniques. For n=2l embodiments of the invention relating to accelerated Newton iterations can achieve a multiplicative depth l=log2(n) or l+1, and a total number of homomorphic operations l or l+1. Embodiments of the invention relating to minimax polynomial approximation can achieve a multiplicative depth l=log2(n), and/or a total number of homomorphic operations C(n0)=l−l0. The term n0=2lo denotes a predetermined number based on the parameters of the problem and C(n0) denotes the number of homomorphic multiplications needed to estimate a polynomial of degree n0, for example in Chebyshev series representation. Based on the analysis of the minimax approximation for the relative error, embodiments of the invention may be analytically optimal, and thus can set a limit for the best accuracy attainable for a given bound for the multiplicative depth.


Embodiments of the invention can be applicable to any range of values [a, b], including range of values containing zero. Let x∈[a, b]†{0}, and let d∈custom-character denote a predetermined bound for the multiplicative depth. The goal of division algorithms according to embodiments of the invention is to obtain a low complexity polynomial approximation, pn(x)≈1/x, minimizing the error in some appropriate norm given a predetermined multiplicative depth bound, d.


In some embodiments, either 0∈(a, b) or one of the interval bounds (a or b) can be arbitrarily close to 0. In these embodiments, infx∈(a,b)|x|<<1 and the division by x is numerically unstable and can produce an unreliable result. Assuming a scaling factor δ>1 such that:

    • If 0<a<1 then [δa, δb]=[1, β]
    • If −1<b<0 then [δa, δb]=[α, −1]
    • If a<0<b then [δa, δb]=[α, β] such that custom-character(|x|<1/δ)<<1, where custom-character(A) denotes the probability of event A


      Hence, approximating π(ξ)≈1/ξ where ξ=δx effectively reduces the problem to obtaining an approximation for 1/ξ where |ξ|≥1. The original approximation may be recovered by setting pn(x)=δ≮π(ξ)≈1/x. A drawback of such a rescaling is the added multiplicative depth overhead, however, the rescaling serves several practical purposes in addition to avoiding division by a small number:
    • The analysis is readily applicable for division by a natural number, a particular yet important application;
    • The approximated function ƒ(x)=1/x and all its derivative are well bounded. Thus the existence of an accurate approximation is ensured;
    • The absolute error can be bounded by a relative error as is shown below in EQN. 22:













"\[LeftBracketingBar]"



1
/
x

-


p
n

(
x
)




"\[RightBracketingBar]"







"\[LeftBracketingBar]"



1
/
x

-


p
n

(
x
)




"\[RightBracketingBar]"





"\[LeftBracketingBar]"


1
/
x



"\[RightBracketingBar]"




=




"\[LeftBracketingBar]"


1
-

x
·


p
n

(
x
)





"\[RightBracketingBar]"










"\[LeftBracketingBar]"

x


"\[RightBracketingBar]"



1







EQN
.

22









    • which implies it can be sufficient to minimize the relative error |1−x·pn(x)|.





The last point can be importance for custom-character computations. In the general case, the aim can be to minimize either the absolute error or the relative error based on the estimated magnitude of the approximated function. Such an estimate of the magnitude may not available for a custom-character evaluated function.


One concern for division by polynomial approximations can be the sensitivity to numerical underflow/overflow, e.g. what happens in contrast to assumptions |x|<1 (underflow) or |x|>max{|a|, |b|} (overflow). Typically, when |x|>max{|a|, |b|} the approximation error can become very large (e.g. sufficiently large to prevent correct decryption) even when the deviation is small. High sensitivity to numerical overflow can be avoided by taking a larger interval for evaluating the approximation. However, this comes at the expense of accuracy: expanding the interval [a, b] requires larger multiplicative depth to achieve the same accuracy as the original interval. In other words, there can be a trade-off between the accuracy of the approximation within the interval [a, b] and the stability of the method with respect to numerical underflow/overflow.


For the case 0 ∈[a, b], denote c=max{|a|, |b|} and consider an odd approximation, pn(x)=−pn(−x)≈1/x, x∈[−c, c. Thus, for another polynomial approximation whose domain of application is contained in the set of positive of positive real numbers, {circumflex over (q)}m(x)≈1/x, x∈(∈2, c2), ∈∈(0, c), deg({circumflex over (q)}m(x))=m∈custom-character, there exists the approximation as shown below in EQN. 24:






{circumflex over (q)}
2m+1(x)=x·{circumflex over (q)}m(x2)≈1/x,x∈[−c,−∈]∩[c,∈]  EQN. 24


Effectively, the problem can reduce to the approximation of ƒ(x)=1/x for the case 0∈[a, b] with c=b>a=∈>0.



FIG. 3A shows a block diagram of an exemplary computing device which may be used with embodiments of the present invention. Computing device 100A may include a controller or computer processor 105A that may be, for example, a central processing unit processor (CPU), a chip or any suitable computing device, an operating system 115A, a memory 120A, a storage 130A, input devices 135A and output devices 140A such as a computer display or monitor displaying for example a computer desktop system.


Operating system 115A may be or may include code to perform tasks involving coordination, scheduling, arbitration, or managing operation of computing device 100A, for example, scheduling execution of programs. Memory 120A may be or may include, for example, a Random Access Memory (RAM), a read only memory (ROM), a Flash memory, a volatile or non-volatile memory, or other suitable memory units or storage units. At least a portion of Memory 120A may include data storage housed online on the cloud. Memory 120A may be or may include a plurality of different memory units. Memory 120A may store for example, instructions (e.g. code 125A) to carry out a method as disclosed herein. Memory 120A may use a datastore, such as a database.


Executable code 125A may be any application, program, process, task, or script. Executable code 125A may be executed by controller 105A possibly under control of operating system 115A. For example, executable code 125A may be, or may execute, one or more applications performing methods as disclosed herein, such as a machine learning model, or a process providing input to a machine learning model. In some embodiments, more than one computing device 100A or components of device 100A may be used. One or more processor(s) 105A may be configured to carry out embodiments of the present invention by for example executing software or code.


Storage 130A may be or may include, for example, a hard disk drive, a floppy disk drive, a compact disk (CD) drive, a universal serial bus (USB) device or other suitable removable and/or fixed storage unit. Data described herein may be stored in a storage 130A and may be loaded from storage 130A into a memory 120A where it may be processed by controller 105A. Storage 130A may include cloud storage. Storage 130A may include storing data in a database.


Input devices 135A may be or may include a mouse, a keyboard, a touch screen or pad or any suitable input device or combination of devices. Output devices 140A may include one or more displays, speakers and/or any other suitable output devices or combination of output devices. Any applicable input/output (I/O) devices may be connected to computing device 100A, for example, a wired or wireless network interface card (NIC), a modem, printer, a universal serial bus (USB) device or external hard drive may be included in input devices 135A and/or output devices 140A.


Embodiments of the invention may include one or more article(s) (e.g. memory 120A or storage 130A) such as a computer or processor non-transitory readable medium, or a computer or processor non-transitory storage medium, such as for example a memory, a disk drive, or a USB flash memory encoding, including, or storing instructions, e.g., computer-executable instructions, which, when executed by a processor or controller, carry out methods disclosed herein.



FIG. 3B is a schematic drawing of a system 100 according to some embodiments of the invention. System 100 may include one or more server(s) 110, database(s) 115, and/or computer(s) 140, 150, . . . , etc. Any or all of system 100 devices may be connected via one or more network(s) 120. Network 120, which connects server(s) 110 and computers 140 and 150, may be any public or private network such as the Internet. Access to network 120 may be through wire line, terrestrial wireless, satellite or other systems well known in the art.


Server(s) 110 and computers 140 and 150, may include one or more controller(s) or processor(s) 116, 146, and 156, respectively, for executing operations according to embodiments of the invention and one or more memory unit(s) 118, 148, and 158, respectively, for storing data (e.g., encryption and/or decryption keys, and encrypted and/or decrypted data) and/or instructions (e.g., software for applying computations or calculations, keys to encrypt or decrypt data according to embodiments of the invention) executable by the processor(s). Processor(s) 116, 146, and/or 156 may include, for example, a central processing unit (CPU), a digital signal processor (DSP), a microprocessor, a controller, a chip, a microchip, an integrated circuit (IC), or any other suitable multi-purpose or specific processor or controller. Memory unit(s) 118, 148, and/or 158 may include, for example, a random access memory (RAM), a dynamic RAM (DRAM), a flash memory, a volatile memory, a non-volatile memory, a cache memory, a buffer, a short term memory unit, a long term memory unit, or other suitable memory units or storage units.


Computers 140 and 150 may be servers, personal computers, desktop computers, mobile computers, laptop computers, and notebook computers or any other suitable device such as a cellular telephone, personal digital assistant (PDA), video game console, etc., and may include wired or wireless connections or modems. Computers 140 and 150 may include one or more input devices 142 and 152, respectively, for receiving input from a user (e.g., via a pointing device, click-wheel or mouse, keys, touch screen, recorder/microphone, other input components). Computers 140 and 150 may include one or more output devices 144 and 154 (e.g., a monitor or screen) for displaying data to a user provided by or for server(s) 110.


Database 115 may include software processes or applications for storing and retrieving data 117 such as large-word data structures and large-work CKKS computations, and/or encryption and/or decryption keys. Data 117 may also include code (e.g., software code) or logic, e.g., to enable the application of large-work CKKS algorithms according to embodiments of the invention. Database 115 may be internal or external to one or more of server(s) 110 and/or computer(s) 140 and/or 150 (not shown) and may be connected thereto by a local or remote and a wired or wireless connection. In some embodiments, data 117 is stored in an alternate location separate from database 115, e.g., memory unit(s) 118, 148, and/or 158.


Any of system 100 devices may operate as a secure or insecure party. Secure parties may each securely store unencrypted (or encrypted) data and private keys associated with each dataset, party, etc. Insecure parties may not access the unencrypted data or private keys.


Unless specifically stated otherwise, as apparent from the foregoing discussion, it is appreciated that throughout the specification discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining,” or the like, refer to the action and/or processes of a computer or computing system, or similar electronic computing device, that manipulates and/or transforms data represented as physical, such as electronic, quantities within the computing system's registers and/or memories into other data similarly represented as physical quantities within the computing system's memories, registers or other such information storage, transmission or display devices.


Embodiments of the invention may include an article such as a computer or processor readable non-transitory storage medium, such as for example a memory, a disk drive, or a USB flash memory encoding, including, or storing instructions, e.g., computer-executable instructions, which when executed by a processor or controller, cause the processor or controller to carry out methods disclosed herein.


It should be recognized that embodiments of the invention may solve one or more of the objectives and/or challenges described in the background, and that embodiments of the invention need not meet every one of the above objectives and/or challenges to come within the scope of the present invention. While certain features of the invention have been particularly illustrated and described herein, many modifications, substitutions, changes, and equivalents may occur to those of ordinary skill in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes in form and details as fall within the true spirit of the invention.


In the above description, an embodiment is an example or implementation of the inventions. The various appearances of “one embodiment,” “an embodiment” or “some embodiments” do not necessarily all refer to the same embodiments.


Although various features of the invention may be described in the context of a single embodiment, the features may also be provided separately or in any suitable combination. Conversely, although the invention may be described herein in the context of separate embodiments for clarity, the invention may also be implemented in a single embodiment.


Reference in the specification to “some embodiments”, “an embodiment”, “one embodiment” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the inventions.


It is to be understood that the phraseology and terminology employed herein is not to be construed as limiting and are for descriptive purpose only.


The principles and uses of the teachings of the present invention may be better understood with reference to the accompanying description, figures, and examples.


It is to be understood that the details set forth herein do not construe a limitation to an application of the invention.


Furthermore, it is to be understood that the invention may be carried out or practiced in various ways and that the invention may be implemented in embodiments other than the ones outlined in the description above.


It is to be understood that the terms “including”, “comprising”, “consisting” and grammatical variants thereof do not preclude the addition of one or more components, features, steps, or integers or groups thereof and that the terms are to be construed as specifying components, features, steps, or integers.


If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional elements.


It is to be understood that where the claims or specification refer to “a” or “an” element, such reference is not to be construed that there is only one of that element.


It is to be understood that where the specification states that a component, feature, structure, or characteristic “may”, “might”, “may” or “could” be included, that a particular component, feature, structure, or characteristic is not required to be included.


Where applicable, although state diagrams, flow diagrams or both may be used to describe embodiments, the invention is not limited to those diagrams or to the corresponding descriptions. For example, flow need not move through each illustrated box or state, or in exactly the same order as illustrated and described.


Methods of the present invention may be implemented by performing or completing manually, automatically, or a combination thereof, selected steps or tasks.


The descriptions, examples, methods and materials presented in the claims and the specification are not to be construed as limiting but rather as illustrative only.


Meanings of technical and scientific terms used herein are to be commonly understood as by one of ordinary skill in the art to which the invention belongs, unless otherwise defined. The present invention may be implemented in the testing or practice with methods and materials equivalent or similar to those described herein.


While the invention has been described with respect to a limited number of embodiments, these should not be construed as limitations on the scope of the invention, but rather as exemplifications of some of the preferred embodiments. Other possible variations, modifications, and applications are also within the scope of the invention. Accordingly, the scope of the invention should not be limited by what has thus far been described, but by the appended claims and their legal equivalents.

Claims
  • 1. A method for performing an operation on at least one homomorphically encrypted ciphertext, the method comprising: determining, by a computing device, a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext; anditeratively improving, by the computing device, the value using a recurrence relation wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error.
  • 2. The method of claim 1, wherein the predetermined accuracy is based on a word length of the computing device.
  • 3. The method of claim 1, wherein the approximation error is a uniform relative error.
  • 4. The method of claim 1, wherein the operation is division.
  • 5. The method of claim 1, wherein the recurrence relation is a modified Newton iteration recurrence relation.
  • 6. The method of claim 5, wherein the modified Newton iteration recurrence relation is given by the formula: yl+1=yl+γl·yl(σl−x·yl)
  • 7. The method of claim 6, wherein γl>>1 and σl<<1.
  • 8. The method of claim 6, wherein a sequence (γ1, σ1), (γ2, σ2), . . . , is obtained by training using at least one of: random testing; and selection based on a fitness function.
  • 9. A method for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x, the method comprising: receiving a first value, l, corresponding to a degree of the polynomial approximation to be calculated;receiving a second value, α, and a third value, β, wherein the second value and the third value define a range over which the polynomial approximation is to be calculated; andcalculating the polynomial approximation using the expression:
  • 10. The method of claim 9, wherein 0 is included in the range defined by the second value and the third value.
  • 11. A system for performing an operation on at least one homomorphically encrypted ciphertext, the system comprising at least one processor and a memory containing instructions which, when executed by the at least one processor, cause the at least one processor to: determine a value that is an initial approximation of a result of the operation on the at least one homomorphically encrypted ciphertext; anditeratively improve the value using a recurrence relation wherein a number of iterations is determined based on a predetermined accuracy to minimize an approximation error.
  • 12. The system of claim 11, wherein the predetermined accuracy is based on a word length of the at least one processor.
  • 13. The system of claim 11, wherein the approximation error is a uniform relative error.
  • 14. The system of claim 11, wherein the operation is division.
  • 15. The system of claim 11, wherein the recurrence relation is a modified Newton iteration recurrence relation.
  • 16. The system of claim 15, wherein the modified Newton iteration recurrence relation is given by the formula: yl+1=yl+γl·yl(σl−x·yl)
  • 17. The system of claim 16, wherein γl>>1 and σl<<1.
  • 18. The system of claim 16, wherein a sequence (γ1, σ1), (γ2, σ2), . . . , is obtained by training using at least one of: random testing; and selection based on a fitness function.
  • 19. A system for calculating a polynomial approximation of 1/x for a homomorphically encrypted ciphertext x, the system comprising at least one processor and a memory containing instructions which, when executed by the at least one processor, cause the at least one processor to: receive a first value, l, corresponding to a degree of the polynomial approximation to be calculated;receive a second value, α, and a third value, β, wherein the second value and the third value define a range over which the polynomial approximation is to be calculated; andcalculate the polynomial approximation using the expression:
  • 20. The system of claim 19, wherein 0 is included in the range defined by the second value and the third value.
CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of and priority to U.S. Provisional Patent Application No. 63/215,865 filed Jun. 28, 2021, which is owned by the assignee of the instant application and incorporated herein by reference in its entirety.

Provisional Applications (1)
Number Date Country
63215865 Jun 2021 US