Parallel implementation of Wiener's attack on RSA: Algorithm design and performance evaluation
Abstract
The robustness of the RSA cryptosystem is intrinsically tied to the choice of public and private keys. As pinpointed by M. Wiener, should the private decryption exponent, d, be improperly chosen-either disproportionately large or unduly small in relation to the public key n-an adversary could feasibly deduce the private keys within a practical time span. In this paper, the algorithm invented by Wiener is revisited and find a way to parallelize the attacking algorithm by using OpenMP. The algorithm is based on the proof made in Wiener’s article, that if d<1/3 n^(1/4), then the private key d is the denominator of one of the convergent of CF(e/n). Using a constant set of private keys (e,n), an extensive series of simulated attacks employing Wiener’s method was conducted on a laptop to determine the optimal thread count for executing the parallel algorithm. The results indicate that the algorithm’s execution speed can be enhanced by a factor of 1.5607 (rounded to five significant figures). Specifically, while the sequential version of the algorithm averaged a runtime of 3518939.04 nanoseconds, its parallel counterpart averaged 2240493.28 nanoseconds.
References
- Rivest, R. L., Shamir, A., & Adleman, L. (1978). A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM, 21(2), 120-126.
- Boneh, D. (1999). Twenty years of attacks on the RSA cryptosystem. Notices of the AMS, 46(2), 203-213.
- d de la Fe, S., Park, H. B., Sim, B. Y., Han, D. G., & Ferrer, C. (2021). Profiling attack against RSA key generation based on a Euclidean algorithm. Information, 12(11), 462.
- Susilo, W., Tonien, J., & Yang, G. (2020). A generalised bound for the Wiener attack on RSA. Journal of Information Security and Applications, 53, 102531.
- Wiener, M. J. (1990). Cryptanalysis of short RSA secret exponents. IEEE Transactions on Information theory, 36(3), 553-558.
- Hardy, G. H., & Wright, E. M. (1979). An introduction to the theory of numbers. Oxford university press.
- Susilo, W., Tonien, J., & Yang, G. (2019, May). The Wiener attack on RSA revisited: a quest for the exact bound. In Australasian Conference on Information Security and Privacy (pp. 381-398). Cham: Springer International Publishing.
- Steinfeld, R., Contini, S., Wang, H., & Pieprzyk, J. (2005). Converse results to the Wiener attack on RSA. In Public Key Cryptography-PKC 2005: 8th International Workshop on Theory and Practice in Public Key Cryptography, Les Diablerets, Switzerland, January 23-26, 2005. Proceedings 8 (pp. 184-198). Springer Berlin Heidelberg.
- Lewis, T. (n.d.). Home. OpenMP. https://www.openmp.org/.
- The GNU MP Bignum Library. (n.d.). Gmplib.org. https://gmplib.org.
- Cppreference.com. (2017). Date and time utilities. https://en.cppreference.com/w/cpp/chrono.
- Manjaro. (2011). #FREE OPERATING SYSTEM FOR EVERYONE. https://manjaro.org/.