Depth Optimized Efficient Homomorphic Sorting

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9230)


We introduce a sorting scheme which is capable of efficiently sorting encrypted data without the secret key. The technique is obtained by focusing on the multiplicative depth of the sorting circuit alongside the more traditional metrics such as number of comparisons and number of iterations. The reduced depth allows much reduced noise growth and thereby makes it possible to select smaller parameter sizes in somewhat homomorphic encryption instantiations resulting in greater efficiency savings. We first consider a number of well known comparison based sorting algorithms as well as some sorting networks, and analyze their circuit implementations with respect to multiplicative depth. In what follows, we introduce a new ranking based sorting scheme and rigorously analyze the multiplicative depth complexity as \(\mathcal {O}(\log (N)+\log (\ell ))\), where N is the size of the array to be sorted and \(\ell \) is the bit size of the array elements. Finally, we simulate our sorting scheme using a leveled/batched instantiation of a SWHE library. Our sorting scheme performs favorably over the analyzed classical sorting algorithms.


Homomorphic sorting Circuit depth Somewhat homomorphic encryption 



Funding for this research was in part provided by the US National Science Foundation CNS Awards #1319130.


  1. 1.
    Batcher, K.E.: Sorting networks and their applications. In: Proceedings of the April 30–May 2, 1968, Spring Joint Computer Conference, AFIPS 1968 (Spring), pp. 307–314. ACM, New York (1968).
  2. 2.
    Bos, J.W., Lauter, K., Naehrig, M.: Private predictive analysis on encrypted medical data. Technical report MSR-TR-2013-81, September 2013.
  3. 3.
    Bos, J.W., Lauter, K., Loftus, J., Naehrig, M.: Improved security for a ring-based fully homomorphic encryption scheme. In: Stam, M. (ed.) IMACC 2013. LNCS, vol. 8308, pp. 45–64. Springer, Heidelberg (2013). CrossRefGoogle Scholar
  4. 4.
    Brakerski, Z.: Fully homomorphic encryption without modulus switching from classical gapSVP. IACR Cryptology ePrint Archive 2012, 78 (2012)Google Scholar
  5. 5.
    Brakerski, Z., Gentry, C., Vaikuntanathan, V.: Fully homomorphic encryption without bootstrapping. Electronic Colloquium on Computational Complexity (ECCC) 18, 111 (2011)Google Scholar
  6. 6.
    Brakerski, Z., Vaikuntanathan, V.: Efficient fully homomorphic encryption from (standard) LWE. In: FOCS, pp. 97–106 (2011)Google Scholar
  7. 7.
    Brenner, M., Perl, H., Smith, M.: libscarab software library.
  8. 8.
    Chatterjee, A., Kaushal, M., Sengupta, I.: Accelerating sorting of fully homomorphic encrypted data. In: Paul, G., Vaudenay, S. (eds.) INDOCRYPT 2013. LNCS, vol. 8250, pp. 262–273. Springer, Heidelberg (2013). CrossRefGoogle Scholar
  9. 9.
    Cheon, J.H., Kim, M., Lauter K.: Secure dna-sequence analysis on encrypted DNA nucleotides.
  10. 10.
    van 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) CrossRefGoogle Scholar
  11. 11.
    Doröz, Y., Hu, Y., Sunar, B.: Homomorphic AES evaluation using NTRU (2014)., iACR ePrint Archive
  12. 12.
    Doröz, Y., Sunar, B., Hammouri, G.: Bandwidth efficient PIR from NTRU. In: Böhme, R., Brenner, M., Moore, T., Smith, M. (eds.) FC 2014 Workshops. LNCS, vol. 8438, pp. 195–207. Springer, Heidelberg (2014). Google Scholar
  13. 13.
    Fischlin, M.: A cost-effective pay-per-multiplication comparison method for millionaires (2001)Google Scholar
  14. 14.
    Gentry, C.: A Fully Homomorphic Encryption Scheme. Ph.D. thesis, Stanford University (2009)Google Scholar
  15. 15.
    Gentry, C.: Fully homomorphic encryption using ideal lattices. In: STOC, pp. 169–178 (2009)Google Scholar
  16. 16.
    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) CrossRefGoogle Scholar
  17. 17.
    Gentry, C., Halevi, S., Smart, N.P.: Fully homomorphic encryption with polylog overhead. IACR Cryptology ePrint Archive Report 2011/566 (2011).
  18. 18.
    Gentry, C., Halevi, S., Smart, N.P.: Homomorphic evaluation of the AES circuit. IACR Cryptology ePrint Archive 2012 (2012)Google Scholar
  19. 19.
    Goldwasser, S., Micali, S.: Probabilistic encryption & how to play mental poker keeping secret all partial information. In: Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing, STOC 1982, pp. 365–377. ACM, New York (1982).
  20. 20.
    Graepel, T., Lauter, K., Naehrig, M.: ML confidential: machine learning on encrypted data. In: Kwon, T., Lee, M.-K., Kwon, D. (eds.) ICISC 2012. LNCS, vol. 7839, pp. 1–21. Springer, Heidelberg (2013). CrossRefGoogle Scholar
  21. 21.
    Knuth, D.E.: The Art of Computer Programming, Fundamental Algorithms, vol. 1, 3rd edn. Addison Wesley Longman Publishing Co., Inc., Redwood City (1998)Google Scholar
  22. 22.
    Lagendijk, R., Erkin, Z., Barni, M.: Encrypted signal processing for privacy protection: conveying the utility of homomorphic encryption and multiparty computation. IEEE Sig. Process. Mag. 30(1), 82–105 (2013)CrossRefGoogle Scholar
  23. 23.
    Lauter, K., Naehrig, M., Vaikuntanathan, V.: Can homomorphic encryption be practical. In: Cloud Computing Security Workshop, pp. 113–124 (2011)Google Scholar
  24. 24.
    Lauter, K., Lopez-Alt, A., Naehrig, M.: Private computation on encrypted genomic data. Technical report MSR-TR-2014-93, June 2014.
  25. 25.
    López-Alt, A., Tromer, E., Vaikuntanathan, V.: On-the-fly multiparty computation on the cloud via multikey fully homomorphic encryption. In: STOC (2012)Google Scholar
  26. 26.
    López-Alt, A., Naehrig, M.: Large integer plaintexts in ring-based fully homomorphic encryption (2014, in preparation)Google Scholar
  27. 27.
    Rivest, R.L., Adleman, L., Dertouzos, M.L.: On data banks and privacy homomorphisms. In: Foundations of Secure Computation, pp. 169–180 (1978)Google Scholar
  28. 28.
    Sander, T., Young, A., Yung, M.: Non-interactive cryptocomputing for nc1. In: 40th Annual Symposium on Foundations of Computer Science, pp. 554–566 (1999)Google Scholar
  29. 29.
    Smart, N.P., Vercauteren, F.: Fully homomorphic SIMD operations. IACR Cryptology ePrint Archive 2011, 133 (2011)Google Scholar
  30. 30.
    Stehlé, D., Steinfeld, R.: Making NTRU as secure as worst-case problems over ideal lattices. In: Paterson, K.G. (ed.) EUROCRYPT 2011. LNCS, vol. 6632, pp. 27–47. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  31. 31.
    Vaidya, J., Clifton, C.: Privacy-preserving k-means clustering over vertically partitioned data. In: Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD 2003, pp. 206–215. ACM, New York (2003).
  32. 32.
    Yao, A.C.: Protocols for secure computations. In: Proceedings of the 23rd Annual Symposium on Foundations of Computer Science, SFCS 1982, pp. 160–164. IEEE Computer Society, Washington, DC (1982).
  33. 33.
    Yildizli, C.B., Pedersen, T., Saygin, Y., Savas, E., Levi, A.: Distributed privacy preserving clustering via homomorphic secret sharing and its application to vertically partitioned spatio-temporal data. Int. J. Data Warehous. Min. 7(1), 46–66 (2011). CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Worcester Polytechnic InstituteWorcesterUSA
  2. 2.Sabanci UniversityIstanbulTurkey

Personalised recommendations