New Approach for Sine and Cosine in Secure Fixed-Point Arithmetic

  • Conference paper
  • First Online:
Cyber Security, Cryptology, and Machine Learning (CSCML 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13914))

Abstract

In this paper we present a new class of protocols for the secure computation of the sine and cosine functions. The precision for the underlying secure fixed-point arithmetic is parametrized by the number of fractional bits f and can be set to any desired value. We perform a rigorous error analysis to provide an exact bound for the absolute error of \(2^{-f}\) in the worst case. Existing methods rely on polynomial approximations of the sine and cosine, whereas our approach relies on the random self-reducibility of the problem, using efficiently generated solved instances for uniformly random angles. As a consequence, most of the \(O(f^2)\) secure multiplications can be done in preprocessing, leaving only O(f) work for the online part. The overall round complexity can be limited to O(1) using standard techniques. We have integrated our solution in MPyC.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (France)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 74.89
Price includes VAT (France)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 94.94
Price includes VAT (France)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Probabilistic (or, stochastic) rounding is applied in various areas of research, including machine learning, ODEs/PDEs, quantum mechanics/computing, and digital signal processing, usually in combination with a severe limitation on numerical precision (see, for instance, [7, 14, 16, 19]). The latter condition makes probabilistic rounding desirable in these cases, because it ensures zero-mean rounding errors and avoids the problem of stagnation, where small values are lost to rounding when they are added to an increasingly large accumulator [8]. However, the use of a randomness source may be expensive, where the number of random bits (entropy) varies with the probability distribution required for the rounding errors.

References

  1. SCALE-MAMBA v1.14 (2021). https://github.com/KULeuven-COSIC/SCALE-MAMBA

  2. Aly, A., Smart, N.P.: Benchmarking privacy preserved scientific operations. In: Applied Cryptography and Network Security, pp. 509–529 (2019)

    Google Scholar 

  3. Bar-Ilan, J., Beaver, D.: Non-cryptographic fault-tolerant computing in constant number of rounds of interaction. In: Proceedings of the Eighth Annual ACM Symposium on Principles of Distributed Computing (PODC 1989), pp. 201–209 (1989)

    Google Scholar 

  4. Bayatbabolghani, F., Blanton, M., Aliasgari, M., Goodrich, M.T.: Secure fingerprint alignment and matching protocols. ar**v preprint ar**v:1702.03379 (2017)

  5. Catrina, O., de Hoogh, S.: Secure multiparty linear programming using fixed-point arithmetic. In: Gritzalis, D., Preneel, B., Theoharidou, M. (eds.) ESORICS 2010. LNCS, vol. 6345, pp. 134–150. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15497-3_9

  6. Catrina, O., Saxena, A.: Secure computation with fixed-point numbers. In: Sion, R. (ed.) FC 2010. LNCS, vol. 6052, pp. 35–50. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14577-3_6

  7. Croci, M., Giles, M.B.: Effects of round-to-nearest and stochastic rounding in the numerical solution of the heat equation in low precision. IMA J. Numer. Anal. (2022)

    Google Scholar 

  8. Croci, M., Fasi, M., Higham, N.J., Mary, T., Mikaitis, M.: Stochastic rounding: implementation, error analysis and applications. R. Soc. Open Sci. 9, 211631 (2022)

    Article  Google Scholar 

  9. Damgård, I., Fitzi, M., Kiltz, E., Nielsen, J.B., Toft, T.: Unconditionally secure constant-rounds multi-party computation for equality, comparison, bits and exponentiation. In: Halevi, S., Rabin, T. (eds.) TCC 2006. LNCS, vol. 3876, pp. 285–304. Springer, Heidelberg (2006). https://doi.org/10.1007/11681878_15

  10. Feigenbaum, J., Fortnow, L.: On the random-self-reducibility of complete sets. SIAM J. Comput. 22, 994–1005 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  11. Guajardo, J., Mennink, B., Schoenmakers, B.: Modulo reduction for Paillier encryptions and application to secure statistical analysis. In: Sion, R. (ed.) FC 2010. LNCS, vol. 6052, pp. 375–382. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14577-3_32

  12. Hart, J.F.: Computer Approximations. Krieger Publishing Co., Inc., Malabar (1978)

    Google Scholar 

  13. Kerik, L., Laud, P., Randmets, J.: Optimizing MPC for robust and scalable integer and floating-point arithmetic. In: Clark, J., Meiklejohn, S., Ryan, P.Y.A., Wallach, D., Brenner, M., Rohloff, K. (eds.) FC 2016. LNCS, vol. 9604, pp. 271–287. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53357-4_18

  14. Na, T., Ko, J.H., Kung, J., Mukhopadhyay, S.: On-chip training of recurrent neural networks with limited numerical precision. In: 2017 International Joint Conference on Neural Networks (IJCNN), pp. 3716–3723 (2017)

    Google Scholar 

  15. Naveh, A., Tromer, E.: PhotoProof: cryptographic image authentication for any set of permissible transformations. In: 2016 IEEE Symposium on Security and Privacy (SP), pp. 255–271 (2016)

    Google Scholar 

  16. Paxton, E.A., Chantry, M., Klöwer, M., Saffin, L., Palmer, T.: Climate modeling in low precision: effects of both deterministic and stochastic rounding. J. Clim. 35(4), 1215–1229 (2022)

    Article  Google Scholar 

  17. Schoenmakers, B: MPyC package for secure multiparty computation in Python. GitHub github.com/lschoe/mpyc (2018)

  18. Volder, J.E.: The CORDIC trigonometric computing technique. IRE Trans. Electron. Comput. 8, 330–334 (1959)

    Article  Google Scholar 

  19. Wang, N., Choi, J., Brand, D., Chen, C.Y., Gopalakrishnan, K.: Training deep neural networks with 8-bit floating point numbers. In: Advances in Neural Information Processing Systems, vol. 31. Curran Associates, Inc. (2018)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Berry Schoenmakers .

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

Korzilius, S., Schoenmakers, B. (2023). New Approach for Sine and Cosine in Secure Fixed-Point Arithmetic. In: Dolev, S., Gudes, E., Paillier, P. (eds) Cyber Security, Cryptology, and Machine Learning. CSCML 2023. Lecture Notes in Computer Science, vol 13914. Springer, Cham. https://doi.org/10.1007/978-3-031-34671-2_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-34671-2_22

  • Published:

  • Publisher Name: Springer, Cham

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation