Skip to main content

Brief Announcement: Efficient Probabilistic Approximations for Sign and Compare

  • Conference paper
  • First Online:
Stabilization, Safety, and Security of Distributed Systems (SSS 2023)

Abstract

Fully Homomorphic Encryption (FHE) is a prime candidate for designing privacy-preserving schemes due to its cryptographic security guarantees. For word-wise FHE schemes, often, the complex functions need to be approximated as low-order polynomials. Meanwhile, Artificial Neural Networks (ANN) are known for their ability to approximate arbitrary functions. This paper presents an ANN-based probabilistic polynomial approximation approach using a Perceptron with linear activation in our publicly available Python library. Our approach can be used to generate approximation polynomials with desired degree terms. We further provide third and seventh-degree approximations for univariate \(Sign(x) \in \{-1,0,1\}\) and \(Compare(a-b) \in \{0,\frac{1}{2},1\}\) functions in the intervals \([-1,1]\) and \([-5,-5]\). Finally, we empirically show that our polynomials improve up to 15% accuracy over Chebyshev’s.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Angel, S., Chen, H., Laine, K., Setty, S.: PIR with compressed queries and amortized query processing. In: 2018 IEEE symposium on security and privacy (SP), pp. 962–979. IEEE (2018)

    Google Scholar 

  2. Baker, G.A., Baker Jr., G.A., Graves-Morris, P., Baker, S.S.: Pade Approximants: Encyclopedia of Mathematics and It’s Applications, vol. 59. Cambridge University Press, Cambridge (1996)

    Google Scholar 

  3. Bos, J.W., Castryck, W., Iliashenko, I., Vercauteren, F.: Privacy-friendly forecasting for the smart grid using homomorphic encryption and the group method of data handling. In: Joye, M., Nitaj, A. (eds.) AFRICACRYPT 2017. LNCS, vol. 10239, pp. 184–201. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-57339-7_11

    Chapter  Google Scholar 

  4. Boudguiga, A., Stan, O., Sedjelmaci, H., Carpov, S.: Homomorphic encryption at work for private analysis of security logs. In: ICISSP, pp. 515–523 (2020)

    Google Scholar 

  5. Bourse, F., Minelli, M., Minihold, M., Paillier, P.: Fast homomorphic evaluation of deep discretized neural networks. In: Shacham, H., Boldyreva, A. (eds.) CRYPTO 2018, Part III. LNCS, vol. 10993, pp. 483–512. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-96878-0_17

    Chapter  Google Scholar 

  6. Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic encryption without bootstrapping. ACM Trans. Comput. Theory (TOCT) 6(3), 1–36 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  7. Cheon, J.H., Kim, A., Kim, M., Song, Y.: Homomorphic encryption for arithmetic of approximate numbers. In: Takagi, T., Peyrin, T. (eds.) ASIACRYPT 2017, Part I. LNCS, vol. 10624, pp. 409–437. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70694-8_15

    Chapter  Google Scholar 

  8. Cheon, J.H., Kim, D., Kim, D., Lee, H.H., Lee, K.: Numerical method for comparison on homomorphically encrypted numbers. In: Galbraith, S.D., Moriai, S. (eds.) ASIACRYPT 2019, Part II. LNCS, vol. 11922, pp. 415–445. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-34621-8_15

    Chapter  Google Scholar 

  9. Cheon, J.H., Kim, D., Park, J.H.: Towards a practical clustering analysis over encrypted data. IACR Cryptol. ePrint Arch. 2019, 465 (2019)

    Google Scholar 

  10. Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: Faster fully homomorphic encryption: bootstrapping in less than 0.1 seconds. In: Cheon, J.H., Takagi, T. (eds.) ASIACRYPT 2016, Part I. LNCS, vol. 10031, pp. 3–33. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53887-6_1

    Chapter  MATH  Google Scholar 

  11. Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: Faster packed homomorphic operations and efficient circuit bootstrapping for TFHE. In: Takagi, T., Peyrin, T. (eds.) ASIACRYPT 2017, Part I. LNCS, vol. 10624, pp. 377–408. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70694-8_14

    Chapter  Google Scholar 

  12. Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: TFHE: fast fully homomorphic encryption over the torus. J. Cryptol. 33(1), 34–91 (2020)

    Article  MathSciNet  MATH  Google Scholar 

  13. Dathathri, R., et al.: CHET: an optimizing compiler for fully-homomorphic neural-network inferencing. In: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 142–156 (2019)

    Google Scholar 

  14. Ducas, L., Micciancio, D.: FHEW: bootstrapping homomorphic encryption in less than a second. In: Oswald, E., Fischlin, M. (eds.) EUROCRYPT 2015, Part I. LNCS, vol. 9056, pp. 617–640. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46800-5_24

    Chapter  MATH  Google Scholar 

  15. Fan, J., Vercauteren, F.: Somewhat practical fully homomorphic encryption. Cryptology ePrint Archive (2012)

    Google Scholar 

  16. Gentry, C.: Fully homomorphic encryption using ideal lattices. In: Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing, pp. 169–178 (2009)

    Google Scholar 

  17. 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, Part I. LNCS, vol. 8042, pp. 75–92. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40041-4_5

    Chapter  Google Scholar 

  18. George, A.: Mathematical Methods for Physicists. Academic Press, Cambridge (1985)

    Google Scholar 

  19. Gilad-Bachrach, R., Dowlin, N., Laine, K., Lauter, K., Naehrig, M., Wernsing, J.: Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In: International Conference on Machine Learning, pp. 201–210. PMLR (2016)

    Google Scholar 

  20. Kim, M., Lauter, K.: Private genome analysis through homomorphic encryption. In: BMC Medical Informatics and Decision Making, vol. 15, pp. 1–12. BioMed Central (2015)

    Google Scholar 

  21. Kim, M., Song, Y., Wang, S., Xia, Y., Jiang, X., et al.: Secure logistic regression based on homomorphic encryption: Design and evaluation. JMIR Med. Inform. 6(2), e8805 (2018)

    Article  Google Scholar 

  22. Lee, E., Lee, J.W., No, J.S., Kim, Y.S.: Minimax approximation of sign function by composite polynomial for homomorphic comparison. IEEE Trans. Dependable Secure Comput. 19(6), 3711–3727 (2021)

    Article  Google Scholar 

  23. Press, W.H., Vetterling, W.T., Teukolsky, S.A., Flannery, B.P.: Numerical Recipes Example Book (FORTRAN). Cambridge University Press, Cambridge (1992)

    MATH  Google Scholar 

  24. Remez, E.Y.: Sur le calcul effectif des polynomes d’approximation de tschebyscheff. CR Acad. Sci. Paris 199(2), 337–340 (1934)

    Google Scholar 

  25. Smart, N.P., Vercauteren, F.: Fully homomorphic SIMD operations. Des. Codes Crypt. 71, 57–81 (2014)

    Article  MATH  Google Scholar 

  26. Trama, D., Clet, P.E., Boudguiga, A., Sirdey, R.: Building blocks for LSTM homomorphic evaluation with TFHE. In: Dolev, S., Gudes, E., Paillier, P. (eds.) CSCML 2023. LNCS, vol. 13914, pp. 117–134. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-34671-2_9

    Chapter  Google Scholar 

  27. Trivedi, D.: GitHub - devharsh/chiku: polynomial function approximation library in Python. (2023). https://github.com/devharsh/chiku

  28. Trivedi, D.: Privacy-preserving security analytics (2023). https://www.isaca.org/resources/news-and-trends/isaca-now-blog/2023/privacy-preserving-security-analytics

  29. Trivedi, D.: The future of cryptography: performing computations on encrypted data. ISACA J. 1(2023) (2023). https://www.isaca.org/resources/isaca-journal/issues/2023/volume-1/the-future-of-cryptography

  30. Trivedi, D., Boudguiga, A., Triandopoulos, N.: SigML: supervised log anomaly with fully homomorphic encryption. In: Dolev, S., Gudes, E., Paillier, P. (eds.) CSCML 2023. LNCS, vol. 13914, pp. 372–388. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-34671-2_26

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Devharsh Trivedi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Trivedi, D. (2023). Brief Announcement: Efficient Probabilistic Approximations for Sign and Compare. In: Dolev, S., Schieber, B. (eds) Stabilization, Safety, and Security of Distributed Systems. SSS 2023. Lecture Notes in Computer Science, vol 14310. Springer, Cham. https://doi.org/10.1007/978-3-031-44274-2_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-44274-2_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-44273-5

  • Online ISBN: 978-3-031-44274-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics