Skip to main content

SecFloatPlus: More Accurate Floating-Point Meets Secure Two-Party Computation

  • Conference paper
  • First Online:
Provable and Practical Security (ProvSec 2024)

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

Included in the following conference series:

  • 44 Accesses

Abstract

Implementing secure two-party computation (2PC) protocols with floating-point numbers, balancing accuracy and efficiency, has been challenging. Despite advancements with SecFloat (in IEEE S&P’22) and Beacon (in USENIX Security’23), there is room for improvement in precision, efficiency and functionality. This paper introduces SecFloatPlus, which complements SecFloat with a new spline generation approach for implementing efficient and accurate 2PC-enabled mathematical functions. It significantly enhances accuracy, achieving up to \(1000 \times \) better performance for the hyperbolic tangent function (i.e., tanh) and \(6 \times \) better performance for the Gaussian Error Linear Unit (GELU) function, compared to Beacon. It also introduces precise inverse trigonometric functions (i.e., arcsin, arccos and arctan) which are never implemented by previous works. Besides, when integrated into secure transformer inference, SecFloatPlus outperforms SecFloat in runtime efficiency and communication cost for the SoftMax activation function, while maintaining precision.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.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
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. IEEE standard for floating-point arithmetic: IEEE Std 754–2008, pp. 1–70 (2008). https://doi.org/10.1109/IEEESTD.2008.4610935

  2. Aliasgari, M., Blanton, M., Zhang, Y., Steele, A.: Secure computation on floating point numbers. In: 20th Annual Network and Distributed System Security Symposium, NDSS 2013, San Diego, California, USA, 24–27 February 2013. The Internet Society (2013). https://www.ndss-symposium.org/ndss2013/secure-computation-floating-point-numbers

  3. Archer, D.W., Atapoor, S., Smart, N.P.: The cost of IEEE arithmetic in secure computation. In: International Conference on Cryptology and Information Security in Latin America, pp. 431–452. Springer (2021)

    Google Scholar 

  4. Blanton, M., Goodrich, M.T., Yuan, C.: Secure and accurate summation of many floating-point numbers. Proc. Priv. Enhanc. Technol. 2023(3), 432–445 (2023). https://doi.org/10.56553/POPETS-2023-0090

  5. Brüggemann, A., Hundt, R., Schneider, T., Suresh, A., Yalame, H.: Flute: fast and secure lookup table evaluations. In: Proceedings of IEEE S &P, pp. 515–533. IEEE (2023)

    Google Scholar 

  6. Burrus, C.S., Fox, J.W., Sitton, G.A., Treitel, S.: Horner’s method for evaluating and deflating polynomials. DSP Software Notes, Rice University (2003)

    Google Scholar 

  7. Catrina, O.: Evaluation of floating-point arithmetic protocols based on Shamir secret sharing. In: E-Business and Telecommunications: 16th International Conference, ICETE 2019, Prague, Czech Republic, 26–28 July 2019, Revised Selected Papers 16, pp. 108–131. Springer (2020)

    Google Scholar 

  8. Catrina, O.: Performance analysis of secure floating-point sums and dot products. In: 2020 13th International Conference on Communications (COMM), pp. 465–470. IEEE (2020)

    Google Scholar 

  9. Catrina, O.: Complexity and performance of secure floating-point polynomial evaluation protocols. In: Computer Security–ESORICS 2021: 26th European Symposium on Research in Computer Security, Darmstadt, Germany, 4–8 October 2021, Proceedings, Part II 26, pp. 352–369. Springer (2021)

    Google Scholar 

  10. Catrina, O., Dragulin, C.: Multiparty computation of fixed-point multiplication and reciprocal. In: 2009 20th International Workshop on Database and Expert Systems Application, pp. 107–111. IEEE (2009)

    Google Scholar 

  11. Catrina, O., Saxena, A.: Secure computation with fixed-point numbers. In: Financial Cryptography and Data Security: 14th International Conference, FC 2010, Tenerife, Canary Islands, 25–28 January 2010, Revised Selected Papers 14, pp. 35–50. Springer (2010)

    Google Scholar 

  12. Cody, W.J.: Software Manual for the Elementary Functions. Prentice-Hall Series in Computational Mathematics. Prentice-Hall, Inc. (1980)

    Google Scholar 

  13. Demmler, D., Dessouky, G., Koushanfar, F., Sadeghi, A.R., Schneider, T., Zeitouni, S.: Automated synthesis of optimized circuits for secure computation. In: Proceedings of ACM CCS, pp. 1504–1517. Association for Computing Machinery (2015). https://doi.org/10.1145/2810103.2813678

  14. Dimitrov, V., Kerik, L., Krips, T., Randmets, J., Willemson, J.: Alternative implementations of secure real numbers. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 553–564 (2016)

    Google Scholar 

  15. Edelman, A.: The mathematics of the pentium division bug. SIAM Rev. 39(1), 54–67 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  16. Evans, D., Kolesnikov, V., Rosulek, M., et al.: A pragmatic introduction to secure multi-party computation. Found. Trends® Priv. Secur. 2(2-3), 70–246 (2018)

    Google Scholar 

  17. Fouque, P.A., Stern, J., Wackers, G.J.: Cryptocomputing with rationals. In: International Conference on Financial Cryptography, pp. 136–146. Springer (2002)

    Google Scholar 

  18. Franz, M., Deiseroth, B., Hamacher, K., Jha, S., Katzenbeisser, S., Schröder, H.: Secure computations on non-integer values. In: 2010 IEEE International Workshop on Information Forensics and Security, pp. 1–6. IEEE (2010)

    Google Scholar 

  19. Franz, M., Katzenbeisser, S.: Processing encrypted floating point signals. In: Proceedings of the Thirteenth ACM Multimedia Workshop on Multimedia and Security, pp. 103–108 (2011)

    Google Scholar 

  20. Goldreich, O., Micali, S., Wigderson, A.: How to play any mental game, or a completeness theorem for protocols with honest majority. In: Providing Sound Foundations for Cryptography: On the Work of Shafi Goldwasser and Silvio Micali, pp. 307–328 (2019)

    Google Scholar 

  21. Granlund, T., Sjödin, G., Stallman, R., Riesel, H., Beuning, B., et al.: The gnu multiple precision arithmetic library (2020). https://gmplib.org/

  22. Hanrot, G., Zimmermann, P., Lefèvre, V., Pélissier, P., Théveny, P., et al.: The gnu MPFR library (2023). https://www.mpfr.org/

  23. Hazay, C., Lindell, Y.: Efficient Secure Two-Party Protocols: Techniques and constructions. Springer, Heidelberg (2010)

    Google Scholar 

  24. Hendrycks, D., Gimpel, K.: Gaussian error linear units (GELUs). arXiv preprint arXiv:1606.08415 (2016)

  25. Intel Corporation: Intel® oneAPI math kernel library (oneMKL) (2024). https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html

  26. Kamm, L., Willemson, J.: Secure floating point arithmetic and private satellite collision analysis. Int. J. Inf. Secur. 14(6), 531–548 (2015)

    Article  MATH  Google Scholar 

  27. Karnin, E., Greene, J., Hellman, M.: On secret sharing systems. IEEE Trans. Inf. Theory 29(1), 35–41 (1983). https://doi.org/10.1109/TIT.1983.1056621

    Article  MathSciNet  MATH  Google Scholar 

  28. Kerik, L., Laud, P., Randmets, J.: Optimizing MPC for robust and scalable integer and floating-point arithmetic. In: Financial Cryptography and Data Security: FC 2016 International Workshops, BITCOIN, VOTING, and WAHC, Christ Church, Barbados, 26 February 2016, Revised Selected Papers 20, pp. 271–287. Springer (2016)

    Google Scholar 

  29. Le Lann, G.: An analysis of the Ariane 5 flight 501 failure-a system engineering perspective. In: Proceedings International Conference and Workshop on Engineering of Computer-Based Systems, pp. 339–346. IEEE (1997)

    Google Scholar 

  30. Lim, J.P., Nagarakatte, S.: High performance correctly rounded math libraries for 32-bit floating point representations. In: Proceedings of PLDI, pp. 359–374 (2021)

    Google Scholar 

  31. McKinley, S., Levine, M.: Cubic spline interpolation. Coll. Redwoods 45(1), 1049–1060 (1998)

    MATH  Google Scholar 

  32. Rathee, D., Bhattacharya, A., Gupta, D., Sharma, R., Song, D.: Secure floating-point training. In: 32nd USENIX Security Symposium (USENIX Security 23), pp. 6329–6346 (2023)

    Google Scholar 

  33. Rathee, D., Bhattacharya, A., Sharma, R., Gupta, D., Chandran, N., Rastogi, A.: SecFloat: accurate floating-point meets secure 2-party computation. In: Proceedings of IEEE S &P, pp. 576–595 (2022)

    Google Scholar 

  34. Rathee, D., et al.: SIRNN: a math library for secure RNN inference. In: Proceedings of IEEE S &P, pp. 1003–1020. IEEE (2021)

    Google Scholar 

  35. Rathee, D., et al.: CryptFlow2: practical 2-party secure inference. In: Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, pp. 325–342 (2020)

    Google Scholar 

  36. Rathee, D., Rathee, M., Kumar, N., et al.: Ezpc (2022). https://github.com/mpc-msri/EzPC

  37. Sibidanov, A., Zimmermann, P., Glondu, S.: The CORE-MATH project. In: 2022 IEEE 29th Symposium on Computer Arithmetic (ARITH), pp. 26–34. IEEE (2022)

    Google Scholar 

  38. Sinnott, R.W.: Virtues of the haversine. Sky Telesc. 68(2), 158 (1984)

    MathSciNet  MATH  Google Scholar 

  39. Smith, J.R.: Introduction to Geodesy: The History and Concepts of Modern Geodesy, vol. 1. Wiley, Hoboken (1997)

    MATH  Google Scholar 

  40. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)

    Google Scholar 

  41. Šeděnka, J., Gasti, P.: Privacy-preserving distance computation and proximity testing on earth, done right. In: Proceedings of ACM CCS, ASIA CCS 2014, pp. 99–110. Association for Computing Machinery (2014). https://doi.org/10.1145/2590296.2590307

  42. Yao, A.C.C.: How to generate and exchange secrets. In: 27th Annual Symposium on Foundations of Computer Science (SFCS 1986), pp. 162–167 (1986). https://doi.org/10.1109/SFCS.1986.25

Download references

Acknowledgements

The work was supported in part by the National Natural Science Foundation of China (Nos. 62332007, U22B2028, 62302192, U23A20303 and 62032025), the Science and Technology Major Project of Tibetan Autonomous Region of China (No. XZ202201ZD0006G), the Natural Science Foundation of Guangdong Province (No. 2024A1515010086), and the Science and Technology Program of Guangzhou (No. 2024A04J3691), National Joint Engineering Research Center of Network Security Detection and Protection Technology, Guangdong Key Laboratory of Data Security and Privacy Preserving, Guangdong Hong Kong Joint Laboratory for Data Security and Privacy Protection, and Engineering Research Center of Trustworthy AI, Ministry of Education. The authors are very grateful to the anonymous reviewers for their detailed comments and suggestions regarding this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jian Weng .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Huang, T., Weng, J., Weng, J., Chen, M., Li, M. (2025). SecFloatPlus: More Accurate Floating-Point Meets Secure Two-Party Computation. In: Liu, J.K., Chen, L., Sun, SF., Liu, X. (eds) Provable and Practical Security. ProvSec 2024. Lecture Notes in Computer Science, vol 14903. Springer, Singapore. https://doi.org/10.1007/978-981-96-0954-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-981-96-0954-3_1

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-96-0953-6

  • Online ISBN: 978-981-96-0954-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics