Volume 19 • Issue 1 • PP: 108-116 • 2025
AI-Driven Cryptographic and Steganographic Integration for Enhanced Text Security Using OpenAI API
Open Access & Copyright
© 2025 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Abstract
Artificial Intelligence (AI) can become a great asset to produce cryptographic keys in order to improve the security of the encryption methods. While using machine learning algorithms AI can generate most complex and unpredictable keys to prevent brute-force and cryptanalyst attacks. Key generation using AI also allows the design of cryptographic solutions that adapt to the context in which the key is used. It also enhances the conventional security measures while simultaneously providing great opportunities for creating flexible security solutions. This paper proposed a new text security method based on the integration of the cryptography and steganography, where the suggested method is done based on OpenAI API. The proposed method is consisted of three steps, and these steps are key generation, text encryption, and data embedding. The first step, is utilized by using GPT-2 model to generate set of keys for both cryptography and steganography steps. The second step, is starting by converting the plaintext to ASCII format, then performed modulo arithmetic operation between ASCII values and the keys that generated from the previous step, then convert the achieved equation results to Hexadecimal format, and finally convert these values to binary and these values represent the final ciphertext. The last step of the proposed method is done by hiding the binary values within image, this done by select positions randomly, then used GPT-2 model to generate another set of keys to shift the values of random positions, then applied least significant bit (LSB) algorithm to hide the bits within the final position with different color channels. The proposed approach provides a basis for the development of new-generation secure communication systems in the context of AI.
Keywords
References
[1] B. Sharma, P. Goel, and J. K. Grewal, “Advances and Challenges in Cryptography using Artificial Intelligence,” 2023 IEEE 8th International Conference for Convergence in Technology (I2CT), Lonavla, India, pp. 1–5, 2023. doi: 10.1109/I2CT57861.2023.10126338.
[2] O. Ahmed, “Enhancing Intrusion Detection in Wireless Sensor Networks through Machine Learning Techniques and Context Awareness Integration,” International Journal of Mathematics, Statistics, and Computer Science, vol. 2, pp. 244–258, 2024. doi: 10.59543/ijmscs.v2i.10377.
[3] O. F. Rashid, Z. A. Othman, and S. Zainudin, “Features Selection for Intrusion Detection System Based on DNA Encoding,” in Intelligent and Interactive Computing, V. Piuri, V. Balas, S. Borah, and S. Syed Ahmad, Eds., Lecture Notes in Networks and Systems, vol. 67, Singapore: Springer, 2019. doi: 10.1007/978-981-13-6031-2_23.
[4] T. Nathiya, B. Mahalakshmi, K. K. Savitha, S. Pal, A. A. Khan, and R. Kumar, “A Comprehensive Approach to Cryptography and Security Testing in Network Defence,” 2024 International Conference on Emerging Trends in Networks and Computer Communications (ETNCC), Windhoek, Namibia, pp. 1–6, 2024. doi: 10.1109/ETNCC63262.2024.10767436.
[5] P. Kumar, A. Laroia, M. Kumar, A. Laroia, K. Upreti, and J. Parashar, “Advancing Image Security Through Deep Learning and Cryptography in Healthcare and Industry,” 2024 International Conference on Emerging Trends in Networks and Computer Communications (ETNCC), Windhoek, Namibia, pp. 236–441, 2024. doi: 10.1109/ETNCC63262.2024.10767450.
[6] G. I. Loretta, I. Kasireddy, M. Prameela, D. S. N. M. Rao, M. Kalaiyarasi, and S. Saravanan, “Enhancing Network Security with Multifused Cryptography: Integrating IoT and AI,” 2024 International Conference on Data Science and Network Security (ICDSNS), Tiptur, India, pp. 1–6, 2024. doi: 10.1109/ICDSNS62112.2024.10690933.
[7] N. M. Sultana and K. Srinivas, “Data Privacy Protection in Cloud Computing Using Visual Cryptography,” Multimedia Tools and Applications, 2024. doi: 10.1007/s11042-024-19963-6.
[8] N. Francis and T. Monoth, “Security enhanced random grid visual cryptography scheme using master share and embedding method,” International Journal of Information Technology, vol. 15, pp. 3949–3955, 2023. doi: 10.1007/s41870-023-01381-w.
[9] S. R. Devara and C. Azad, “Improved Database Security Using Cryptography with Genetic Operators,” SN Computer Science, vol. 4, p. 570, 2023. doi: 10.1007/s42979-023-01990-z.
[10] S. Vinothkumar and J. Amutharaj, “A hybrid public cryptography-based group key generation for sensitive attribute protection in medical healthcare systems,” International Journal of Information Technology, 2024. doi: 10.1007/s41870-024-02306-x.
[11] P. L. Sharma, S. Gupta, H. Monga, A. Nayyar, K. Gupta, and A. K. Sharma, “TEXCEL: Text encryption with elliptic curve cryptography for enhanced security,” Multimedia Tools and Applications, 2024. doi: 10.1007/s11042-024-19377-4.
[12] I. Chaouch, A. Naanaa, and S. ElAsmi, “A hybrid scheme using hyper-chaotic system and elliptic curve cryptography for image encryption,” Multimedia Tools and Applications, 2024. doi: 10.1007/s11042-024-19173-0.
[13] A. Saravanaselvan and B. Paramasivan, “A one-time pad cryptographic algorithm with Huffman Source Coding based energy-aware sensor node design,” Sustainable Computing: Informatics and Systems, vol. 44, 2024. doi: 10.1016/j.suscom.2024.101048.
[14] L. Zhang, J. Sheng, Y. Zhang, and Q. Wu, “Evaluation of Cryptography Algorithm Based on Digital Identity Authentication,” Procedia Computer Science, vol. 247, pp. 1012–1019, 2024. doi: 10.1016/j.procs.2024.10.122.
[15] Y. N. Kiran and N. Bala, “Enhancing Elliptic Curve Cryptography with Graph Neural Networks and Ensemble Methods,” 2024 9th International Conference on Intelligent Informatics and Biomedical Sciences (ICIIBMS), Okinawa, Japan, pp. 837–840, 2024. doi: 10.1109/ICIIBMS62405.2024.10792850.
[16] G. Shidaganti, V. L. Manoj, M. Vinay, and P. Patil, “Enhancing Data Protection Using Cryptography and Image Steganography in Cloud Environment,” 2024 5th International Conference on Circuits, Control, Communication and Computing (I4C), Bangalore, India, pp. 93–99, 2024. doi: 10.1109/I4C62240.2024.10748507.
[17] A. Tiwari, A. K. Pandey, L. Singh, G. K. Tiwari, and A. Singh, “Hybrid Cryptography Algorithms for Cloud Data Security,” 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT), Kamand, India, pp. 1–5, 2024
Cite This Article
Choose your preferred format
Publisher's Note
The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.