Speeding-Up Elliptic Curve Cryptography Algorithms
Abstract
:1. Introduction
1.1. Specific Supplementary Motivation
1.2. Structure of the Paper
2. Preliminaries
2.1. Notations
2.2. Barrett’s Algorithm
Algorithm 1: Barrett’s algorithm for modular reduction. |
2.3. Elliptic Curves in Cryptography
2.3.1. Schoof’s Algorithm
2.3.2. ECDSA
3. Main Results
3.1. Double-Speed Barrett for ECDSA
Algorithm 2: Generator for Barrett-compatible ECDSA parameters. |
Input: the bit-length of the prime p, which has to be even and large Output: the parameters needed for ECDSA
|
- 1.
- ;
- 2.
- ;
- 3.
- ;
- 4.
- .
- Using the inequality and Line 6 of Algorithm 2, we obtain that .
- From Theorem 1 we have that . Let . For the left side of the inequality, i.e., , we obtain thatThus,For the right side of the inequality, i.e., , we know from Line 1 that . Therefore, we get .
- Using Line 2 of Algorithm 2, we can deduce thatHence,
- Similarly, using Line 2 of Algorithm 2, we obtain thatTherefore,
- 0xbba46de2b4b53e20b97d41941c01a6b0
- 0x80000000000000000000000000000002bba46de2b4b53e20b97d41941c01a6b0
- 0x80000000000000000000000000000002bba46de2b4b53e20b97d41941c01a6ef
- 0x80000000000000000000000000000001b97deb5c74f4115fd2d9ec6ae5cb520f
- 0x1fffffffffffffffffffffffffffffff5116e48752d2b077d1a0af9af8ff9647f
- 0x1fffffffffffffffffffffffffffffff91a08528e2c2fba80b4984e5468d2b7db
3.2. Enhancing Schoof’s Algorithm Using AI
4. Implementation
4.1. GitHub Implementation
4.2. Implementation Results
4.2.1. AI-Based Speed-Up
4.2.2. Barrett-Based ECDSA Speed-Up
4.2.3. ECDSA Related Works Comparison
5. Conclusions and Future Work
Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A. ECDSA
Algorithm A1: ECDSA Setup. |
Input: , defining the elliptic curve over Output:
|
Algorithm A2: ECDSA Signature. |
Input: Output: the signature generated is the pair
|
Algorithm A3: ECDSA Verification. |
Input: Output: the signature is valid if and only if the algorithm returns 1
|
Appendix B. Schoof’s Algorithm
Algorithm A4: Schoof’s Algorithm. |
References
- Miller, V.S. Use of Elliptic Curves in Cryptography. In Advances in Cryptology—CRYPTO’85 Proceedings, Proceedings of the Conference on the Theory and Application of Cryptographic Techniques, Santa Barbara, CA, USA, 19–22 August 1984; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1986; Volume 218, pp. 417–426. [Google Scholar]
- Koblitz, N. Elliptic Curve Cryptosystems. Math. Comput. 1987, 48, 203–209. [Google Scholar] [CrossRef]
- Lenstra, H.W. Factoring Integers with Elliptic Curves. Ann. Math. 1987, 126, 649–673. [Google Scholar] [CrossRef] [Green Version]
- Rivest, R.L.; Shamir, A.; Adleman, L.M. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef] [Green Version]
- Kerry, C.F.; Romine, C. FIPS PUB 186-4 Federal Information Processing Standards Publication Digital Signature Standard (DSS). 2013. Available online: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf (accessed on 24 September 2022).
- Güneysu, T.; Paar, C. Ultra High Performance ECC over NIST Primes on Commercial FPGAs. In Cryptographic Hardware and Embedded Systems—CHES’08, Proceedings of the 10th International Workshop, Washington, DC, USA, 10–13 August 2008; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5154, pp. 62–78. [Google Scholar]
- Gövem, B.; Järvinen, K.; Aerts, K.; Verbauwhede, I.; Mentens, N. A Fast and Compact FPGA Implementation of Elliptic Curve Cryptography Using Lambda Coordinates. In Progress in Cryptology—AFRICACRYPT 2016, Proceedings of the 8th International Conference on Cryptology in Africa, Fes, Morocco, 13–15 April 2016; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9646, pp. 63–83. [Google Scholar]
- Sghaier, A.; Zeghid, M.; Massoud, C.; Mahchout, M. Design And Implementation of Low Area/Power Elliptic Curve Digital Signature Hardware Core. Electronics 2017, 6, 46. [Google Scholar] [CrossRef] [Green Version]
- Tachibana, S.; Araki, S.; Kajihara, S.; Azuchi, S.; Nakajo, Y.; Shoda, H. FPGA implementation of ECDSA for Blockchain. In Proceedings of the 2019 IEEE International Conference on Consumer Electronics—Taiwan (ICCE-TW), Yilan, Taiwan, 20–22 May 2019; pp. 1–2. [Google Scholar]
- Javaid, H.; Yang, J.; Santoso, N.; Upadhyay, M.; Mohan, S.; Hu, C.; Brebner, G. Blockchain Machine: A Network-Attached Hardware Accelerator for Hyperledger Fabric. arXiv 2021, arXiv:2104.06968. [Google Scholar]
- Sau, S.; Baidya, P.; Paul, R.; Mandal, S. Binary Field Point Multiplication Implementation in FPGA Hardware. In Proceedings of the Intelligent and Cloud Computing, Kyoto, Japan, 17–19 December 2021; Springer: Singapore, 2021; pp. 387–394. [Google Scholar]
- Awaludin, A.M.; Larasati, H.T.; Kim, H. High-Speed and Unified ECC Processor for Generic Weierstrass Curves over GF(p) on FPGA. Sensors 2021, 21, 1451. [Google Scholar] [CrossRef] [PubMed]
- Agrawal, R.; Yang, J.; Javaid, H. Efficient FPGA-based ECDSA Verification Engine for Permissioned Blockchains. arXiv 2021, arXiv:2112.02229. [Google Scholar]
- Available online: https://www.xilinx.com/products/intellectual-property/1-175rk99.html (accessed on 24 September 2022).
- Available online: https://www.xilinx.com (accessed on 24 September 2022).
- Available online: https://www.xilinx.com/developer/adaptive-computing-challenge/contest-2021.html (accessed on 24 September 2022).
- Available online: https://www.hackster.io/contests/xilinxadaptivecomputing2021 (accessed on 24 September 2022).
- Poschmann, A. Lightweight Cryptography—Cryptographic Engineering for a Pervasive World. Ph.D. Thesis, Ruhr University, Bochum, Germany, 2009; pp. 1–174. [Google Scholar]
- Liu, Z.; Seo, H.; Großschädl, J.; Kim, H. Efficient Implementation of NIST-Compliant Elliptic Curve Cryptography for Sensor Nodes. In Proceedings of the ICICS’13, Beijing, China, 20–22 November 2013; Lecture Notes in Computer Science. Springer: Berlin/Heidelberg, Germany, 2013; Volume 8233, pp. 302–317. [Google Scholar]
- Dhillon, P.K.; Kalra, S. Elliptic curve cryptography for real time embedded systems in IoT networks. In Proceedings of the 5th International Conference on Wireless Networks and Embedded Systems (WECON), Rajpura, India, 14–16 October 2016; pp. 1–6. [Google Scholar]
- Knežević, M.; Nikov, V.; Rombouts, P. Low-Latency ECDSA Signature Verification—A Road Toward Safer Traffic. IEEE Trans. Very Large Scale Integr. (VLSI) Syst. 2016, 24, 3257–3267. [Google Scholar] [CrossRef]
- Liu, Z.; Huang, X.; Hu, Z.; Khan, M.K.; Seo, H.; Zhou, L. On Emerging Family of Elliptic Curves to Secure Internet of Things: ECC Comes of Age. IEEE Trans. Depend. Secur. Comput. 2017, 14, 237–248. [Google Scholar] [CrossRef]
- Ji, J.H.; Kima, H. ASIC implementation for an ECC processor. IDEC J. Integr. Circuits Syst. 2018, 4, 1–5. [Google Scholar]
- Kudithi, T.; Sakthivel, R. High-performance ECC processor architecture design for IoT security applications. J. Supercomput. 2018, 75, 447–474. [Google Scholar] [CrossRef]
- Hu, X.; Zheng, X.; Zhang, S.; Cai, S.; Xiong, X. A Low Hardware Consumption Elliptic Curve Cryptographic Architecture over GF(p) in Embedded Application. Electronics 2018, 7, 104. [Google Scholar] [CrossRef] [Green Version]
- Salarifard, R.; Bayat-Sarmadi, S. An Efficient Low-Latency Point-Multiplication Over Curve25519. IEEE Trans. Circuits Syst. I Regul. Pap. 2019, 66, 3854–3862. [Google Scholar] [CrossRef]
- Lara-Nino, C.A.; Diaz-Perez, A.; Morales-Sandoval, M. Lightweight elliptic curve cryptography accelerator for internet of things applications. Ad Hoc Netw. 2020, 103, 102159. [Google Scholar] [CrossRef]
- Park, D.; Chang, N.S.; Lee, S.; Hong, S. Fast Implementation of NIST P-256 Elliptic Curve Cryptography on 8-Bit AVR Processor. Appl. Sci. 2020, 10, 8816. [Google Scholar] [CrossRef]
- Di Matteo, S.; Baldanzi, L.; Crocetti, L.; Nannipieri, P.; Fanucci, L.; Saponara, S. Secure Elliptic Curve Crypto-Processor for Real-Time IoT Applications. Energies 2021, 14, 4676. [Google Scholar] [CrossRef]
- Simon Francia, A.; Solis-Lastra, J.; Papa Quiroz, E.A. Elliptic Curves Cryptography for Lightweight Devices in IoT Systems. In Proceedings of the Emerging Research in Intelligent Systems, Quito, Ecuador, 14–18 June 2021; Springer: Berlin/Heidelberg, Germany, 2021; pp. 71–82. [Google Scholar]
- Kieu-Do-Nguyen, B.; Pham-Quoc, C.; Tran, N.T.; Pham, C.K.; Hoang, T.T. Low-Cost Area-Efficient FPGA-Based Multi-Functional ECDSA/EdDSA. Cryptography 2022, 6, 25. [Google Scholar] [CrossRef]
- Géraud, R.; Maimuţ, D.; Naccache, D. Double-Speed Barrett Moduli. In New Codebreakers—Essays Dedicated to David Kahn on the Occasion of His 85th Birthday; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9100, pp. 148–158. [Google Scholar]
- Barrett, P. Implementing the Rivest Shamir and Adleman Public Key Encryption Algorithm on a Standard Digital Signal Processor. In Proceedings of the CRYPTO’86, Santa Barbara, CA, USA, 11–15 August 1986; Lecture Notes in Computer Science. Springer: Berlin/Heidelberg, Germany, 1987; Volume 263, pp. 311–323. [Google Scholar]
- Hoffstein, J.; Pipher, J.; Silverman, J. An Introduction to Mathematical Cryptography; Undergraduate Texts in Mathematics; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Schoof, R. Elliptic Curves Over Finite Fields and the Computation of Square Roots mod p. Math. Comput. 1985, 44, 483–494. [Google Scholar]
- Bernstein, D.J. Curve25519: New Diffie-Hellman Speed Records. In Proceedings of the PKC’06; Lecture Notes in Computer Science, New York, NY, USA, 24–26 April 2006; Springer: Berlin/Heidelberg, Germany, 2006; Volume 3958, pp. 207–228. [Google Scholar]
- Washington, L.C. Elliptic Curves: Number Theory and Cryptography, 2nd ed.; Chapman & Hall/CRC: Boca Raton, FL, USA, 2008. [Google Scholar]
- Katz, J.; Lindell, Y. Introduction to Modern Cryptography; Chapman and Hall/CRC Press: Boca Raton, FL, USA, 2007. [Google Scholar]
- Available online: https://github.com/cryptocrew601/schoof (accessed on 24 September 2022).
- Available online: https://github.com/starkbank/ecdsa-python (accessed on 24 September 2022).
- Dewaghe, L. Remarks on the Schoof-Elkies-Atkin Algorithm. Math. Comput. 1998, 67, 1247–1252. [Google Scholar] [CrossRef]
Number of Layers | Timing (s) |
---|---|
7 | 1032 |
9 | 1597 |
Prime Length (Bits) | Algorithm | Timing (s) |
---|---|---|
32 | Enhanced Schoof | 14.97 |
Original Schoof | 33.42 | |
48 | Enhanced Schoof | 205 |
Original Schoof | 448 | |
64 | Enhanced Schoof | 1926 |
Original Schoof | 3635 |
ECDSA Algorithm | Timing (milliseconds) |
---|---|
Enhanced Signature | 4 |
Signature | 4.6 |
Enhanced Verification | 7.5 |
Verification | 9 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Maimuţ, D.; Matei, A.C. Speeding-Up Elliptic Curve Cryptography Algorithms. Mathematics 2022, 10, 3676. https://doi.org/10.3390/math10193676
Maimuţ D, Matei AC. Speeding-Up Elliptic Curve Cryptography Algorithms. Mathematics. 2022; 10(19):3676. https://doi.org/10.3390/math10193676
Chicago/Turabian StyleMaimuţ, Diana, and Alexandru Cristian Matei. 2022. "Speeding-Up Elliptic Curve Cryptography Algorithms" Mathematics 10, no. 19: 3676. https://doi.org/10.3390/math10193676
APA StyleMaimuţ, D., & Matei, A. C. (2022). Speeding-Up Elliptic Curve Cryptography Algorithms. Mathematics, 10(19), 3676. https://doi.org/10.3390/math10193676