Abstract
At EUROCRYPT 2011, Gentry and Halevi implemented a variant of Gentry’s fully homomorphic encryption scheme. The core part in their key generation is to generate an odd-determinant ideal lattice having a particular type of Hermite Normal Form. However, they did not give a rigorous proof for the correctness. We present a better key generation algorithm, improving their algorithm from two aspects.
-
We show how to deterministically generate ideal lattices with odd determinant, thus increasing the success probability close to 1.
-
We give a rigorous proof for the correctness. To be more specific, we present a simpler condition for checking whether the ideal lattice has the desired Hermite Normal Form. Furthermore, our condition can be checked more efficiently.
As a result, our key generation is about 1.5 times faster. We also give experimental results supporting our claims. Our optimizations are based on the properties of ideal lattices, which might be of independent interests.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The primitive part of an integer polynomial s(x) is s(x) / r, where r is the g.c.d of the coefficients of s(x).
References
Ajtai, M., Dwork, C.: A public-key cryptosystem with worst-case/average-case equivalence. In: Symposium on Theory of Computing, pp. 284–293 (1997). https://doi.org/10.1145/258533.258604
Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic encryption without bootstrapping. In: ITCS, pp. 309–325 (2012). https://doi.org/10.1145/2090236.2090262
Clear, M., McGoldrick, C.: Multi-identity and multi-key leveled FHE from learning with errors. In: Gennaro, R., Robshaw, M. (eds.) CRYPTO 2015. LNCS, vol. 9216, pp. 630–656. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48000-7_31
Ding, J., Lindner, R.: Identifying ideal lattice. IACR Cryptology ePrint Archive, 322 (2007)
Ducas, L., Micciancio, D.: FHEW: bootstrapping homomorphic encryption in less than a second. In: Oswald, E., Fischlin, M. (eds.) EUROCRYPT 2015. LNCS, vol. 9056, pp. 617–640. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46800-5_24
Gentry, C.: Fully homomorphic encryption using ideal lattices. In: Symposium on Theory of Computing, pp. 169–178 (2009). https://doi.org/10.1145/1536414.1536440
Gentry, C., Halevi, S.: Implementing Gentry’s fully-homomorphic encryption scheme. In: Paterson, K.G. (ed.) EUROCRYPT 2011. LNCS, vol. 6632, pp. 129–148. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-20465-4_9. http://researcher.watson.ibm.com/researcher/files/us-shaih/fhe-code.zip
Gentry, C., Halevi, S., Smart, N.P.: Homomorphic evaluation of the AES circuit. In: Safavi-Naini, R., Canetti, R. (eds.) CRYPTO 2012. LNCS, vol. 7417, pp. 850–867. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32009-5_49. Updated implementation version: https://eprint.iacr.org/2012/099.pdf
Gentry, C., Sahai, A., Waters, B.: Homomorphic encryption from learning with errors: conceptually-simpler, asymptotically-faster, attribute-based. In: Canetti, R., Garay, J.A. (eds.) CRYPTO 2013. LNCS, vol. 8042, pp. 75–92. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40041-4_5
Hu, G., Pan, Y., Liu, R., Chen, Y.: On random nonsingular Hermite Normal Form. J. Number Theory 164, 66–86 (2016). https://doi.org/10.1016/j.jnt.2015.12.004
Li, Z., Zhu, X., Lian, Y., et al.: Constructing secure content-dependent watermarking scheme using homomorphic encryption. In: IEEE International Conference on Multimedia and Expo, pp. 627–630 (2007). https://doi.org/10.1109/icme.2007.4284728
Maze, G.: Natural density distribution of Hermite Normal Forms of integer matrices. J. Number Theory 131(12), 2398–2408 (2011). https://doi.org/10.1016/j.jnt.2011.06.010
Rivest, R., Adleman, L., Dertouzos, M.: On data banks and privacy homomorphisms. Found. Secur. Comput. 4(11), 169–180 (1978)
Rivest, R., Shamir, A., Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 21(2), 120–126 (1978). https://doi.org/10.21236/ada606588
Rohloff, K., Cousins, D.B.: A scalable implementation of fully homomorphic encryption built on NTRU. In: Böhme, R., Brenner, M., Moore, T., Smith, M. (eds.) FC 2014. LNCS, vol. 8438, pp. 221–234. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44774-1_18
Scholl, P., Smart, N.P.: Improved key generation for Gentry’s fully homomorphic encryption scheme. In: Chen, L. (ed.) IMACC 2011. LNCS, vol. 7089, pp. 10–22. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25516-8_2
Shoup, V.: NTL: a library for doing number theory. http://www.shoup.net/ntl/
Smart, N.P., Vercauteren, F.: Fully homomorphic encryption with relatively small key and ciphertext sizes. In: Nguyen, P.Q., Pointcheval, D. (eds.) PKC 2010. LNCS, vol. 6056, pp. 420–443. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13013-7_25
Yi, X., Kaosar, M.G., Paulet, R., Bertino, E.: Single-database private information retrieval from fully homomorphic encryption. IEEE Trans. Knowl. Data Eng. 25(5), 1125–1134 (2013). https://doi.org/10.1109/tkde.2012.90
Acknowledgements
The authors would like to thank all anonymous referees of ISC’2017 and ICISC’2017 for their valuable comments that greatly improve the manuscript. This work is supported by the National Natural Science Foundation of China (No. Y31005A102, No. Y610092302).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix
A Appendix
1.1 A.1 Proof of Lemma 1
Proof
Note that
Since \(f_n=1\), the Sylvester matrix can always be transformed unimodularly into the following (block-triangular) form by adding proper multiples of rows in the lower half to each row on the top half,
It follows that \(Res(g,f) = f_n^m\det (\varvec{B})=\det (\varvec{B})\).
Since g(x) is relatively prime to f(x), \(\mathcal {L}\) is a full-rank lattice with basis \(\varvec{B}\). Therefore, \(\det (\mathcal {L})= |\det (\varvec{B})| = |Res(g,f)| = |Res(f,g)|.\) \(\square \)
1.2 A.2 Proof of Lemma 2
Proof
We prove the lemma by induction on i.
For \(i=1\), it is trivial.
For \(i=2\), consider the first row, which corresponds to the constant polynomial \(h_{1,1}\). Since \(\mathcal {L}\) is an ideal lattice, the vector \((0,h_{1,1},0\cdots ,0)\), which corresponds to the polynomial \(h_{1,1}x\), is also in \(\mathcal {L}\).
It’s obvious that \((0,h_{1,1},0\cdots ,0)=x_{1}\varvec{H}_{1}+x_{2}\varvec{H}_{2}\) for some \(x_{1},x_{2} \in \mathbb {Z}.\) Then \(h_{1,1}=x_{2}h_{2,2}\), \(x_{1}h_{1,1}+x_{2}h_{2,1}=0\). Hence \(h_{2,2}|h_{1,1},h_{2,2}|h_{2,1}\), which completes the proof for \(i=2\).
Assume the result holds for \(i\le k \le n-1\), \(h_{i,i}|h_{j,l}, \) where \(1\le l \le j\le i\le k.\) We show that for \(i=k+1\), \(h_{k+1,k+1}|h_{j,l}\).
Consider the k-th row. The corresponding polynomial of k-th row is
After multiplying x, we get a vector \( (0,h_{k,1},\cdots ,h_{k,k},0,\cdots ,0),\) which is a linear combination of \(\varvec{H}_{1},\cdots ,\varvec{H}_{k+1}\) with integer coefficients, i.e.
where \(y_{i} \in \mathbb {Z}\), for \(i=1,\cdots ,k+1.\)
So
From the first equation, we get \(y_{k+1}=\frac{h_{k,k}}{h_{k+1,k+1}}\) and
From the induction hypothesis, we have \(h_{k,k}|h_{j,l}\) for \(1\le l\le j\le k \le n.\) So the coefficient of \(h_{k+1,k+1}\) in each equation is in fact an integer, therefore \(h_{k+1,k+1}|h_{k+1,l}\), \(1\le l\le k+1.\) Since \(h_{k+1,k+1}|h_{k,k}\), we know \(h_{k+1,k+1}|h_{j,l}\), where \(1\le l \le j \le k+1 \le n.\) Thus, the result holds for \(i=k+1\).
By the principle of induction, the lemma follows. \(\square \)
1.3 A.3 Proof of Lemma 3
Proof
We prove the first equality by induction on i.
For \(i=2\), by the definition of \(\beta ,\) \(H_{2}(\beta )=0\mod h_{1,1}.\)
Assume \(H_{i}(\beta )=0\mod \frac{h_{1,1}h_{i,i}}{h_{2,2}},\) for \(i\le k,\) where \(2\le k \le n-1.\) From Eq. 2, we have
Sum the equations up,
Set \(x=\beta \),
Note that \(H_{1}(x)=h_{1,1},\ H_{1}(\beta )=0\mod \frac{h_{1,1}h_{k,k}}{h_{2,2}}. \) By induction hypothesis, \(H_{i}(\beta )=0\mod \frac{h_{1,1}h_{i,i}}{h_{2,2}}\) and \(\frac{h_{1,1}h_{i+1,i+1}}{h_{2,2}}|\frac{h_{1,1}h_{i,i}}{h_{2,2}}\), \(y_{k+1}H_{k+1}(\beta )=0\mod \frac{h_{1,1}h_{k,k}}{h_{2,2}}.\) Since \(y_{k+1}=\frac{h_{k,k}}{h_{k+1,k+1}},\) we have
Therefore for \(i=k+1\), the equality also holds. Thus \(H_{i}(\beta ) = 0 \mod \frac{h_{1,1}h_{i,i}}{h_{2,2}}\), \(\forall i \ge 2\).
For the second equality, note that \(xH_{n}(x)\mod f(x)=xH_{n}(x)- h_{n,n}f(x)\). Since the vector corresponding to \(xH_{n}(x)-h_{n,n} f(x)\) is a lattice vector, there exist integers \(z_1\cdots z_n \in \mathbb {Z}\), \(xH_{n}(x)-h_{n,n} f(x)=\sum _{i=1}^{n}z_{i}H_{i}(x)\).
Set \(x=\beta \),
Since \(h_{n,n}|h_{i,i}\) for all i, \(H_{i}(\beta )\) =0 \(\mod \frac{h_{1,1}h_{n,n}}{h_{2,2}}\), \(\forall i \ge 2\). Also \(H_{1}(\beta )\) =0 \(\mod \frac{h_{1,1}h_{n,n}}{h_{2,2}}\). Then \(h_{n,n} f(\beta )=0\mod \frac{h_{1,1}h_{n,n}}{h_{2,2}}\) and
\(\square \)
1.4 A.4 Proof of Proposition 2
Proof
Since we only concern the parity of the determinant, we work over \(\mathbb {F}_{2}\). Denote
Then
Now we compute the eigenvalues of \(\varvec{P}\).
Since \(\varvec{P}\) is a cyclic shift matrix, \(\varvec{P}^n=\varvec{I}\). Note that \(x^n+1=(x+1)^n\) over \(\mathbb {F}_{2}\) (n is a power of 2), then all the eigenvalues of \(\varvec{P}\) are 1. All the eigenvalues of \(\varvec{V}\) are thus \(v(1)=v_{0}+v_{1}+\cdots +v_{n-1}\). Hence,
\(\square \)
1.5 A.5 Proof of Proposition 3
Proof
-
(1)\(\Leftrightarrow \)(2) The equivalence between the two conditions was proved in [7].
-
(2)\(\Rightarrow \)(3) Assuming first that \(\varvec{r}=(-r,1,0,\cdots ,0) \in \mathcal {L}\). Then there exists \(y(x) \in \mathbb {Z}[x]/\left\langle f(x)\right\rangle \), such that \(y(x)v(x)=r(x)\mod f(x)\). Therefore,
$$y(x)v(x)w(x)=r(x)w(x)\mod f(x).$$$$dy(x)=r(x)w(x)\mod f(x).$$Note that \(f(x)=x^n+1\), we have
$$(-w_{n-1},\cdots ,w_{n-3},w_{n-2})-r(w_{0},\cdots ,w_{n-2},w_{n-1})=0\ \mod \ d.$$So \(w_{0}r=-w_{n-1} \mod d\) and \(w_{i+1}r=w_{i} \mod d\), for \(0\le i \le n-2\).
We prove by contradiction that \(\exists \ 0\le i \le n-1\), \(\gcd (w_{i},d)=1\).
If for arbitrary \(0\le i \le n-1\), \(\gcd (w_{i},d)\ne 1\), let \(\mu =\gcd (w_{0}, d) > 1\). From the relations among the \(w_i\)’s, we know \(\mu \) divides all the \(w_i\)’s. Therefore, \(\mu | \gcd (w_0, \cdots , w_{n-1}, d)\). Hence \(\frac{d}{\mu }=\frac{w(x)}{\mu } v(x) \mod f(x)\) is a lattice vector, which means the first diagonal of the HNF is a proper factor of d. So the second diagonal can’t be 1, otherwise the determinant is \(\frac{d}{\mu }\) rather than d. This is a contradiction. Therefore \(\exists \ 0\le i \le n-1\), \(\gcd (w_{i},d)=1\).
-
(3)\(\Rightarrow \)(4) Assume \(\exists \ 0\le i \le n-1\), \(\gcd (w_{i},d)=1\), fix i. We also prove by contradiction. Suppose there exists a \(0\le j \le n-1\) such that \(\mu =\gcd (w_{j}, d)> 1\).
Due to Lemma 2, we can assume the second row of HNF is \((-\alpha r,\alpha ,0,\cdots ,0)\), for some \(\alpha \in \mathbb {N^{+}}\). Then \(\alpha ^2|\alpha h_{1,1}|d\) and \(\gcd (\alpha , w_i)=1\). Similar to previous proof,
$$\alpha (-w_{n-1},\cdots ,w_{n-3},w_{n-2})-\alpha r(w_{0},\cdots ,w_{n-2},w_{n-1})=0\ \mod \ d.$$Hence
$$(-w_{n-1},\cdots ,w_{n-3},w_{n-2})-r(w_{0},\cdots ,w_{n-2},w_{n-1})=0\ \mod \ \frac{d}{\alpha }.$$According to the steps above, \(w_{i+1}r=w_{i} \mod \frac{d}{\alpha }\), for \(i \le n-2\) and \(w_{0}r=-w_{n-1} \mod \frac{d}{\alpha }\). Since \(\alpha ^2|d\), \(\frac{d}{\alpha }\) and d share exactly the same prime factors, hence \(\gcd (w_{j},\frac{d}{\alpha })=\mu '>1\) . Similar to the previous proof, we have \(\mu '\) divides all the coefficients of w(x). Specifically, \(\mu '|w_{i}\). Hence \(\mu '|\gcd (w_{i},d)\), a contradiction. Thus \(\gcd (w_{i},d)=1\) for any \(0\le i \le n-1\).
-
(4)\(\Rightarrow \)(2) Assume for any \(0\le i \le n-1,\ \gcd (w_{i},d)=1\). Since \(d=w(x)v(x)\mod f(x)\), \(\gcd (w_0,\cdots ,w_{n-1})|d\). Hence \(\gcd (w_0,\cdots ,w_{n-1})=1\). Then \((d,0,\cdots ,0)\) is a primitive lattice vector in \(\mathcal {L}\). According to Remark 2, it’s the first row of the HNF of \(\mathcal {L}\), which means all the other diagonals in the HNF are 1. Thus, \(\mathcal {L}\) contains a vector (the second row of its HNF) of the form \(\varvec{r}=(-r,1,0,\cdots ,0)\).
\(\square \)
1.6 A.6 Proof of Proposition 4
Proof
From the assumptions and the proof for Proposition 3, we know that \((-r,1,0,\cdots ,0)\) is in \(\mathcal {L}\). According to Lemma 3, r is a root of \(f(x)=0\mod d\). Therefore \(r^n = -1\mod d\). \(\square \)
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Zhang, Y., Liu, R., Lin, D. (2018). Improved Key Generation Algorithm for Gentry’s Fully Homomorphic Encryption Scheme. In: Kim, H., Kim, DC. (eds) Information Security and Cryptology – ICISC 2017. ICISC 2017. Lecture Notes in Computer Science(), vol 10779. Springer, Cham. https://doi.org/10.1007/978-3-319-78556-1_6
Download citation
DOI: https://doi.org/10.1007/978-3-319-78556-1_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-78555-4
Online ISBN: 978-3-319-78556-1
eBook Packages: Computer ScienceComputer Science (R0)