[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3474366.3486929acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

EVA Improved: Compiler and Extension Library for CKKS

Published: 15 November 2021 Publication History

Abstract

Homomorphic encryption (HE), especially the CKKS scheme, can be extremely challenging to use. The EVA language and compiler (Dathathri et al., PLDI 2020) was an attempt at addressing this challenge. EVA allows a developer to express their encrypted computation in a simple form with a Python-integrated language called PyEVA. It then compiles the program into an executable form by inserting operations such as relinearization and rescaling, applying optimizations, and choosing encryption parameters with the objective of minimizing execution time. Compiled programs can be executed with a parallelizing back-end against a library of HE primitives.
Our work improves upon the EVA toolchain in several ways: changes to the Python front-end make writing PyEVA programs more natural, while a rework of EVA's C++ APIs makes writing new passes easier. We also implement two new optimizations, common subexpression elimination and reduction balancing, which we show allow users to write simpler and more modular PyEVA programs.
We argue that the abstraction EVA provides is insufficient to resolve some common usability challenges. For example, managing vectors of arbitrary size is non-trivial. To resolve these problems, we demonstrate how building a library of commonly used data structures and functions is simple in PyEVA. EVA's automation allows writing very concise code, which gets fused and optimized together with the user program. We create the beginnings of an EVA Extension Library (EXL), that provides vector and matrix classes and a collection of common statistical functions, to demonstrate the power of this approach.

References

[1]
Martin Albrecht, Melissa Chase, Hao Chen, Jintai Ding, Shafi Goldwasser, Sergey Gorbunov, Shai Halevi, Jeffrey Hoffstein, Kim Laine, Kristin Lauter, Satya Lokam, Daniele Micciancio, Dustin Moody, Travis Morrison, Amit Sahai, and Vinod Vaikuntanathan. 2018. Homomorphic encryption security standard. Technical Report. Homomorphic Encryption.org, Toronto, Canada.
[2]
David W Archer, José Manuel Calderón Trilla, Jason Dagit, Alex Malozemoff, Yuriy Polyakov, Kurt Rohloff, and Gerard Ryan. 2019. Ramparts: A programmer- friendly system for building homomorphic encryption applications. In Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography. 57--68.
[3]
Ayoub Benaissa, Bilal Retiat, Bogdan Cebere, and Alaa Eddine Belfedhal. 2021. TenSEAL: A library for encrypted tensor operations using homomorphic encryption. arXiv preprint arXiv:2104.03152 (2021).
[4]
Fabian Boemer, Anamaria Costache, Rosario Cammarota, and Casimir Wierzynski. 2019. ngraph-he2: A high-throughput framework for neural network inference on encrypted data. In Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography. 45--56.
[5]
Fabian Boemer, Yixing Lao, Rosario Cammarota, and Casimir Wierzynski. 2019. ngraph-he: A graph compiler for deep learning on homomorphically encrypted data. In Proceedings of the 16th ACM Int'l Conf. on Computing Frontiers. 3--13.
[6]
Zvika Brakerski, Craig Gentry, and Vinod Vaikuntanathan. 2014. (Leveled) fully homomorphic encryption without bootstrapping. ACM Transactions on Computation Theory (TOCT) 6, 3 (2014), 1--36.
[7]
Zvika Brakerski and Vinod Vaikuntanathan. 2011. Fully homomorphic encryption from ring-LWE and security for key dependent messages. In Annual cryptology Conf. Springer, 505--524.
[8]
Sergiu Carpov, Paul Dubrulle, and Renaud Sirdey. 2015. Armadillo: A compilation chain for privacy preserving applications. In Proceedings of the 3rd Int'l Workshop on Security in Cloud Computing. 13--19.
[9]
Hao Chen, Ilaria Chillotti, and Yongsoo Song. 2019. Improved bootstrapping for approximate homomorphic encryption. In Annual Int'l Conf. on the Theory and Applications of Cryptographic Techniques. Springer, 34--54.
[10]
Jung Hee Cheon, Kyoohyung Han, Andrey Kim, Miran Kim, and Yongsoo Song. 2018. Bootstrapping for approximate homomorphic encryption. In Annual Int'l Conf. on the Theory and Applications of Cryptographic Techniques. Springer, 360--384.
[11]
Jung Hee Cheon, Kyoohyung Han, Andrey Kim, Miran Kim, and Yongsoo Song. 2018. A full RNS variant of approximate homomorphic encryption. In Int'l Conf. on Selected Areas in Cryptography. Springer, 347--368.
[12]
Jung Hee Cheon, Andrey Kim, Miran Kim, and Yongsoo Song. 2017. Homo- morphic encryption for arithmetic of approximate numbers. In Int'l Conf. on the Theory and Application of Cryptology and Information Security. Springer, 409--437.
[13]
Eduardo Chielle, Oleg Mazonka, Nektarios Georgios Tsoutsos, and Michail Ma- niatakos. 2018. E3: A framework for compiling C++ programs with encrypted operands. IACR Cryptol. ePrint Arch. 2018 (2018), 1013.
[14]
Ilaria Chillotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachène. 2020. TFHE: Fast fully homomorphic encryption over the torus. Journal of Cryptology 33, 1 (2020), 34--91.
[15]
Meghan Cowan, Deeksha Dangwal, Armin Alaghi, Caroline Trippel, Vincent T Lee, and Brandon Reagen. 2021. Porcupine: A synthesizing compiler for vectorized homomorphic encryption. arXiv preprint arXiv:2101.07841 (2021).
[16]
Eric Crockett and Chris Peikert. 2016. Λoλ: Functional lattice cryptography. In Proceedings of the 2016 ACM SIGSAC Conf. on Computer and Communications Security. 993--1005.
[17]
Eric Crockett, Chris Peikert, and Chad Sharp. 2018. Alchemy: A language and compiler for homomorphic encryption made easy. In Proceedings of the 2018 ACM SIGSAC Conf. on Computer and Communications Security. 1020--1037.
[18]
Roshan Dathathri, Blagovesta Kostova, Olli Saarikivi, Wei Dai, Kim Laine, and Madan Musuvathi. 2020. EVA: An encrypted vector arithmetic language and compiler for efficient homomorphic computation. In Proceedings of the 41st ACM SIGPLAN Conf. on Programming Language Design and Implementation. 546--561.
[19]
Roshan Dathathri, Olli Saarikivi, Hao Chen, Kim Laine, Kristin Lauter, Saeed Maleki, Madanlal Musuvathi, and Todd Mytkowicz. 2019. CHET: An optimizing compiler for fully-homomorphic neural-network inferencing. In Proceedings of the 40th ACM SIGPLAN Conf. on Programming Language Design and Implementation. 142--156.
[20]
Léo Ducas and Daniele Micciancio. 2015. FHEW: Bootstrapping homomorphic encryption in less than a second. In Annual Int'l Conf. on the Theory and Applications of Cryptographic Techniques. Springer, 617--640.
[21]
Junfeng Fan and Frederik Vercauteren. 2012. Somewhat practical fully homomorphic encryption. IACR Cryptol. ePrint Arch. 2012 (2012), 144.
[22]
Craig Gentry. 2009. Fully homomorphic encryption using ideal lattices. In Pro- ceedings of the forty-first annual ACM Symp. on Theory of computing. 169--178.
[23]
Craig Gentry, Amit Sahai, and Brent Waters. 2013. Homomorphic encryption from learning with errors: Conceptually-simpler, asymptotically-faster, attribute-based. In Annual Cryptology Conf. Springer, 75--92.
[24]
Shruthi Gorantala, Rob Springer, Sean Purser-Haskell, William Lam, Royce Wilson, Asra Ali, Eric P Astor, Itai Zukerman, Sam Ruth, Christoph Dibak, et al. 2021. A general purpose transpiler for fully homomorphic encryption. arXiv preprint arXiv:2106.07893 (2021).
[25]
Matthew Green and Matthew Smith. 2016. Developers are not the enemy!: The need for usable security apis. IEEE Security & Privacy 14, 5 (2016), 40--46.
[26]
Shai Halevi and Victor Shoup. 2014. Algorithms in helib. In Annual Cryptology Conf. Springer, 554--571.
[27]
Kyoohyung Han and Dohyeong Ki. 2020. Better bootstrapping for approximate homomorphic encryption. In Cryptographers' Track at the RSA Conf. Springer, 364--390.
[28]
Lattigo 2020. Lattigo v2.1.1. http://github.com/ldsec/lattigo. EPFL-LDS.
[29]
Donald Nguyen, Andrew Lenharth, and Keshav Pingali. 2013. A lightweight infrastructure for graph analytics. In Proceedings of the Twenty-Fourth ACM Symp. on Operating Systems Principles (Farminton, Pennsylvania) (SOSP '13). Association for Computing Machinery, New York, NY, USA, 456--471. https: //doi.org/10.1145/2517349.2522739
[30]
PALISADE 2021. PALISADE Lattice Cryptography Library (release 1.11.2). https: //palisade-crypto.org.
[31]
Nikhil Patnaik, Joseph Hallett, and Awais Rashid. 2019. Usability smells: An analysis of developers' struggle with crypto libraries. In Fifteenth Symp. on Usable Privacy and Security ({SOUPS}2019).
[32]
Ronald L Rivest, Len Adleman, Michael L Dertouzos, et al. 1978. On data banks and privacy homomorphisms. Foundations of secure computation 4, 11 (1978), 169--180.
[33]
SEAL 2020. Microsoft SEAL (release 3.6). https://github.com/Microsoft/SEAL. Microsoft Research, Redmond, WA.
[34]
SHEEP 2019. SHEEP is a homomorphic encryption evaluation platform. https: //github.com/alan-turing-institute/SHEEP.
[35]
Seoul National University. 2020. HEAAN. https://github.com/snucrypto/HEAAN.
[36]
Tim van Elsloo, Giorgio Patrini, and Hamish Ivey-Law. 2019. SEALion: A framework for neural network inference on encrypted data. arXiv preprint arXiv:1904.12840 (2019).
[37]
Alexander Viand. 2021. SoK: Fully homomorphic encryption compilers. In IEEE Symp. on Security and Privacy.
[38]
Alexander Viand and Hossein Shafagh. 2018. Marble: Making fully homomorphic encryption accessible to all. In Proceedings of the 6th Workshop on Encrypted Computing & Applied Homomorphic Cryptography. 49--60.

Cited By

View all
  • (2024)Oraqle: A Depth-Aware Secure Computation CompilerProceedings of the 12th Workshop on Encrypted Computing & Applied Homomorphic Cryptography10.1145/3689945.3694808(43-50)Online publication date: 19-Nov-2024
  • (2024)The Avg-Act Swap and Plaintext Overflow Detection in Fully Homomorphic Operations Over Deep CircuitsProceedings of the Fourteenth ACM Conference on Data and Application Security and Privacy10.1145/3626232.3653277(127-138)Online publication date: 19-Jun-2024
  • (2023)HEaaN.MLIR: An Optimizing Compiler for Fast Ring-Based Homomorphic EncryptionProceedings of the ACM on Programming Languages10.1145/35912287:PLDI(196-220)Online publication date: 6-Jun-2023
  • Show More Cited By

Index Terms

  1. EVA Improved: Compiler and Extension Library for CKKS

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    WAHC '21: Proceedings of the 9th on Workshop on Encrypted Computing & Applied Homomorphic Cryptography
    November 2021
    75 pages
    ISBN:9781450386562
    DOI:10.1145/3474366
    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]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 15 November 2021

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. compilers
    2. fully homomorphic encryption

    Qualifiers

    • Research-article

    Conference

    CCS '21
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 6 of 17 submissions, 35%

    Upcoming Conference

    CCS '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)67
    • Downloads (Last 6 weeks)9
    Reflects downloads up to 03 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Oraqle: A Depth-Aware Secure Computation CompilerProceedings of the 12th Workshop on Encrypted Computing & Applied Homomorphic Cryptography10.1145/3689945.3694808(43-50)Online publication date: 19-Nov-2024
    • (2024)The Avg-Act Swap and Plaintext Overflow Detection in Fully Homomorphic Operations Over Deep CircuitsProceedings of the Fourteenth ACM Conference on Data and Application Security and Privacy10.1145/3626232.3653277(127-138)Online publication date: 19-Jun-2024
    • (2023)HEaaN.MLIR: An Optimizing Compiler for Fast Ring-Based Homomorphic EncryptionProceedings of the ACM on Programming Languages10.1145/35912287:PLDI(196-220)Online publication date: 6-Jun-2023
    • (2023)Optimized Privacy-Preserving CNN Inference With Fully Homomorphic EncryptionIEEE Transactions on Information Forensics and Security10.1109/TIFS.2023.326363118(2175-2187)Online publication date: 1-Jan-2023
    • (2023)PyTFHE: An End-to-End Compilation and Execution Framework for Fully Homomorphic Encryption Applications2023 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)10.1109/ISPASS57527.2023.00012(24-34)Online publication date: Apr-2023
    • (2023)Homomorphic Encryption Library, Framework, Toolkit and Accelerator: A ReviewSN Computer Science10.1007/s42979-023-02316-95:1Online publication date: 19-Nov-2023
    • (2022)Private and Reliable Neural Network InferenceProceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security10.1145/3548606.3560709(1663-1677)Online publication date: 7-Nov-2022
    • (2022)Symbolic analysis meets federated learning to enhance malware identifierProceedings of the 17th International Conference on Availability, Reliability and Security10.1145/3538969.3538996(1-10)Online publication date: 23-Aug-2022
    • (2022)Privacy-preserving time series prediction with temporal convolutional neural networks2022 International Joint Conference on Neural Networks (IJCNN)10.1109/IJCNN55064.2022.9892823(1-8)Online publication date: 18-Jul-2022

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media