More Practical Fully Homomorphic Encryption
Gu Chunsheng
School of Computer Engineering Jiangsu Teachers University of Technology
Changzhou, China, 213001 [email protected]
Abstract: In this paper, we first modify the Smart-Vercauteren’s fully homomorphic encryption scheme [SV10] by applying self-loop bootstrappable technique. The security of the modified scheme only depends on the hardness of the polynomial coset problem, removing the assumption of the sparse subset sum problem in the original paper in [SV10]. Moreover, we construct a non-self-loop in FHE by using cycle keys. Then, we further improve our scheme to make it be practical. The securities of our improving FHE’s are respectively based on the hardness of factoring integer problem, solving Diophantine equation problem, and finding approximate greatest common divisor problem.
Keywords: Fully Homomorphic Encryption, Polynomial Coset Problem, Factoring Integer, Diophantine Equation Problem, Approximate GCD, SSSP
1.
Introduction
In this work, we first present a fully homomorphic encryption scheme (FHE) by modifying the FHE in [SV10], which merely uses the elementary theory of algebraic number fields. Then, we improve this scheme to make it be practical by hiding the ideal lattice in the public key. The public key in their scheme consists of a prime
p
and an integerα
modulop
. The private key is an integer . To encrypt a bit , one selects a small random polynomial, and output a ciphertext
0
s
m( )
r x
c
=
(
m
+
2 ( )) mod
r
α
p
. To decrypt a ciphertext , onecomputes the message bit as follows: . To implement FHE,
they introduce the hardness assumption of the sparse subset sum problem. Moreover, to
obtain the FHE in [SV10], they must set lattices of dimension at least , which is
beyond practical usability [GH10].
c
0
( / 0.5 ) m
m= − ×c ⎢⎣c s p+ ⎥⎦ od 2
27
2
n
=
The aim of this paper is to remove the hardness assumption of SSSP in the Smart-Vercauteren’s FHE [SV10], and improves our scheme to make it be practical. The advantage of their scheme is simple, since the public key in their SHE scheme merely implies
lattice, and is equivalent to its corresponding HNF representation. So, when the dimension of an ideal lattice is small, one can find the secret key by using lattice reduction algorithm. This is the reason why the dimension of an ideal lattice n cannot be taken too small in their FHE.
1.1 Our Contribution
The difference between our scheme and their work is mainly located on fully homomorphic encryption scheme. We use the approach of re-randomizing the secret key to squash decryption polynomial, whereas they introduce the hardness assumption of SSSP to squash decryption polynomial. The security of our scheme is only based on the hardness of the polynomial coset problem. What is more, we further construct several variant FHEs to make our scheme be practical. The securities of our variant schemes respectively depend on the hardness assumption of factoring integer problem, solving Diophantine equation problem, and approximate GCD problem. The start point of our work is to provide the public key of other
forms to hide the public key
( , )
p
α
.Recall that our variant FHE’s can also be implemented by introducing the assumption of the sparse subset sum problem. In this case, the public key does not have special structure of encrypted secret key. In addition, we may construct a new public key cryptosystem based on
the decisional Diophantine equation problem without including
( , )
p
α
in the public key.1.2 Related work
Rivest, Adleman, and Dertouzos [RAD78] first investigated a privacy homomorphism, which now is called the fully homomorphic encryption (FHE). Many researchers [BGN05, ACG08, SYY99, Yao82] have worked at this open problem. Until 2009, Gentry [Gen09] constructed the first fully homomorphic encryption using ideal lattice. In Gentry’s scheme, the public key
is approximately bits, the computation per gate costs operations. Smart and
Vercauteren [SV10] presented a fully homomorphic encryption scheme with both relatively
small key bits , ciphertext size bits and computation per gate at least
operations, which is in some sense a specialization and optimization of Gentry’s
scheme. Dijk, Gentry, Halevi, and Vaikuntanathan [vDGHV10] proposed a simple fully homomorphic encryption scheme over the integers, whose security depends on the hardness of finding an approximate integer GCD. Stehle and Steinfeld [SS10] improved Gentry's fully
homomorphic scheme and obtained to a faster fully homomorphic scheme, with
bits complexity per elementary binary addition/multiplication gate, but the hardness assumption of the security of the scheme in [SS10] is stronger than that in [Gen09].
7
n
O n
( )
63
( )
O n
O n
(
1.5)
3
( )
O n
3.5
(
)
1.3 Organization
Section 2 recalls notations and related defintions, and gives Smart-Vercauteren’s somewhat homomorphic encryption. Section 3 first transforms the somewhat homomorphic encryption into a FHE by applying self-loop bootstrappable technique, then constructs a non-self-loop FHE by using the method of cycle keys. Section 4 further improves our FHE to make it be practical. Section 5 gives a concrete implementation of our scheme. Section 6 concludes this paper.
2.
Preliminaries
2.1 Notations
Let n be a security parameter,
[ ] {0,1,..., }
n
=
n
. LetR
be the ring of integer polynomialsmodulo
f x
( )
, i.e.,R
=
Z x
[ ] / ( )
f x
, wheref x
( )
is an integer monic and irreduciblepolynomial of degree . For n
f
∈
R
, we denote by f ∞ the infinity norm of itscoefficient vector, sometimes denoted f ,
[ ]
f 2 the polynomial of its coefficient modulo 2.For
R
, its expansion factorγ
mul is , that is, n u v× ∞ ≤ ⋅n u ∞⋅ v ∞, where×
is multiplication inR
.2.2 Ideal Lattices
In this paper, we take
( )
n1
with a power of . Letf x
=
x
+
n2
I
be a principal ideal ofR
, namely, it only has a single generator. For the coefficient vector( , ,...,
0 1 1)
T nu
=
u u
u
− of, we define the cyclic rotation
u∈R
rot u
( ) (
= −
u
n−1, ,...,
u
0u
n−2)
T, and the correspondingcirculant matrix
( ) ( ,
( ),...,
n 1( ))
TRot u
=
u rot u
rot
−u
.Rot u
( )
is called the rotation basis ofthe ideal lattice
( )
u
. For∀
f u
,
∈
R
,[ ]
f
u is the coefficient vector off
modulo therotation basis of , namely, u
f
mod
Rot u
( )
. So, we consider each element ofR
as being2.3 Smart-Vercauteren’s Somewhat Homomorphic Encryption (SHE)
Smart and Vercauteren’s in the SHE of [SV10] first select a principal ideal with
over the ring
( )
u x
( ) 1mod 2
u x
=
R
such that the determinant of the circulant matrix ofis a prime. It is easy to verify that this ideal can be represented by either two integers
( )
u x
( , )
p
α
,where
p
=
det(
Rot u
( ))
andα
is a common root ofu x
( )
andf x
( )
modulop
. Then,they evaluate a polynomial
s x
( )
such thatu x
( )
×
s x
( )
=
p
mod ( )
f x
. they finally outputthe public key
( , )
p
α
, the secret keys
0=
s x
( ) mod
x
. To encrypt a message bit ,the scheme chooses a random small polynomial , computes its value at
{0,1}
m
∈
( )
r x
α
, and outputsa ciphertext . Given a ciphertext and the secret key
, the decryption algorithm deciphers the message bit
. Given two ciphertexts , addition operation
, and multiplication operation
( ) (2 ( )
def) mod
c
=
Enc m
=
r
α
+
m
p
c0
s
0
( ) (def / 0.5 ) mod 2
m=Dec c = −c ⎣⎢c si p+ ⎥⎦
c c
1,
21 2 1 2
( , ) (
def) mod
Add c c
=
c
+
c
p
( , ) (
1 2 1 2) mod
def
Mul c c
=
c c
i
p
.It is known that this SHE can only evaluate low-degree polynomials. By applying the bootstrappable technique in [Gen09], they transform the SHE scheme into a FHE scheme by introducing the sparse subset sum problem to squash the decryption circuit depth.
3.
Fully Homomorphic Encryption (FHE)
In this section, we first construct a self-loop FHE based on the Smart-Vercauteren’s SHE, and simply analyze the security of our scheme. Then, we present a non-self-loop FHE by using the approach of cycle keys.
3.1 Construction of Self-loop FHE
Since our SHE is same as that of [SV10], we only need to give a new Recrypt algorithm,
which freshens a ‘dirty’ ciphertext into a new ciphertext with the ‘smaller’ error
term and the same plaintext of . To do this, we generate the ciphertexts of the secret key and add them to the public key.
c
c
newc
(1) Assume
( )
n1
f x
=
x
+
with a power of 2. Choose a random polynomialwith and
n
u x
( )
( ) 1mod 2
u x
=
u x( )∞ =2η such thatdet(
( ( ))) 2
np
=
Rot u x
≈
η is aprime. Evaluate a common root
α
ofu x
( )
andf x
( )
modulop
, andsuch that
1 0
( ) n i [ ]
i i
s x =
∑
=− s x ∈Z xu x
( )
×
s x
( )
=
p
mod ( )
f x
.(2) Set
s
0=
s x
( ) mod mod(2 )
x
p
.(3) Choose at random an integer 0,1 0 2i i i
s =
∑
λ= z withw
=
w s
(
0,1)
=
ω
(log
n
)
and, where is hamming weight of , and take .
log(2 )p
λ
= ⎢⎣ ⎥⎦w s
(
0,1)
s
0,1s
0,2= −
s
0s
0,1(4) Encrypt each bit
z
i ofs
0,1 :z
i=
Enc z
( ) (2 ( )
i=
r
iα
+
z
i) mod
p
such that( ) / 2
i
r x ∞ =n for each
r x
i( )
. Let 0,1 0 2i i i s =
∑
λ= z .(5) Output the public key
pk
=
( , , , ,
n p
α
w s
0,1,
s
0,2)
, and the secret keysk
=
( , )
p s
0 . All Enc, Dec, Add, Mul algorithms are same as those in [SV10].Remark 3.1: To simplify our description, we take
u x
( ) 1mod 2
=
same as that in [SV10].In fact, we can select an arbitrary polynomial . In this case, we need to modify the
above SHE scheme as follows. The public key is
( )
u x
[
]
1,1 ,2 0
2
( , , , , ( ) ,{ ,
} )
ni i i
pk
=
n p
α
w u x
s
s
=−such that
s
i=
s
i,1+
s
i,2 and[
u x
( )
]
2 is the polynomial of encrypted , thesecret key is
( ) mod 2
u x
( , ( ) mod 2, ( ))
sk
=
p u x
s x
. The decryption algorithm is changed into[
]
2* ( ) 0.5 ( )
m= −c ⎢⎣c s x + h⎥⎦× u x , where h=
∑
ni=−01xi.Remark 3.2: We may also select an odd composite number
p
=
det(
Rot u x
( ( )))
. To obtainroot
α
, we need to factorp
, then solveα
i for each prime factor by using extending GCD, and computeα
by applying Chinese Remainder Theorem. So, we can choose many polynomialu x
i( )
with different primep
i=
det(
Rot u x
( ( )))
i , and set .The advantage of this scheme is easily to generate key.
( ) i( )
u x =
∏
u xRemark 3.3: It is obvious that our scheme can also use larger message space as that of [SV10].
(1) Set
(
2 ) /
i , iv
= ×
c
p
i
∈
[ ]
λ
, keeping only k=⎡⎢log(w+1)⎥⎤+3 bits of precisionafter the binary point for each
v
i.(2) Evaluate
g
i= ×
v
iz
i andg
0,2= ×
c s
0,2/
p
, and sumλ
+1 encrypted rationalnumbers with w+1 non-zero numbers, denoted as x (g0,2 i 0gi)
λ =
= +
∑
mod 2.(3) Assume
x
=
x x x
0.
−1 −2x
−k. Evaluatex
0, 1−=
Add x x
( ,
0 −1)
and u=cmod 2.(4) Output a new ciphertext
c
new=
Add u x
( ,
0, 1−)
.Theorem 3.1. Recrypt algorithm correctly generates a ‘fresh’ ciphertext with the same
message of , and supports a product of two ‘fresh’ ciphertexts when new
c
c
1 log
8log
2log
n
t
n
η
η
− +
≤
+
,where t= +w 1.
Proof: By the Dec algorithm, we know
0 0,1 0,2 0,1 0,2 0,2 0 0,2 0 0
( / 0.5 ) mod 2
mod 2 ( ) / 0.5 mod 2
mod 2 / / 0.5 mod 2
mod 2 ( / ) 2 / 0.5 mod 2
mod 2 ( 2 ) / / 0.5 mod 2
mod 2 i i i i i i i i i c c s p
c c s s p
c c p s c s p
c c p z c s p
c c p z c s p
c v z c s
λ λ λ = = = − ×⎢⎣ + ⎥⎦ ⎢ ⎥ = + ×⎣ + + ⎦ ⎢ ⎥ = +⎣ × + × + ⎦ ⎢ ⎥ = +⎣ × + × + ⎦ ⎢ ⎥ = +⎣ × × + × + ⎦ = + × + ×
∑
∑
∑
0,2/ p 0.5 mod 2⎢ + ⎥
⎣ ⎦
.
Assume
ρ λ
= + ≈
2
n
η
. Since there are non-zero encrypted rational numbers amongt
ρ
encrypted rational numbers, we can use symmetric polynomials with degree to evaluate the sum of these rational numbers. The number of symmetric polynomials is at most
t
tt
ρ
ρ
⎛ ⎞
≈
⎜ ⎟
⎝ ⎠
. The number of degree monomials in the polynomial representing our rationaladdition algorithm is equal to , which is less than (see
[GH10] for details). So, the polynomial corresponding to a new generating ciphertext
is satisfied to
t
...
/ 2 / 4 1
t t t
t t ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ × × × ⎜⎡ ⎤⎟ ⎜⎡ ⎤⎟ ⎜ ⎟ ⎢ ⎥ ⎢ ⎥ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ t
t
( )
r x
log 12 1 2
( )
t t t t t tr x
∞≤
ρ
t n
+−=
ρ
t n
−1, where is the infinity norm of thepolynomial corresponding to . Moreover, to support one multiplication for two ‘fresh’ n
i
ciphertexts, we require ( ( )) ( ) /2 1/ 2
r x s x p
∞ < according to [SV10]. Hence, we have
2 2 2
( ( )) ( ) /t 2
r x
ρ
tn n η−∞ ≤
1
≤ , namely,
1 log
8log
2log
n
t
n
η
η
− +
≤
+
.■3.2 Security of FHE
For the semantic secure of our scheme, we follow the security analysis of [SV10]. The following definition is from that in [SV10].
Definition 3.1. ( [SV10] Polynomial Coset Problem (PCP)).Given , the problem is to
guess whether or , where is computed from either
( ,
r pk
)
0
b= b=1
r
r
=
u
( ) mod
α
p
for, where is a random polynomial with
0
b=
u x
( )
u ≤β
, or uniformly selected fromfor .
U p
r
←
F
b=1Theorem 3.2. ( [SV10] Theorem 1). Suppose there is an algorithm
A
which breaks the semantic security of our SHE with advantageε
. Then there is a distinguishing algorithm , which decides the PCP with advantageD
/ 2ε
.3.3 Construction of Non-Self-loop FHE
According to [Gen09], the above FHE can not prove to be semantically secure by a standard hybrid argument when using self-loop. In fact, the FHE in [Gen09, SV10] also reveals the encrypted secret key bits, although it is not direct. The advantage of applying cycle keys is to maximize possible distribution of the ciphertexts of encrypted secret key. In the following, we present a non-self-loop FHE by using method of cycle keys. But the drawback of our non-self-loop scheme is to require calling Recrypt two times to refresh ciphertext.
Non-self-loop-KeyGen Algortihm:
(1) Call Step (1) of KeyGen in Section 3.1 two times to generate the public keys
1
( , )
1pk
=
p
α
1 ,pk
2=
( ,
p
2α
2)
and the secret keyssk
1=
( , )
p s
1 1 ,sk
2=
( , )
p s
2 2 .(2) Set 1 1 , and .
0
mod mod(2 )
1s
=
s
x
p
s
02=
s
2mod mod(2 )
x
p
2(3) Choose at random an integer 0,1
0 2
j j i
i i
s =
∑
λ= z ,j
=
1, 2
withand
0,1
( j ) (log )
w=w s =
ω
n1
max{ log(2 ) , log(2 ) }p p
λ
= ⎢⎣ ⎥ ⎢⎦ ⎣ 2 ⎥⎦ , and take 0,2j 0j 0,1 s =s −sj .(4) Encrypt s10,1 under
pk
2=
( ,
p
2α
2)
asz
i1=
Enc z
( ) (2 ( )
1i=
r
iα
2+
z
1i) mod
p
2 withrandom 1
( )
, and under ir x
s0,12pk
1=
( , )
p
1α
1 . Let 0,1j 0 ij2i
(5) Output the public key 2
0,1 0,2 1
{ , , , , j , j }
j j j
pk∗ = n p
α
w s s = , and the secret key.
2
0 1
{ , }j
j j
sk= p s =
Assume we use
pk
1=
( , )
p
1α
1 as the public key when encrypting message. To refresh aciphertext , we first call Recrypt with to generate an intermediate ciphertext c c
c
1 under2
pk
, then again call Recrypt withc
1 to obtain a new ciphertextc
new underpk
1.4.
Improvement of FHE
In the following, we only discuss how to improve the self-loop FHE scheme in Section 3.1. Indeed, it is not difficult to verify that our improvement scheme can be transform into the corresponding non-self-loop scheme.
Since the public key in our FHE is
pk
=
( , , , ,
n p
α
w s
0,1,
s
0,2)
, one can construct a principalideal lattice with HNF form by
( , )
p
α
. So, the dimension of an ideal lattice must be setlarge enough to guarantee the security of FHE. As a result, for practical values of , the origin scheme [SV10] can not be made FHE. The start point of our work is to hide the
parameters
n
n
( , )
p
α
to avoid the lattice reduction attack. Hence, we can choose a small oreven a constant to make our scheme be practical. To describe simplicity, in this section we denote by
n
τ
security parameter, the dimension of ideal lattice. n4.1 FHE Based on Factoring Integer Problem
To hide integer
α
, we substituteα
by the ciphertexts ( ) 0{
(0)}
Oi
b
=
Enc
i=τ of many 0-bits,namely, the public key becomes ( )
0 0,1 0,2
( , , ,{ }O , , )
i i
pk= n p w b =τ s s . To attack this scheme, one
can factor n
1mod
x
+
p
, then guessα
among n roots of n1mod
x
+
p
. However, weobserve that n
1mod
x
+
p
can be efficiently factored only whenp
is a prime or has beenfactored. So, if we take
q
=
pq
0 such thatp
=
det(
Rot s x
( ( )))
is a prime, is anotherprime, then one cannot factor when hidden modulo
0
q
1
nx
+
p
.KeyGen-1 Algorithm:
(2) Choose a random prime
q
0, and takeq
=
pq
0 with p ≈ q0 , where y is the length ofy
.(3) Encrypt
θ
=
O
( )
τ
0-bits:b
i=
2 ( ) mod
r
iα
q
with r xi( )∞ =2τ −1.(4) Choose a random fraction 0,1
0 2
i i i
s =
∑
λ= z − withw s
(
0,1)
=
ω
(log )
τ
and, and set , keeping only
logq
λ
= ⎡⎢ ⎤⎥s
0,2=
⎣
⎡
s
0/
p
−
s
0,1 2⎤⎦
λ
bits of precision after thebinary point, and encrypt each bit
z
i asz
i=
(2 ( )
r
iα
+
z
i) mod
q
with r xi( ) ∞ =2τ −1.Let 0,1
0 2
i i i
s =
∑
λ= z − .(5) Output the public key pk=( , , ,{ } ,n q w bi iθ=0 s0,1,s0,2) and the secret key
sk
=
( , )
p s
0 .Encryption Algorithm (Enc). Given the public key
pk
and a message bit ,choose a small random subset
{0,1}
m
∈
[ ]
T
⊂
θ
and a random integer e <2τ −1, output a ciphertext.
(
i T i2
) m
c
=
∑
∈b
+
e m
+
od
q
The Dec, Mul, Add algorithms are identical to that in Section 3.1 except with replacing
p
with
q
. The Recrypt algorithm is modified into 0,1 0,2[ ]
2
0.5
newc
=
⎢
⎣
c s
i
+
c s
i
+
⎥
⎦
+
c
. Correctness and Security:One can easily checkthat this scheme is correctness. To break this scheme, one first considers
to factor
q
=
pq
0 andx
n+
1mod
p
, then guessα
among roots and solve and. However, as far as I know, there is not an efficient algorithm which given , factors
.
n
u x
( )
( )
s x
q
1
nx
+
Theorem 4.1. Given pk =( ,n q= pq w b0, ,{ } ,i iθ=0 s0,1,s0,2), suppose factoring is
hard. Then our scheme based on factoring integer problem is semantic secure when .
1
nx
+
2
n≥ Remark 4.1: For n=2, there is an interesting example. It is well known that there is
2 2
p
=
a
+
b
for a primep
=
1mod 4
. So, forf x
( )
=
x
2+
1
and a primelarge enough, we can set with
1mod 4
p
=
( )
u x
=
ax b
+
det(
Rot u x
( ( )))
=
p
, and construct a scheme4.2 FHE Based on Diophantine Equation Problem
There is an efficient quantum algorithm which factors integers [Sho97]. So, the above scheme based on factoring integer is not secure for the quantum computer. In this subsection, we construct a new variant of our scheme, whose security depends on the hardness assumption of solving Diophantine equation problem.
4.2.1 Costruction
KeyGen-2 Algorithm:
(1) Choose a random polynomial
u x
( )
such thatp
=
det(
Rot u x
( ( ))) 2
≥
nη is a prime,, and
( ) 1mod 2
u x
=
u x( ) ∞ =2η. Evaluate a common rootα
of andunder modulo
( )
u x
x
n+
1
p
, and 10
( ) n i [ ]
i i
s x =
∑
=− s x ∈Z x such that.
( )
( )
mod(
n1)
u x
×
s x
=
p
x
+
(2) Select a list of integers dj =2 ( ) modrj
α
p2 such that for( 1)
/ 2 j
j
d p≈ τ +
j
=
[ ]
µ
,, where
(log ) /p 1
µ
=⎡⎢τ
⎤⎥− ( ) 2 1j
r x τ −
∞ ≤ . Recall that
d
j is a ciphertext of 0-bit.(3) Encrypt a list of 0-bits:
b
i=
2 ( ) mod
r
iα
p
such thatr x
i( )
is a random polynomial,1
( ) 2
i
r x ∞ ≤ τ − ,
b
0 is an odd integer, and bi ≤ b0 for alli
=
[ ],
θ θ
=
O
( )
τ
.(4) Choose a random fraction 0,1
0 2
i i i
s =
∑
λ= z − withw s
(
0,1)
=
ω
(log )
τ
and, and set
log 2p 2
λ
= ⎢⎣ ⎥⎦ +s
0,2=
[ /
s
0p
−
s
0,1 2]
, keeping onlyλ
bits of precision afterthe binary point. Encrypt each bit of
z
is
0,1:z
i=
Enc z
( ) (2 ( )
i=
r
iα
+
z
i) mod
p
with ( ) 2 1
i
r x ∞ ≤ τ − . Let s0,1 i 0zi2 i
λ − =
=
∑
.(5) Output the public key pk ( , ,{ } ,{ } ,n w dj j 0 bi i 0 s0,1,s0,2)
µ θ = =
= and the secret key
.
0
( , )
sk
=
p s
Remark 4.2: How to generate . We first choose at random a list of integers
, and remain all qualified , and then for other non-qualified ,
evaluate
j
d
2 2 ( ) mod
j j
d = r
α
pd
jd
j2 ( ) mod
j j j
computing
d
j=
2 ( ) mod
r
jα
p
+
q p
j . We observe thatd
j,j
=
[ ]
µ
do not reveal anyinformation about
p
except with the length ofp
, if suppose2 ( ) mod
r
jα
p
isdistinguishing from the uniform distribution over the set
[ ]
p
.Remark 4.3: In the KeyGen-2 algorithm, we can also replace
p
byq
=
q p
0 with an oddinteger
q
0 when computingb
i=
2 ( ) mod
r
iα
p
to further hide modulop
.Encryption Algorithm (Enc). Given the public key
pk
and a message bit ,choose a small random subset
{0,1}
m
∈
[ ]
T
⊂
θ
and a random integer e <2τ −1, output a ciphertext.
0
(
i T i2
) mo
c
=
∑
∈b
+
e m
+
d
b
Add Operation (Add). Given the public key
pk
, and two ciphertexts , evaluate aciphertext .
1
,
2c c
1 2
(
) mod
c
=
c
+
c
b
0Multiplication Operation (Mul). Given the public key
pk
and two ciphertexts ,evaluate a new ciphertext , denoted as
.
1
,
2c c
1 2 1 0
(
) mod
mod
...mod
mod
c
=
c
×
c
d
µd
µ−d
b
01 2
(
)
c
=
Opt c
×
c
Recall here that the quotient of each optimization is at most
2
τ, that is, each optimization only increase the coefficient of the polynomial corresponding to a ciphertext at most2
2τ. Decryption Algorithm (Dec). Given the secret key and a ciphertext , decipher themessage bit .
sk c
0
( / 0.5 ) m
m= − ×c ⎢⎣c s p+ ⎥⎦ od 2
Recrypting algorithm (Recrypt-2(pk, c)).
(1) Evaluate and
1 2
i
i i i
g = ×c
∑
λ= z −g
0,2= ×
c s
0,2, and sumλ
+1 encrypted rationalnumbers with t= +w 1 non-zero rational numbers: ( 0,2 0 i) i
x= g +
∑
λ= g mod 2.(2) Assume
x
=
x x x
0.
−1 −2x
−k. Evaluatex
0, 1−=
Add x x
( ,
0 −1)
and u=cmod 2.(3) Output a new ciphertext
c
new=
Add u x
( ,
0, 1−)
.4.2.2 Correctness
correct. For Mul algorithm, the reason we use is to reduce length of ciphertext to a fixed
length, and remain the infinity norm of the polynomial corresponding to new generating ciphertext to be controllable small.
j
d
Now, we determine for what parameters all above algorithms are correct. First, we know that
the infinity norm in each polynomial corresponding to
b
i,d
j is at most2
τ according to
KeyGen algorithm. For the Enc algorithm, the polynomial corresponding to
is satisfied to
'( )
r x
' (
i T i2
)
c
=
∑
∈b
+
e
+
m
r x'( ) ∞ ≤| | 2T × +τ 2τ =θ
2τ, and taking moduloincreases the norm of at most
0
b
r x
'( )
θ
2
τ. Since(
i2
)
0i T
c
=
∑
∈b
+
e m
+
−
σ
b
withσ θ
< , hence the infinity norm ofr x
( )
corresponding to(
i2
) mo
0i T
c
=
∑
∈b
+
e m
+
d
b
is at most
θ
2
τ+1. For the Dec algorithm, we know that if ( ) ( ) / 1/ 2r x ×s x p ∞ < , namely,
1
( ) 2
r x ∞ < η− according to [SV10], Dec decrypts will be correct.
For the Add operation,
r x
( )
corresponding toc
=
(
c
1+
c
2) mod
b
0 is subject to( ) 3 2
r x ∞ ≤ × τ. For the Mul operation, we use the optimization technique in [vDGHV10].
Without loss of generality, assume that
r x i
i( ),
=
1, 2
are corresponding to the polynomial ofciphertext
c
i and satisfied to r xi( ) 2κ
≤ . Because 2
1 2 0
'
c
= × ≤
c
c
b
<
p
2, we need toevaluate modulo
d
j at mostµ
= ⎡⎢nη τ
/ ⎤⎥ times, and the infinity norm of polynomialrelated to ciphertext c' increases at most
2
2τ for each time. So, the polynomialcorresponding to
( )
r x
1 2
(
c
=
Opt c
×
c
)
is satisfied to r x( ) ∞ ≤ ×n 22κ +22τ×nη τ
/ . When,
2
,
κ τ η τ
=
≤
( ) ( 1)22 23r x ∞ ≤n
τ
+ τ < τ.Theorem 4.2. Recrypt-2 algorithm correctly generates a ‘fresh’ ciphertext with the
same message of , and supports a product of two ‘fresh’ ciphertexts when new
c
c
1
6
2log
t
η
τ
τ
η
− +
≤
+
,where t= +w 1 and
τ
≥
log
n
+
log
t
.2 2 1 2 2 2
( ( )) ( t t(2 ) t ) ( (2 ) ) / 2t 2
r x ∞ ≤
ρ
t τ − ≤ρ
t τ τ ≤ η−1. So, we have1
6
2log
t
η
τ
τ
η
− +
≤
+
.4.2.3 Security
In our scheme, we hide
( , )
p
α
by replacing it with the ciphertexts of many 0-bits. So, thesecurity of our scheme relies on the following hidden polynomial coset problem.
Definition 4.1 (Hidden Polynomial Coset Problem (HPCP))The challenger generates the
public key pk =( , ,{ } ,{ } ,n w dj µj=0 bi iθ=0 s0,1,s0,2) and chooses a random bit
β
←
U{0,1}
. If0
β
=
then the challenger calls Enc algorithm to generate(
i2 ) mo
0 i Tc
=
∑
∈b
+
e
d
b
. If1
β
=
then the challenger select a random numberc
←
U[ ]
b
0 . Given , the problemis to guess whether
( ,
c pk
)
0
β
=
orβ
=
1
.Indeed, the above HPCP is equivalent to the following Diophantine equation problem.
Definition 4.2 (Diophantine Equation Problem (DEP)) Given , we
construct a Diophantine equation system as follows:
1
( ,{ } ,{ } )c dj j bi i
µ ϕ
= =0
1 , 0 1 , 0 1 0
2 0, 1,...,
2 0, 1,...,
2 0
n k
j k j j
k
n k
i k i i
k
n k
k k
r x q p d j
r x t p b i
c x vp c
µ
ϕ
− = − = − = ⎧ − − = = ⎪ ⎪ − − = = ⎨ ⎪ − − = ⎪⎩∑
∑
∑
(1)Its equivalent formula is:
1 2 1 2 1
, ,
1
(2
0)
0(2
0)
(2
0)
0
n k n k n
j k j j i k i i k
j k
r x
q p d
i kr x
t p b
kc x
vp c
µ − ϕ − − = = = = = 2 k
−
−
+
−
−
+
− −
=
∑ ∑
∑ ∑
∑
(2) The problem is to decide whether there is a solution in integers for the equation (1) or (2),such that ,
,
,,
,
nj k i k k
r
≤
δ
r
≤
δ
c
≤
δ δ
=
b
0 .For an arbitrary polynomial equation with integer coefficients, called Hilbert's Tenth Problem, this problem is undecidable [Dav73]. Since the Diophantine equation problem we define is a
bounded version problem by using the public key
pk
. So, it is decidable and belongs NP.Theorem 4.3. Suppose there is an algorithm which breaks the semantic security of our SHE with advantage
A
ε
. Then there is an algorithm for solving HPCP and DEP with advantage at leastD
/ 2ε
. The running time of is polynomial in the running time of , andD
A
1/
ε
.substitute the modulo
p
with .b
04.2.4 Extension of Large Message Space
We now extend our scheme to support large message space as that in [SV10]. We first use
KeyGen-2 to get the public key pk =( , ,{ } ,{ } ,n w dj µj=1 bi iϕ=0 s0,1,s0,2) and the secret key
, and generate as
( , )
sk
=
p s
(
s
j,1,
s
j,2)
(
s
0,1,
s
0,2)
. Then we encrypt the ciphertexts of0-bits , and compute . Finally, we output the public
key
n
' 2 ( ) mod
j j
l = r
α
p p1 1 '
( j) mod
j j
l = l +
α
1
1 0 ,1 ,2 1
( , ,{ } ,{ } ,{ , } ,{ } )n n
j j i i j j j j j
pk= n w d µ= b ϕ= s s =− l −= and the secret key . Now
Given the public key
( , )
sk
=
p s
pk
and a message{0,1}
n, Enc choose a small random subsetm
∈
[ ]
T
⊂
θ
and a random integer e <2τ−1 , evaluate a ciphertext. According to analysis in [SV10], we decipher the
message . We observe that there is a minor error for the
decryption algorithm of Section 6 in [SV10]. When refreshing ciphertext, we first get a
ciphertext of each bit of message by applying Recrypt algorithm, then evaluate
. When performing homomorphic operations, we first
obtain each encrypted bit of , then perform appropriately homomorphic operations for each bit, and finally combine each encrypted bits into a ciphertext of bits message by
using same approach of computing .
1
0 1
(
2
n) mo
i j j
i T j
c
=
∑
∈b
+
e
+
∑
−=l m
d
b
od 2
d
b
( / 0.5 ) m
m= − ×c ⎢⎣c s p+ ⎥⎦
j
c
m1
0 0
(
n(
)) mo
new j j j
c
=
∑
−=Opt c l
i
m
n
new
c
By using similar approach, it is not difficult to verify that all schemes in this paper support large message space.
4.3 FHE Based on Approximate GCD
For the FHE based on factoring integer problem, we may replace
q
=
pq
0 with a list ofapproximate multiple integers of
p
. So, we design a variant scheme of FHE, whose security is based on the hardness of approximate GCD problem. Different from the scheme in [vDGHV10], our scheme has larger message space. Indeed, this scheme is a special case in2
j j
d
=
pq
+
e
j0,2
, when computing 2 ( ) mod 2.
j j
d = r
α
pKeyGen-3 Algorithm:
Given the public key pk =( ,n q= pq w b0, ,{ } ,i iθ=0 s0,1,s ) and the secret key
in Section 3.1, we replace with
0
( , )
sk
=
p s
0
q
=
pq
q
'
=
pq
0+
2
e
0 withe
0∈
Z
and e0 <2τ−1,and
b
i=
Enc
(0) 2 ( ) mod( )
=
r
iα
q
. To get ciphertext of fixed length, we need to apply the optimization technique in [vDGHV10] when multiplying two ciphertexts. So, we add a list ofintegers
d
i=
pq
i+
2
e
i with1 2
i
e < τ− for i∈[ ],
µ µ
= ⎡⎢log /pτ
⎤⎥ such that. We output the public key
( 1)
/ ' 2
i id
q
≈
τ + pk=( , ', ,{ } ,{ } ,n q w di iµ=0 bi iθ=0 s0,1,s0,2) and thesecret key
sk
=
( , )
p s
0 .Encryption Algorithm (Enc). Given the public key
pk
and a message bit ,choose a small random subset
{0,1}
m
∈
[ ]
T
⊂
θ
and a random integer e <2τ−1, output a ciphertext.
(
i2
) mo
i T
c
=
∑
∈b
+
e m
+
d '
q
i
The Dec, Mul, Add, Recrypt algorithms are identical to that in Section 4.2 except with here
replacing
b
0 withq
'
. The Opt algorithm in Mul now usesd
i=
pq
i+
2
e
.Semantic Security:
Definition 4.4.(Approximate-GCD over the Integers (AGCD)) Given a list of approximate
multiples of
p
: {di pqi e a ei: ,i i Z s t e, . . i 2 1}i 0τ− µ
=
= + ∈ < , find
p
.Theorem 4.4. ([vDGHV10], Theorem 4.2) Suppose there is an algorithm
A
which breaks the semantic security of our SHE with advantageε
. Then there is an algorithm for solving AGCD with advantage at leastD
/ 2ε
. The running time of is polynomial in the running time of , andD
A
1/ε
.5.
Implementation
To describe simplicity, we discuss a concrete implementation of the FHE in Section 4.2. Take
,
4
n=
τ
=50, w=14,η
=
2200
, ⎢⎡logp⎤⎥=8800,λ
=8192,ϕ
=
1024
,µ
=
200
. We now analyze how to implement our FHE and its security.For 0,1 1 2 i i i
s =
∑
λ= z − and encrypteds
0,1, assume we can continuously separate it to 1023groups, each group has 8 binary bits, but at most single 1-bit in them, and only groups with single 1-bit among these groups.
14
To refresh ciphertext , we evaluate c
g
1c
i 1z
i2
i j/8 10(
8i 1c
2
(8j )z
8jλ − λ − −
+ = = =
= ×
=
×
i)
i
+
∑
∑
∑
and to get 1024 encrypted rational numbers with non-zero
numbers. Hence, we can apply symmetric polynomial technique to sum these encrypted rational numbers. According to analysis of [GH10], it is not hard to verify that the decryption
polynomial is about degree-15 monomials. What is more, we need to
support a product of two refreshing ciphertexts, our scheme requires to evaluate polynomials with degree-30 monomials.
2
g
= ×
c s
0,2 w+ =1 1534 15 184
2
×
1024
=
2
368
2
Since
2 ( )
r x
i corresponding to encryptedz
i is satisfied to50 2 ( )r xi 2 2
τ
∞ ≤ = , so
corresponding to the ciphertext of each bit of
( )
r x
1,j
g
is satisfied to r x( )∞ ≤250×10 2< 54. Itis easy to verify that the infinity norm of a degree-32 monomial is at most
2
1821. So,log ( )u x ∞ >1821 368 2189+ = . Thus,
η
=log ( )u x ∞ =2200 is feasible for ourscheme. When taking above parameters, the expansion rate of ciphertext in our scheme is about 8800 / 4 2200= .
6.
Conclusion
By using self-loop bootstrappable technique, we modify the fully homomorphic encryption scheme in [SV10], whose security only depends on the hardness of the polynomial coset problem, removing the assumption of the sparse subset sum problem. Then to obtain better performance, we construct three variant schemes based on hardness assumption of different problems. In addition, we assume our scheme is KDM-secure, since the public key in our scheme implies the ciphertexts
s
of the secret key to implement FHE. sReferences
[Ajt96] M. Ajtai. Generating hard instances of lattice problems (extended abstract). In Proc. of STOC 1996, pages 99-108, 1996.
[ACG08] C. Aguilar Melchor, G. Castagnos, and G. Gaborit. Lattice-based homomorphic encryption of vector spaces. In IEEE International Symposium on Information Theory, ISIT'2008, pages 1858-1862, 2008.
[BGN05] Dan Boneh, Eu-Jin Goh, and Kobbi Nissim. Evaluating 2-DNF formulas on ciphertexts. Lecture Notes in Computer Science, 2005, Volume 3378, pages 325-341, 2005. [Dav73] M. Davis. Hilbert’s tenth problem is unsolvable. American Mathematical Monthly, 80:233–269, 1973.
[Gen09] C. Gentry. Fully homomorphic encryption using ideal lattices. In Proc. of STOC, pages 169-178, 2009.
[GH10] C. Gentry and S. Halevi. Implementing Gentry's Fully-Homomorphic Encryption Scheme. Cryptology ePrint Archive: Report 2010/520: http://eprint.iacr.org/2010/520.
[GHV10] C. Gentry and S. Halevi and V. Vaikuntanathan. A Simple BGN-type Cryptosystem from LWE. In Proc. of Eurocrypt, volume 6110, pages 506-522, 2010.
[GPV08] C. Gentry, C. Peikert, and V. Vaikuntanathan. Trapdoors for hard lattices and new cryptographic constructions. In Proc. of STOC, pages 197-206, 2008.
[LPR10] V. Lyubashevsky and C. Peikert and O. Regev. On Ideal Lattices and Learning with Errors over Rings. In Proc. of Eurocrypt, volume 6110, pages 1–23, 2010.
[Mic07] D. Micciancio Generalized compact knapsaks, cyclic lattices, and efficient one-way functions. Computational Complexity, 16(4):365-411.
[MR07] D. Micciancio and O. Regev. Worst-case to average-case reductions based on Gaussion measures. SIAM Journal Computing, 37(1):267-302, 2007.
[Reg09] O. Regev, On lattices, learning with errors, random linear codes, and cryptography, Journal of the ACM (JACM), v.56 n.6, pages1-40, 2009.
[Sho97] Shor P. W., Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing 26(5), 1484–1509 (1997); Extended abstract in FOCS 1994 (1994).
[SS10] D. Stehle and R. Steinfeld. Faster Fully Homomorphic Encryption. Cryptology ePrint Archive: Report 2010/299: http://eprint.iacr.org/2010/299.
[SV10] N. P. Smart and F. Vercauteren Fully Homomorphic Encryption with Relatively Small Key and Ciphertext Sizes. Lecture Notes in Computer Science, 2010, Volume 6056/2010, 420-443.
[SYY99] T. Sander, A. Young, and M. Yung. Non-interactive CryptoComputing for NC1. In 40th Annual Symposium on Foundations of Computer Science, pages 554{567. IEEE, 1999. [RAD78] R. Rivest, L. Adleman, and M. Dertouzos. On data banks and privacy homomorphisms. In Foundations of Secure Computation, pages 169-180, 1978.