CRYPTANALYSIS APPROACH BASED ON EVOLUTIONARY COMPUTATION
DOI:
https://doi.org/10.32782/mathematical-modelling/2026-9-1-18Keywords:
сryptanalysis, evolutionary computation, genetic algorithm, integer factorization problem, simple substitution cipherAbstract
This study explores the feasibility of applying evolutionary computation in cryptanalysis, specifically the use of genetic algorithms (GA) to solve the integer factorization problem. The relevance of this research is driven by the fact that the security of the RSA cryptosystem relies heavily on the computational complexity of the factorization problem. Since modern classical subexponential algorithms (e.g., GNFS, QS) face critical difficulties when processing large-scale numbers, there is a need for alternative heuristic approaches. The primary objective of this work is to practically verify the capability of GA in solving the factorization problem. The research methodology is based on formalizing the factorization problem as a combinatorial optimization problem, where the search for divisors is reduced to minimizing an objective error function (two variants of which are considered). The selection of GA as the research tool is justified by its mathematical properties, support for discrete representation, and successful prior application to other cryptanalysis tasks. To validate the method’s effectiveness, the algorithm was preliminarily tested on the frequency cryptanalysis of a simple substitution cipher, demonstrating high decryption accuracy for ciphertexts exceeding 200 characters in length. The results of practical factorization using GA are presented and compared with the classical trial division method. For small numbers (up to 106), the GA operates stably, although it is slower than the classical method. For larger numbers (up to 109), the algorithm demonstrates competitiveness, outperforming trial division in 8 % of cases; however, it exhibits instability. For even larger numbers (up to 1018), the algorithm produced incorrect results due to the precision limitations of the standard float data type. Implementing higher precision (decimal) in the Python environment prevented premature algorithm termination but did not enable the GA to find a solution within an acceptable time limit. Consequently, the genetic algorithm cannot currently be considered a full-fledged replacement for subexponential algorithms when factoring cryptographically significant numbers. However, its application as an auxiliary heuristic tool is entirely viable. The preliminary use of GA can potentially narrow the search space prior to the application of powerful subexponential algorithms, such as GNFS, QS, or ECM.
References
Matthews R. A. The Use of Genetic Algorithms in Cryptanalysis. Cryptologia. 1993. Vol. 17. P. 187–201. DOI: https://doi.org/10.1080/0161-119391867863
Spillman R., Janssen M., Nelson B., Kepner M. Use Of A Genetic Algorithm In The Cryptanalysis Of Simple Substitution Ciphers. Cryptologia. 1993. Vol. 17, iss. 1. P. 31–44. DOI: https://doi.org/10.1080/0161-119391867746
Spillman R. Cryptanalysis Of Knapsack Ciphers Using Genetic Algorithms. Cryptologia. 1993. Vol. 17, iss. 4. P. 367–377. DOI: https://doi.org/10.1080/0161-119391867999
Clark A., Dawson E. A Parallel Genetic Algorithm For Cryptanalysis Of The Polyalphabetic Substitution Cipher. Cryptologia. 1997. Vol. 21, iss. 2. P. 129–138. DOI: https://doi.org/10.1080/0161-119791885850
Clark A., Dawson E. Optimisation Heuristics for the Automated Cryptanalysis of Classical Ciphers. Journal of Combinatorial Mathematics and Combinatorial Computing. 1998. Vol. 28. P. 63–86.
Boryczka U., Dworak K. Genetic Transformation Techniques in Cryptanalysis. In: Nguyen N. T., Attachoo B., Trawiński B., Somboonviwat K. (eds). (Intelligent Information and Database Systems ACIIDS’2014 : Proceedings 6th Asian Conference, Bangkok, Thailand, April 7–9, 2014). Lecture Notes in Computer Science. 2014. Vol. 8398. P. 147–156. Cham : Springer. https://doi.org/10.1007/978-3-319-05458-2_16
Forhad M. S., Hossain M. S., Rahman M. O., Rahaman M., Haque M. M., Patwary M. K. An improved fitness function for automated cryptanalysis using genetic algorithm. Indonesian Journal of Electrical Engineering and Computer Science. 2019. Vol. 13. № 2. P. 643–648. DOI: https://doi.org/10.11591/ijeecs.v13.i2.pp643-648
Rachmawati D., Tamara H., Sembiring S., Budiman M. RSA public key solving technique by using genetic algorithm. Journal of Theoretical and Applied Information Technology. 2020. Vol. 98, no. 15. P. 2990–2999. URL : https://www.jatit.org/volumes/ninetyeight15.php
Sabonchi A. K. S., Akay B. Cryptanalysis of polyalphabetic cipher using differential evolution algorithm. Tehnički vjesnik. 2020. Vol. 27, no. 4. P. 1101–1107. DOI: https://doi.org/10.17559/TV-20190314095054
Mobin M. A., Kamrujjaman M. Cryptanalysis of RSA Cryptosystem: Prime Factorization using Genetic Algorithm. International Journal of Intelligent Systems and Applications in Engineering. 2024. Vol. 12, no. 1s. P. 456–468. DOI: https://doi.org/10.48550/arXiv.2407.05944
Кубайчук О. О. Особливості застосування алгоритму АСО до деяких задач криптоаналізу. Наукоємні технології. 2023. № 2(58). С. 141–148. DOI: https://doi.org/10.18372/2310-5461.58.17650
Кубайчук О. О. Огляд застосування метаевристичного підходу в криптоаналізі. Вісник Херсонського національного технічного університету. 2023. № 2(85). С. 147–153. DOI: https://doi.org/10.35546/kntu2078-4481.2023.2.20
Crandall R., Pomerance C. Prime numbers: A computational perspective. 2nd ed. New York : Springer, 2005. 597 р. DOI: https://doi.org/10.1007/0-387-28979-8
Eiben A. E., Smith J. E. Introduction to evolutionary computing. 2nd ed. Berlin : Springer, 2015. 287 р. DOI: https://doi.org/10.1007/978-3-662-44874-8





