Abstract
The computation of the modular exponentiation for big numbers is widely used to find the discrete logarithm, in number-theoretic transforms and in cryptographic algorithms. To efficient compute the modular exponent, new methods, algorithms and means of their implementation are being developed. There are three directions of computational method of modular exponentiation: general modular exponentiation, and computation of the modular exponentiation with a fixed exponent or with a fixed base. Special functions have been developed to perform modular exponentiation in mathematical and cryptographic software libraries. The paper compares the freely available functions of computing the modular exponentiation from the Crypto ++, OpenSSL, Pari / GP and MPIR libraries and developed three functions based on the right-to-left binary shift algorithm. A separate type of numeric data from the MPIR library is used to work with big numbers in the developed functions. The developed functions implement a binary iterative algorithm in one main stream, in two streams and one stream using precomputation. The comparison is based on the average time of execution of the modular exponentiation for pseudo-random data with 1K and 2K bits, which corresponds to the size of about 300 and 600 decimal signs. The runtime results summarized in the table show that the modular exponentiation is computed the fastest by a function from the OpenSSL library, which is almost twice smaller than the function from the Crypto ++ library and three times smaller than the MPIR function in universal computer systems. The implementation of the function of computing the modular exponentiation by mathematical and cryptographic software libraries uses a more optimal modulus multiplication algorithm, the so-called Montgomery multiplication. The developed three functions use multiplication by modulo operations for factors smaller than the module value. The function using precomputation of the remainders for the fixed basis and the module is analyzed separately. After all, in the testing process, the time of precomputation and determination of the periodicity of residues for this function is not taken into account. Further parallelization of the computation of parts of a multi-bit exponent and the use of the Montgomery multiplication algorithm will allow efficient use of the developed function with precomputation for the calculation of the discrete logarithm.
Publisher
Lviv Polytechnic National University
Reference28 articles.
1. [1] Studholme, C. (2002). The Discrete Log Problem. Retrieved from: http://www.cs.toronto.edu/~cvs/dlog/research_paper.pdf
2. [2] Satyanarayana, V. N., & Ramasubramanian, U. T. (2021). Energy-Efficient Modular Exponential Techniques for Public-Key Cryptography. Springer Nature Singapur Pte Ltd. 255 p. https://doi.org/10.1007/978-3-030-74524-0
3. [3] Tandrup, M. B., Jensen, M. H., Andersen, R. N., & Hansen, T. F. (2004). Fast Exponentiation In practice. Retrieved from: https://cs.au.dk/~ivan/FastExpproject.pdf
4. [4] Jakubski, A., & Perliński, R. (2011). Review of General Exponentiation Algorithms. Scientific Research of the Institute of Mathematics and Computer Science, 2(10), 87-98. Retrieved from: http://amcm.pcz.pl/2011_2/art_10.pdf
5. [5] Rezai, A., & Keshavarzi, P. (2015). Algorithm design and theoretical analysis of a novel CMM modular exponentiation algorithm for large integers. RAIRO - Theoretical Informatics and Applications, 49(3), 255-268. https://doi.org/10.1051/ita/2015007