skip to main content
10.1145/3243734.3243837acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

Secure Outsourced Matrix Computation and Application to Neural Networks

Authors Info & Claims
Published:15 October 2018Publication History

ABSTRACT

Homomorphic Encryption (HE) is a powerful cryptographic primitive to address privacy and security issues in outsourcing computation on sensitive data to an untrusted computation environment. Comparing to secure Multi-Party Computation (MPC), HE has advantages in supporting non-interactive operations and saving on communication costs. However, it has not come up with an optimal solution for modern learning frameworks, partially due to a lack of efficient matrix computation mechanisms. In this work, we present a practical solution to encrypt a matrix homomorphically and perform arithmetic operations on encrypted matrices. Our solution includes a novel matrix encoding method and an efficient evaluation strategy for basic matrix operations such as addition, multiplication, and transposition. We also explain how to encrypt more than one matrix in a single ciphertext, yielding better amortized performance. Our solution is generic in the sense that it can be applied to most of the existing HE schemes. It also achieves reasonable performance for practical use; for example, our implementation takes 9.21 seconds to multiply two encrypted square matrices of order 64 and 2.56 seconds to transpose a square matrix of order 64. Our secure matrix computation mechanism has a wide applicability to our new framework EDM, which stands for encrypted data and encrypted model. To the best of our knowledge, this is the first work that supports secure evaluation of the prediction phase based on both encrypted data and encrypted model, whereas previous work only supported applying a plain model to encrypted data. As a benchmark, we report an experimental result to classify handwritten images using convolutional neural networks (CNN). Our implementation on the MNIST dataset takes 28.59 seconds to compute ten likelihoods of 64 input images simultaneously, yielding an amortized rate of 0.45 seconds per image.

Skip Supplemental Material Section

Supplemental Material

p1209-kim.mp4

mp4

356.3 MB

References

  1. Mart'in Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. 2015. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. (2015). https://www.tensorflow.org.Google ScholarGoogle Scholar
  2. Martin R Albrecht, Rachel Player, and Sam Scott. 2015. On the concrete hardness of learning with errors. Journal of Mathematical Cryptology, Vol. 9, 3 (2015), 169--203.Google ScholarGoogle ScholarCross RefCross Ref
  3. Cloud Security Alliance. 2009. Security guidance for critical areas of focus in cloud computing. (2009). http://www.cloudsecurityalliance.org.Google ScholarGoogle Scholar
  4. Mikhail J Atallah and Keith B Frikken. 2010. Securely outsourcing linear algebra computations. Proceedings of the 5th ACM Symposium on Information, Computer and Communications Security. ACM, 48--59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Mauro Barni, Claudio Orlandi, and Alessandro Piva. 2006. A privacy-preserving protocol for neural-network-based computation. In Proceedings of the 8th workshop on Multimedia and security. ACM, 146--151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Joppe W Bos, Kristin Lauter, Jake Loftus, and Michael Naehrig. 2013. Improved security for a ring-based fully homomorphic encryption scheme. Cryptography and Coding. Springer, 45--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Florian Bourse, Michele Minelli, Matthias Minihold, and Pascal Paillier. 2017. Fast Homomorphic Evaluation of Deep Discretized Neural Networks. Cryptology ePrint Archive, Report 2017/1114. (2017). https://eprint.iacr.org/2017/1114.Google ScholarGoogle Scholar
  8. Zvika Brakerski. 2012. Fully Homomorphic Encryption without Modulus Switching from Classical GapSVP. Advances in Cryptology--CRYPTO 2012. Springer, 868--886. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Zvika Brakerski, Craig Gentry, and Vinod Vaikuntanathan. 2012. (Leveled) fully homomorphic encryption without bootstrapping. In Proc. of ITCS. ACM, 309--325. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Hervé Chabanne, Amaury de Wargny, Jonathan Milgram, Constance Morel, and Emmanuel Prouff. 2017. Privacy-preserving classification on deep neural network. Cryptology ePrint Archive, Report 2017/035. (2017). https://eprint.iacr.org/2017/035.Google ScholarGoogle Scholar
  11. David Chaum and Torben Pryds Pedersen. 1992. Wallet databases with observers. In Annual International Cryptology Conference. Springer, 89--105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Jung Hee Cheon, Kyoohyung Han, Andrey Kim, Miran Kim, and Yongsoo Song. 2018. Bootstrapping for Approximate Homomorphic Encryption. In Advances in Cryptology--EUROCRYPT 2018. Springer, 360--384.Google ScholarGoogle ScholarCross RefCross Ref
  13. Jung Hee Cheon, Andrey Kim, Miran Kim, and Yongsoo Song. 2016. Implementation of textHEAAN. (2016). https://github.com/kimandrik/HEAAN.Google ScholarGoogle Scholar
  14. Jung Hee Cheon, Andrey Kim, Miran Kim, and Yongsoo Song. 2017. Homomorphic encryption for arithmetic of approximate numbers. In Advances in Cryptology--ASIACRYPT 2017: 23rd International Conference on the Theory and Application of Cryptology and Information Security. Springer, 409--437.Google ScholarGoogle Scholar
  15. Francc ois Chollet et al. 2015. Keras. (2015). https://github.com/keras-team/keras.Google ScholarGoogle Scholar
  16. Kai-Min Chung, Yael Tauman Kalai, Feng-Hao Liu, and Ran Raz. 2011. Memory delegation. In Annual Cryptology Conference. Springer, 151--168. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Daniel Demmler, Thomas Schneider, and Michael Zohner. 2015. textABY-A Framework for Efficient Mixed-Protocol Secure Two-Party Computation. In NDSS .Google ScholarGoogle Scholar
  18. Dung Hoang Duong, Pradeep Kumar Mishra, and Masaya Yasuda. 2016. Efficient secure matrix multiplication over LWE-based homomorphic encryption. Tatra Mountains Mathematical Publications, Vol. 67, 1 (2016), 69--83.Google ScholarGoogle ScholarCross RefCross Ref
  19. Junfeng Fan and Frederik Vercauteren. 2012. Somewhat Practical Fully Homomorphic Encryption. Cryptology ePrint Archive, Report 2012/144. (2012). https://eprint.iacr.org/2012/144.Google ScholarGoogle Scholar
  20. Dario Fiore and Rosario Gennaro. 2012. Publicly verifiable delegation of large polynomials and matrix computations, with applications. In Proceedings of the 2012 ACM conference on Computer and communications security. ACM, 501--512. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Rosario Gennaro, Craig Gentry, and Bryan Parno. 2010. Non-interactive verifiable computing: Outsourcing computation to untrusted workers. In Annual Cryptology Conference. Springer, 465--482. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Craig Gentry et al. 2009. Fully homomorphic encryption using ideal lattices. In STOC, Vol. 9. 169--178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Craig Gentry, Shai Halevi, and Nigel P Smart. 2012. Homomorphic evaluation of the AES circuit. Advances in Cryptology--CRYPTO 2012. Springer, 850--867. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ran Gilad-Bachrach, Nathan Dowlin, Kim Laine, Kristin Lauter, Michael Naehrig, and John Wernsing. 2016. CryptoNets: Applying neural networks to encrypted data with high throughput and accuracy. In International Conference on Machine Learning. 201--210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Shai Halevi and Victor Shoup. 2014. Algorithms in HElib. In Advances in Cryptology--CRYPTO 2014. Springer, 554--571.Google ScholarGoogle ScholarCross RefCross Ref
  26. Shai Halevi and Victor Shoup. 2015. Bootstrapping for HElib. Advances in Cryptology--EUROCRYPT 2015. Springer, 641--670.Google ScholarGoogle Scholar
  27. Shai Halevi and Victor Shoup. 2018. Faster Homomorphic Linear Transformations in HElib. Cryptology ePrint Archive, Report 2018/244. (2018). https://eprint.iacr.org/2018/244.Google ScholarGoogle Scholar
  28. Xiaoqian Jiang, Yongan Zhao, Xiaofeng Wang, Bradley Malin, Shuang Wang, Lucila Ohno-Machado, and Haixu Tang. 2014. A community assessment of privacy preserving techniques for human genomes. BMC Med. Inform. Decis. Mak., Vol. 14 Suppl 1, Suppl 1 (Dec. 2014), S1.Google ScholarGoogle ScholarCross RefCross Ref
  29. Chiraag Juvekar, Vinod Vaikuntanathan, and Anantha Chandrakasan. 2018. GAZELLE: A Low Latency Framework for Secure Neural Network Inference. In 27th USENIX Security Symposium (USENIX Security 18). USENIX Association, Baltimore, MD. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Miran Kim and Kristin Lauter. 2015. Private genome analysis through homomorphic encryption. BMC medical informatics and decision making, Vol. 15, Suppl 5 (2015), S3.Google ScholarGoogle Scholar
  31. Miran Kim, Yongsoo Song, Shuang Wang, Yuhou Xia, and Xiaoqian Jiang. 2018. Secure Logistic Regression based on Homomorphic Encryption: Design and Evaluation. JMIR medical informatics, Vol. 6, 2 (2018).Google ScholarGoogle Scholar
  32. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. 2012. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems. 1097--1105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Yann LeCun. 1998. The MNIST database of handwritten digits. http://yann. lecun. com/exdb/mnist/ (1998).Google ScholarGoogle Scholar
  34. Jian Liu, Mika Juuti, Yao Lu, and N Asokan. 2017. Oblivious neural network predictions via minionn transformations. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. ACM, 619--631. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Eleftheria Makri, Dragos Rotaru, Nigel P Smart, and Frederik Vercauteren. 2017. PICS: Private Image Classification with textSVM. Cryptology ePrint Archive, Report 2017/1190. (2017). https://eprint.iacr.org/2017/1190.Google ScholarGoogle Scholar
  36. Riccardo Miotto, Fei Wang, Shuang Wang, Xiaoqian Jiang, and Joel T Dudley. 2017. Deep learning for healthcare: review, opportunities and challenges. Brief. Bioinform. (May 2017).Google ScholarGoogle Scholar
  37. Pradeep Kumar Mishra, Dung Hoang Duong, and Masaya Yasuda. 2017. Enhancement for Secure Multiple Matrix Multiplications over Ring-LWE Homomorphic Encryption. In International Conference on Information Security Practice and Experience. Springer, 320--330.Google ScholarGoogle ScholarCross RefCross Ref
  38. Payman Mohassel. 2011. Efficient and Secure Delegation of Linear Algebra. Cryptology ePrint Archive, Report 2011/605. (2011). https://eprint.iacr.org/2011/605.Google ScholarGoogle Scholar
  39. Payman Mohassel and Yupeng Zhang. 2017. SecureML: A system for scalable privacy-preserving machine learning. In Security and Privacy (SP), 2017 IEEE Symposium on. IEEE, 19--38.Google ScholarGoogle ScholarCross RefCross Ref
  40. Michael Naehrig, Kristin Lauter, and Vinod Vaikuntanathan. 2011. Can homomorphic encryption be practical?. In Proceedings of the 3rd ACM workshop on Cloud computing security workshop. ACM, 113--124. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Claudio Orlandi, Alessandro Piva, and Mauro Barni. 2007. Oblivious neural network computing via homomorphic encryption. EURASIP Journal on Information Security, Vol. 2007, 1 (2007), 037343.Google ScholarGoogle ScholarCross RefCross Ref
  42. M Sadegh Riazi, Christian Weinert, Oleksandr Tkachenko, Ebrahim M Songhori, Thomas Schneider, and Farinaz Koushanfar. 2018. Chameleon: A Hybrid Secure Computation Framework for Machine Learning Applications. arXiv preprint arXiv:1801.03239 (2018).Google ScholarGoogle Scholar
  43. Victor Shoup et al. 2001. NTL: A library for doing number theory. (2001).Google ScholarGoogle Scholar
  44. Karen Simonyan and Andrew Zisserman. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014).Google ScholarGoogle Scholar
  45. Nigel P Smart and Frederik Vercauteren. 2011. Fully homomorphic textSIMD operations. Cryptology ePrint Archive, Report 2011/133. (2011). https://eprint.iacr.org/2011/133.Google ScholarGoogle Scholar
  46. Hassan Takabi, James BD Joshi, and Gail-Joon Ahn. 2010. Security and privacy challenges in cloud computing environments. IEEE Security & Privacy, Vol. 8, 6 (2010), 24--31. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Shuang Wang, Xiaoqian Jiang, Haixu Tang, Xiaofeng Wang, Diyue Bu, Knox Carey, Stephanie O M Dyke, Dov Fox, Chao Jiang, Kristin Lauter, and Others. 2017. A community effort to protect genomic data sharing, collaboration and outsourcing. npj Genomic Medicine, Vol. 2, 1 (2017), 33.Google ScholarGoogle Scholar
  48. David Wu and Jacob Haven. 2012. Using homomorphic encryption for large scale statistical analysis. Technical Report. Technical Report: cs. stanford. edu/people/dwu4/papers/FHESI Report. pdf.Google ScholarGoogle Scholar
  49. Masaya Yasuda, Takeshi Shimoyama, Jun Kogure, Kazuhiro Yokoyama, and Takeshi Koshiba. 2015. New packing method in somewhat homomorphic encryption and its applications. Security and Communication Networks, Vol. 8, 13 (2015), 2194--2213. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Matthew D Zeiler. 2012. ADADELTA: an adaptive learning rate method. arXiv preprint arXiv:1212.5701 (2012).Google ScholarGoogle Scholar

Index Terms

  1. Secure Outsourced Matrix Computation and Application to Neural Networks

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      CCS '18: Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security
      October 2018
      2359 pages
      ISBN:9781450356930
      DOI:10.1145/3243734

      Copyright © 2018 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 15 October 2018

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      CCS '18 Paper Acceptance Rate134of809submissions,17%Overall Acceptance Rate1,261of6,999submissions,18%

      Upcoming Conference

      CCS '24
      ACM SIGSAC Conference on Computer and Communications Security
      October 14 - 18, 2024
      Salt Lake City , UT , USA

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader