Algorithms in HElib

  • Shai Halevi
  • Victor Shoup
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8616)


HElib is a software library that implements homomorphic encryption (HE), specifically the Brakerski-Gentry-Vaikuntanathan (BGV) scheme, focusing on effective use of the Smart-Vercauteren ciphertext packing techniques and the Gentry-Halevi-Smart optimizations. The underlying cryptosystem serves as the equivalent of a “hardware platform” for HElib, in that it defines a set of operations that can be applied homomorphically, and specifies their cost. This “platform” is a SIMD environment (somewhat similar to Intel SSE and the like), but with unique cost metrics and parameters. In this report we describe some of the algorithms and optimization techniques that are used in HElib for data movement, linear algebra, and other operations over this “platform.”


Homomorphic Encryption Shift Amount Hypercube Network Benes Network Shift Network 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Bernstein, D.J.: ChaCha, a variant of Salsa20. In: Workshop Record of SASC 2008: The State of the Art of Stream Ciphers (2008),
  2. 2.
    Bordewijk, J.L.: Inter-reciprocity applied to electrical networks. Applied Scientific Research B: Electrophysics, Acoustics, Optics, Mathematical Methods 6, 1–74 (1956)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bostan, A., Lecerf, G., Schost, E.: Tellegen’s principle into practice. In: Proceedings of the 2003 International Symposium on Symbolic and Algebraic Computation, ISSAC 2003, pp. 37–44. ACM (2003)Google Scholar
  4. 4.
    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)CrossRefGoogle Scholar
  5. 5.
    Brakerski, Z., Gentry, C., Halevi, S.: Packed ciphertexts in LWE-based homomorphic encryption. In: Kurosawa, K., Hanaoka, G. (eds.) PKC 2013. LNCS, vol. 7778, pp. 1–13. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  6. 6.
    Brakerski, Z., Gentry, C., Vaikuntanathan, V.: Fully homomorphic encryption without bootstrapping. In: Innovations in Theoretical Computer Science, ITCS 2012 (2012),
  7. 7.
    Chang, C., Melhem, R.: Arbitrary size benes networks. Parallel Processing Letters 07(03), 279–284 (1997)CrossRefGoogle Scholar
  8. 8.
    Gentry, C.: Fully homomorphic encryption using ideal lattices. In: Proceedings of the 41st ACM Symposium on Theory of Computing – STOC 2009, pp. 169–178. ACM (2009)Google Scholar
  9. 9.
    Gentry, C., Halevi, S., Peikert, C., Smart, N.P.: Field switching in BGV-style homomorphic encryption. Journal of Computer Security 21(5), 663–684 (2013)zbMATHGoogle Scholar
  10. 10.
    Gentry, C., Halevi, S., Smart, N.: Fully homomorphic encryption with polylog overhead. In: Pointcheval, D., Johansson, T. (eds.) EUROCRYPT 2012. LNCS, vol. 7237, pp. 465–482. Springer, Heidelberg (2012), Full version at Scholar
  11. 11.
    Halevi, S., Shoup, V.: Algorithms in HElib. Cryptology ePrint Archive, Report 2014/106 (2014),
  12. 12.
    Halevi, S., Shoup, V.: HElib - An Implementation of homomorphic encryption (accessed February 2014),
  13. 13.
    Hoffstein, J., Pipher, J., Silverman, J.H.: NTRU: A ring-based public key cryptosystem. In: Buhler, J.P. (ed.) ANTS 1998. LNCS, vol. 1423, pp. 267–288. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  14. 14.
    Leighton, F.T.: Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes. Morgan Kaufmann Publishers Inc., San Francisco (1992)zbMATHGoogle Scholar
  15. 15.
    Lev, G., Pippenger, N., Valiant, L.: A fast parallel algorithm for routing in permutation networks. IEEE Transactions on Computers C-30, 93–100 (1981)Google Scholar
  16. 16.
    López-Alt, A., Tromer, E., Vaikuntanathan, V.: On-the-fly multiparty computation on the cloud via multikey fully homomorphic encryption. In: STOC, pp. 1219–1234 (2012)Google Scholar
  17. 17.
    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)CrossRefGoogle Scholar
  18. 18.
    Rivest, R., Adleman, L., Dertouzos, M.: On data banks and privacy homomorphisms. In: Foundations of Secure Computation, pp. 169–177. Academic Press (1978)Google Scholar
  19. 19.
    Smart, N.P., Vercauteren, F.: Fully homomorphic SIMD operations. Designs, Codes and Cryptography 71(1), 57–81 (2014)CrossRefzbMATHGoogle Scholar
  20. 20.
    SIMD. Wikipedia article (accessed February 2014),

Copyright information

© International Association for Cryptologic Research 2014

Authors and Affiliations

  • Shai Halevi
    • 1
  • Victor Shoup
    • 1
    • 2
  1. 1.IBM Research, Yorktown HeightsUSA
  2. 2.New York UniversityNew YorkUSA

Personalised recommendations