Homomorphically Encrypted Arithmetic Operations Over the Integer Ring

  • Chen Xu
  • Jingwei ChenEmail author
  • Wenyuan Wu
  • Yong Feng
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10060)


Fully homomorphic encryption allows cloud servers to evaluate any computable functions for clients without revealing any information. It attracts much attention from both of the scientific community and the industry since Gentry’s seminal scheme. Currently, the Brakerski-Gentry-Vaikuntanathan scheme with its optimizations is one of the most potentially practical schemes and has been implemented in a homomorphic encryption C++ library HElib. HElib supplies friendly interfaces for arithmetic operations of polynomials over finite fields. Based on HElib, Chen and Guang (2015) implemented arithmetic over encrypted integers. In this paper, we revisit the HElib-based implementation of homomorphically arithmetic operations on encrypted integers. Due to several optimizations and more suitable arithmetic circuits for homomorphic encryption evaluation, our implementation is able to homomorphically evaluate 64-bit addition/subtraction and 16-bit multiplication for encrypted integers without bootstrapping. Experiments show that our implementation outperforms Chen and Guang’s significantly.


Fully homomorphic encryption HElib Arithmetic circuit Integer operation C++ implementation 



We would like to thank one of anonymous referees for pointing out us Cheon et al.’s work [8] on encrypted integer addition. The present work was partially supported by Natural Science Foundation of China (11471307, 11501540, 11671377), Chongqing Research Program of Basic Research and Frontier Technology (cstc2015jcyjys40001) and CAS “Light of West China” Program.


  1. 1.
    Arita, S., Nakasato, S.: Fully homomorphic encryption for point numbers. Cryptology ePrint Archive, Report 2016/402 (2016)Google Scholar
  2. 2.
    Brakerski, Z.: Fully homomorphic encryption without modulus switching from classical GapSVP. In: Safavi-Naini, R., Canetti, R. (eds.) CRYPTO 2012. LNCS, vol. 7417, pp. 868–886. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-32009-5_50 CrossRefGoogle Scholar
  3. 3.
    Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic encryption without bootstrapping. In: Goldwasser, S. (ed.) ITCS 2012, pp. 309–325. ACM, New York (2012)Google Scholar
  4. 4.
    Brakerski, Z., Vaikuntanathan, V.: Fully homomorphic encryption from ring-LWE and security for key dependent messages. In: Rogaway, P. (ed.) CRYPTO 2011. LNCS, vol. 6841, pp. 505–524. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22792-9_29 CrossRefGoogle Scholar
  5. 5.
    Chen, Y., Gong, G.: Integer arithmetic over ciphertext and homomorphic data aggregation. In: Proceedings of 2015 IEEE Conference on Communications and Network Security, pp. 628–632. IEEE, Piscataway (2015)Google Scholar
  6. 6.
    Cheon, J.H., Coron, J.-S., Kim, J., Lee, M.S., Lepoint, T., Tibouchi, M., Yun, A.: Batch fully homomorphic encryption over the integers. In: Johansson, T., Nguyen, P.Q. (eds.) EUROCRYPT 2013. LNCS, vol. 7881, pp. 315–335. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38348-9_20 CrossRefGoogle Scholar
  7. 7.
    Cheon, J.H., Kim, A., Kim, M., Song, Y.: Floating-point homomorphic encryption. Cryptology ePrint Archive, Report 2016/421 (2016)Google Scholar
  8. 8.
    Cheon, J.H., Kim, M., Kim, M.: Search-and-compute on encrypted data. In: Brenner, M., Christin, N., Johnson, B., Rohloff, K. (eds.) FC 2015. LNCS, vol. 8976, pp. 142–159. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-48051-9_11 CrossRefGoogle Scholar
  9. 9.
    Coron, J.-S., Mandal, A., Naccache, D., Tibouchi, M.: Fully homomorphic encryption over the integers with shorter public keys. In: Rogaway, P. (ed.) CRYPTO 2011. LNCS, vol. 6841, pp. 487–504. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22792-9_28 CrossRefGoogle Scholar
  10. 10.
    Dijk, M., Gentry, C., Halevi, S., Vaikuntanathan, V.: Fully homomorphic encryption over the integers. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 24–43. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-13190-5_2 CrossRefGoogle Scholar
  11. 11.
    Gentry, C.: A fully homomorphic encryption scheme. Ph.D. thesis, Stanford University, Stanford (2009)Google Scholar
  12. 12.
    Gentry, C.: Fully homomorphic encryption using ideal lattices. In: Mitzenmacher, M. (ed.) STOC 2009, pp. 169–178. ACM, New York (2009)Google Scholar
  13. 13.
    Gentry, C., Halevi, S., Peikert, C., Smart, N.P.: Field switching in BGV-style homomorphic encryption. J. Comput. Secur. 21(5), 663–684 (2013)CrossRefzbMATHGoogle Scholar
  14. 14.
    Gentry, C., Halevi, S., Smart, N.P.: Fully homomorphic encryption with polylog overhead. In: Pointcheval, D., Johansson, T. (eds.) EUROCRYPT 2012. LNCS, vol. 7237, pp. 465–482. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-29011-4_28 CrossRefGoogle Scholar
  15. 15.
    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). doi: 10.1007/978-3-642-32009-5_49 CrossRefGoogle Scholar
  16. 16.
    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. 8043, pp. 75–92. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-40041-4_5 CrossRefGoogle Scholar
  17. 17.
    Halevi, S., Shoup, V.: HElib: an implementation of homomorphic encryption. Accessed June 2016
  18. 18.
    Halevi, S., Shoup, V.: Design and implementation of a homomorphic encryption library.
  19. 19.
    Halevi, S., Shoup, V.: Bootstrapping for HElib. In: Oswald, E., Fischlin, M. (eds.) EUROCRYPT 2015. LNCS, vol. 9056, pp. 641–670. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-46800-5_25 Google Scholar
  20. 20.
    Kolesnikov, V., Sadeghi, A.-R., Schneider, T.: Improved garbled circuit building blocks and applications to auctions and computing minima. In: Garay, J.A., Miyaji, A., Otsuka, A. (eds.) CANS 2009. LNCS, vol. 5888, pp. 1–20. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-10433-6_1 CrossRefGoogle Scholar
  21. 21.
    Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors over rings. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 1–23. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-13190-5_1 CrossRefGoogle Scholar
  22. 22.
    Computational Algebra Group, University of Sydney: Magma computational algebra system.
  23. 23.
    Naehrig, M., Lauter, K., Vaikuntanathan, V.: Can homomorphic encryption be practical? In: Cachin, C., Ristenpart, T. (eds.) CCSW 2011, pp. 113–124. ACM, New York (2011)Google Scholar
  24. 24.
    Ofman, Y.P.: On the algorithmic complexity of discrete functions. Soviet Physics Doklady 7(7), 589–591 (1963). Translated from Doklady Akademii Nauk SSSR 145(1), 48–51 (1962)MathSciNetzbMATHGoogle Scholar
  25. 25.
    Regev, O.: On lattices, learning with errors, random linear codes, and cryptography. In: Gabow, H.N., Fagin, R. (eds.) STOC 2005, pp. 84–93. ACM, New York (2005)Google Scholar
  26. 26.
    Rivest, R., Adleman, L., Dertouzos, M.: On data banks and privacy homomorphisms. In: DeMillo, R.A., Dobkin, D.P., Jones, A.K., Lipton, R.J. (eds.) Foundations of Secure Computation, pp. 165–179. Academic Press, Atlanta (1978)Google Scholar
  27. 27.
    Shoup, V.: NTL: a library for doing number theory. Accessed June 2016
  28. 28.
    Smart, N.P., Vercauteren, F.: Fully homomorphic SIMD operations. Des. Codes Crypt. 71(1), 57–81 (2014)CrossRefzbMATHGoogle Scholar
  29. 29.
    Wu, D., Haven, J.: Using homomorphic encryption for large scale statistical analysis (2012).

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  1. 1.Chongqing Key Laboratory of Automated Reasoning and Cognition, Chongqing Institute of Green and Intelligent TechnologyChinese Academy of SciencesChongqingChina

Personalised recommendations