Peningkatkan Keamanan ElGamal Menggunakan CNN dan Rolling Hash untuk Generasi Kunci dalam Enkripsi Gambar
DOI:
https://doi.org/10.52436/1.jutif.2026.7.3.4484Keywords:
Convolutional Neural Network, Digital Image Security, ElGamal Encryption, Key Generation, Rolling HashAbstract
The large scale exchange of digital images requires security mechanisms that are robust not only at the cryptographic algorithm level but also in the key generation process, which is often the weakest component of the system. In conventional ElGamal schemes, security may degrade due to static entropy sources and predictable key patterns. This study proposes an ElGamal key generation model based on a pipeline of Convolutional Neural Networks (CNNs) and a rolling hash function, utilizing visual image content as an adaptive entropy source. The CNN extracts latent features through a fully connected layer, while the rolling hash enhances diffusion and key sensitivity to minor image variations. The model was evaluated using the CIFAR-10 dataset in PNG, WEBP, and JPG formats. Experimental results show stable key generation times ranging from 0.426 to 0.444 ms, with high entropy values between 7.98 and 7.99 bits, indicating strong randomness and resistance to prediction. Strong diffusion characteristics were also observed (PSNR 5.94 dB, SSIM −0.24, MAE 0.43). During encryption, WEBP achieved the fastest processing time (0.48 ms), followed by PNG (1.01 ms) and JPG (15.39 ms), while PNG demonstrated the highest size efficiency with a reduction of up to 70.6%. Decryption remained highly reliable, with success rates exceeding 97% across all formats. Overall, the results confirm that integrating CNNs and rolling hash significantly enhances ElGamal key generation security without compromising decryption reliability or image quality.
Downloads
References
C. Wu, Y. Ding, A. Yan, T. C. Poon, and P. W. M. Tsang, “Asymmetric Optical Scanning Holography Encryption with Elgamal Algorithm,” Photonics, vol. 11, no. 9, 2024, doi: 10.3390/photonics11090878.
E. A. Adeniyi, P. B. Falola, M. S. Maashi, M. Aljebreen, and S. Bharany, “Secure Sensitive Data Sharing Using RSA and ElGamal Cryptographic Algorithms with Hash Functions,” Inf., vol. 13, no. 10, pp. 1–14, 2022, doi: 10.3390/info13100442.
Maxrizal and S. Irawadi, “Nonsingular matrix as private key on ElGamal cryptosystem,” J. Phys. Conf. Ser., vol. 1821, no. 1, 2021, doi: 10.1088/1742-6596/1821.
C. Annamalai, C. Vijayakumaran, V. Ponnusamy, and H. Kim, “Optimal ElGamal Encryption with Hybrid Deep-Learning-Based Classification on Secure Internet of Things Environment,” Sensors, vol. 23, no. 12, pp. 1–15, 2023, doi: 10.3390/s23125596.
M. Kumar, A. S. Chivukula, and G. Barua, “Deep learning-based encryption scheme for medical images using DCGAN and virtual planet domain,” Sci. Reports 2025 151, vol. 15, no. 1, pp. 1–42, Jan. 2025, doi: 10.1038/s41598-024-84186-6.
M. Al Kahfi, M. Auva, D. P. Putra, C. D. P. B. Ginting, and A. Fauzi, “Super Text Data Encryption: Combination of Affine Cipher, Elgamal, and RSA Algorithms for Optimal Protection,” J. Sist. Inf. Kaputama, vol. 9, no. 1, pp. 20–34, Jan. 2025, doi: 10.59697/JSIK.V9I1.949.
F. Fahry, T. C. Miswaty, and H. Harun, “Analyzing Marketplace Reviews Using Word2Vec, CNN, and Deep K-Means with Sociolinguistic Approaches,” J. Tek. Inform., vol. 6, no. 6, pp. 5489–5502, Dec. 2025, doi: 10.52436/1.JUTIF.2025.6.6.5340.
M. J. Mubarok, R. F. Haya, E. Fitria, and B. S. Budi, “Detection of Endangered Indonesian Species Across Multiple Taxonomic Classes Using Faster R-CNN,” J. Tek. Inform., vol. 6, no. 6, pp. 5435–5449, Dec. 2025, doi: 10.52436/1.JUTIF.2025.6.6.4793.
I. B. K. Widiartha, A. Y. Husodo, T. T. T. Thuy, and S. I. Murpratiwi, “Incremental CNN-k-NN Hybrid Facial Recognition for Helmeted Facial Recognition in IoT-Enabled Smart Parking: A Case Study at Universitas Mataram,” J. Tek. Inform., vol. 6, no. 6, pp. 5539–5552, Dec. 2025, doi: 10.52436/1.JUTIF.2025.6.6.5447.
N. G. Rezk, S. Alshathri, A. Sayed, E. E. D. Hemdan, and H. El-Behery, “Secure Hybrid Deep Learning for MRI-Based Brain Tumor Detection in Smart Medical IoT Systems,” Diagnostics, vol. 15, no. 5, p. 639, Mar. 2025, doi: 10.3390.
A. Fauzi, S. Ramadani, H. Khair, and A. M. H. Pardede, “Integration Of Data Filtering With Hybrid RSA Deep Learning Algorithm For Iot Data Security And Classification.,” J. Theor. Appl. Inf. Technol., vol. 103, no. 22, 2025.
T. Gizachew Yirga, H. Gizachew Yirga, and E. G. Addisu, “Cryptographic key generation using deep learning with biometric face and finger vein data,” Front. Artif. Intell., vol. 8, p. 1545946, Apr. 2025, doi: 10.3389/FRAI.2025.1545946.
A. N. A. Saputra, R. E. Saputro, and D. I. S. Saputra, “Labeling Optimization and Hybrid CNN Model in Sentiment Analysis of Movie Reviews with Slang Handling,” J. Tek. Inform., vol. 6, no. 6, pp. 5333–5348, Dec. 2025, doi: 10.52436/1.JUTIF.2025.6.6.4465.
Y. E. Karabacak, “Deep learning-based CNC milling tool wear stage estimation with multi-signal analysis,” Eksploat. i Niezawodn., vol. 25, no. 3, pp. 0–2, 2023, doi: 10.17531/ein/168082.
C. Jiang and G. Goldsztein, “Convolutional Neural Network Approach to Classifying the CIFAR-10 Dataset,” J. Student Res., vol. 12, no. 2, pp. 1–7, May 2023, doi: 10.47611/jsrhs.v12i2.4388.
N. Widaad and D. Anggraini, “Sentiment Analysis Of ChatGPT APP User Reviews Using SVM And CNN Methods,” J. Tek. Inform., vol. 5, no. 6, pp. 1687–1700, Dec. 2024, doi: 10.52436/1.JUTIF.2024.5.6.4010.
A. M. Huda, G. F. Shidik, and V. Praskatama, “Comparative Analysis Of LSTM, BILSTM, GRU, CNN, And RNN For Depression Detection In Social Media,” J. Tek. Inform., vol. 5, no. 6, pp. 1723–1735, Dec. 2024, doi: 10.52436/1.JUTIF.2024.5.6.4060.
S. Y. Riska and A. Noercholis, “Performance Comparison Of Faster R-Convolutional Neural Network (CNN) And Efficientnet For Train Detection Under Diverse Lighting And Image Quality Conditions,” J. Tek. Inform., vol. 5, no. 6, pp. 1811–1821, Dec. 2024, doi: 10.52436/1.JUTIF.2024.5.6.3438.
H. Fransiska and A. Azhari STMIK Kalirejo, “Application of Transformer-Based Deep Learning for Early Detection of Cyberattacks on IoT-Based Critical Infrastructure,” RIGGS J. Artif. Intell. Digit. Bus., vol. 4, no. 2, pp. 3818–3825, Jun. 2025, doi: DOI:10.31004/riggs.v4i2.1118.
C.-Y. Chang, C.-F. Yang, C.-C. Chang, P.-T. Wu, and Y.-M. Ooi, “Evaluation of Impact of Convolutional Neural Network-Based Feature Extractors on Deep Reinforcement Learning for Autonomous Driving,” Eng. Proc. 2025, Vol. 120, Page 27, vol. 120, no. 1, p. 27, Feb. 2026, doi: 10.3390/engproc2025120027.
Y. Wang, T. Lan, Q. Ye, D. Sheng, Z. Bao, and R. Song, “Series Arc Fault Detection Method Based on TDDA-CNN Prototype Learning Model,” Electron. 2026, Vol. 15, Page 681, vol. 15, no. 3, p. 681, Feb. 2026, doi: 10.3390/electronics15030681.
O. ’ Shaughnessy, E. Tabane, E. Mnkandla, and Z. Wang, “Ensemble Deep Learning Models for Multi-Class DNA Sequence Classification: A Comparative Study of CNN, BiLSTM, and GRU Architectures,” Appl. Sci. 2026, Vol. 16, Page 1545, vol. 16, no. 3, p. 1545, Feb. 2026, doi: 10.3390/app16031545.
M. Alawida, “A novel chaos-based permutation for image encryption,” J. King Saud Univ. - Comput. Inf. Sci., vol. 35, no. 6, Jun. 2023, doi: 10.1016/j.jksuci.2023.101595.
Y. Luo, X. Ouyang, J. Liu, and L. Cao, “An Image Encryption Method Based on Elliptic Curve Elgamal Encryption and Chaotic Systems,” IEEE Access, vol. 7, pp. 38507–38522, 2019, doi: 10.1109/ACCESS.2019.2906052.
Y. Qin and B. Zhang, “Privacy-Preserving Biometrics Image Encryption and Digital Signature Technique Using Arnold and ElGamal,” Appl. Sci. 2023, Vol. 13, Page 8117, vol. 13, no. 14, p. 8117, Jul. 2023, doi: 10.3390/APP13148117.
B. Harjito, T. Setyawati, and A. Wijayanto, “Comparative Analysis between Elgamal and NTRU Algorithms and their implementation of Digital Signature for Electronic Certificate,” Int. J. Electr. Comput. Eng. Syst., vol. 13, no. 9, pp. 729–739, 2022, doi: doi.org/10.32985/ijeces1391.
D. R. and I. P. S. M. A. Budiman, “A tutorial on using ElGamal cryptosystem and RC4-P1 cipher in a hybrid scheme A tutorial on using ElGamal cryptosystem and RC4-P1 cipher in a hybrid scheme,” 2023, doi: 10.1088/1742-6596/2421/1/012033.
R. Imanda et al., “Development Of Hybrid Encryption Method Using Affine Cipher, Vigenere Cipher, And Elgamal Algorithm To Secure Text Messages In Data Communication System,” J. Artif. Intell. Eng. Appl., vol. 2, no. 2, pp. 30–40, Feb. 2023, doi: 10.59934/JAIEA.V2I2.154.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Achmad Fauzi, Teuku Yuliar Arif, Yuwaldi Away, Roslidar

This work is licensed under a Creative Commons Attribution 4.0 International License.





