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.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call