• Permana langgeng wicaksono ellwid putra Study Program in informatics Engineering, Faculty of Computer Science, Universitas Dian Nuswantoro, Semarang, Indonesia
  • Christy Atika Sari Study Program in informatics Engineering, Faculty of Computer Science, Universitas Dian Nuswantoro, Semarang, Indonesia
  • Folasade Olubusola Isinkaye Department of Computer Science, Ekiti State University, Ekiti, Nigeria
Keywords: arduino, affine cipher, diffie-hellman, IoT, cryptography


In an Internet of Things (IoT) system, devices connected to the system exchange data. The data contains sensitive information about the connected devices in the system so it needs to be protected. Without security, the data in the IoT system can be easily retrieved. One way to prevent this is by implementing cryptography. Cryptography is a technique for protecting information by using encryption so that only the sender and receiver can see the contents of the information contained therein. The implementation of cryptography on IoT devices must consider the capabilities of IoT devices because in general IoT devices have limited processing capabilities compared to computer devices. Therefore, the selection of encryption algorithms needs to be adjusted to the computational capabilities of IoT devices. In this research, the affine cipher cryptography algorithm and Diffie-hellman key distribution algorithm are applied to the arduino atmega2560 IoT device. The purpose of this research is to increase the security of the IoT system by implementing cryptography. The method used in this research involves setting up a sequence of encryption and decryption steps using an affine cipher and diffie-hellman algorithms. Furthermore, these algorithms were implemented on an Arduino IoT device. Finally, the decryption time based on the number of characters and the avalanche test were tested. The results showed that on average, Arduino can perform decryption using affine cipher and diffie-hellman algorithms in 0.07 milliseconds per character. The avalanche test produced an average percentage of 45.51% from five trials.


Download data is not yet available.


I. Ardiansah, N. Bafdal, E. Suryadi, and A. Bono, “Greenhouse monitoring and automation using arduino: A review on precision farming and Internet of Things (IoT),” Int J Adv Sci Eng Inf Technol, vol. 10, no. 2, pp. 703–709, 2020, doi:

A. R. Kedoh, N. Nursalim, H. J. Djahi, and D. E. D. G. Pollo, “Sistem Kontrol Rumah Berbasis Internet of Things (Iot) Menggunakan Arduino Uno,” Jurnal Media Elektro, pp. 1–6, 2019, doi: 10.35508/jme.v8i1.1403.

Wilianto and A. Kurniawan, “Sejarah , Cara Kerja Dan Manfaat Internet of Things,” Matrix, vol. 8, no. 2, pp. 36–41, 2018, doi:

Z. B. Celik et al., “Sensitive information tracking in commodity IoT,” in Proceedings of the 27th USENIX Security Symposium, 2018, pp. 1687–1704.

P. Arpaia, F. Bonavolontá, and A. Cioffi, “Problems of the advanced encryption standard in protecting Internet of Things sensor networks,” Measurement (Lond), vol. 161, Sep. 2020, doi:

K. Joyoputro, A. Kusyanti, and F. A. Bakhtiar, “Implementasi Algoritme Kriptografi Lizard untuk Mengamankan Pengiriman Data Menggunakan Arsitektur Web Service REST pada Mikrokontroler NodeMCU,” vol. 2, no. 12, pp. 6292–6299, 2018, [Online]. Available:

R. Bhandari and V. B. Kirubanand, “Enhanced encryption technique for secure iot data transmission,” International Journal of Electrical and Computer Engineering, vol. 9, no. 5, pp. 3732–3738, 2019, doi:

A. Zubaidi, R. I. Sardi, and A. H. Jatmika, “Pengamanan Internet of Things Berbasis NodeMCU Menggunakan Algoritma AES Pada Arsitektur Web Service REST,” Edumatic: Jurnal Pendidikan Informatika, vol. 5, no. 2, pp. 252–260, 2021, doi:

F. Wahyudi and L. T. Utomo, “Perancangan Security Network Intrusion Prevention System Pada PDTI Universitas Islam Raden Rahmat Malang,” Edumatic: Jurnal Pendidikan Informatika, vol. 5, no. 1, pp. 60–69, Jun. 2021, doi:

M. Babar and M. Sohail Khan, “ScalEdge: A framework for scalable edge computing in Internet of things–based smart systems,” Int J Distrib Sens Netw, vol. 17, no. 7, 2021, doi:

M. M. Al-Kofahi, M. Y. Al-Shorman, and O. M. Al-Kofahi, “Toward energy efficient microcontrollers and Internet-of-Things systems,” Computers and Electrical Engineering, vol. 79, Oct. 2019, doi:

Nurjamiyah, “QUERY: Jurnal Sistem Informasi Implementasi Algoritma Affine Cipher untuk Keamanan Data Teks,” 2020, doi:

A. B. Nasution, “MODIFIKASI ALGORITMA AFFINE CIPHER UNTUK MENGAMANKAN DATA,” Jurnal Teknologi Informasi, vol. 4, no. 2, 2020, doi:

B. J. Dwi, M. Joko Priono, A. Suhendri, B. Dwi Juniansyah, and D. Darwis, “IMPLEMENTASI KOMBINASI AFFINE CIPHER DAN ONE-TIME PAD DALAM,” Jurnal Informatika, vol. 18, no. 2, 2018, doi:

T. Khairani, K. Agung, and A. Kamsyakawuni, “Pengkodean Monoalphabetic Menggunakan Affine Cipher dengan Kunci Diffie-Hellman,” Prisma (Prosiding Seminar Nasional Matematika), vol. 4, pp. 553–559, 2021, Accessed: Jun. 07, 2023. [Online]. Available:

Y. Wang and G. Mogos, “Diffie-hellman Protocol on Raspberry pi,” J Phys Conf Ser, vol. 1813, no. 1, 2021, doi:

A. Alfaris and M. Yuhendri, “Sitem Kendali Dan Monitoring Boost Converter Berbasis GUI (Graphical User Interface) Matlab Menggunakan Arduino,” 2020. doi:

S. R. Ningsih, A. H. S. Budi, A. T. Nugraha, and T. Winata, “Automatic farmer pest repellent with Arduino ATmega2560 based on sound displacement technique,” in IOP Conference Series: Materials Science and Engineering, Institute of Physics Publishing, May 2020. doi:

Budiyanto, R. Primananda, and F. A. Bakhtiar, “Implementasi Enkripsi Vernam Cipher dan Distribusi Kunci Three-Pass Protocol untuk Mengamankan Data Chatting pada ATmega328,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 5, no. 3, pp. 1119–1125, 2021, Accessed: Jun. 07, 2023. [Online]. Available:

A. Nurrohmah, A. Kusyanti, and R. Primananda, “Implementasi Algoritme Grain V1 Dan 128 Bit Pada Arduino Mega 2560,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 2, no. 4, pp. 1436–1445, 2018, [Online]. Available:

C. Umam, L. B. Handoko, C. A. Sari, E. H. Rachmawanto, and L. A. R. Hakim, “Kombinasi Vigenere dan Autokey Cipher dalam Proses Proteksi SMS Berbasis Android,” Prosiding Sains Nasional dan Teknologi, vol. 12, no. 1, p. 492, Nov. 2022, doi:

Z. Mufarokah, M. H. H. Ichsan, and A. Kusyanti, “Analisis Performa Algoritme SPECK Pada Arduino Uno,” … Teknologi Informasi dan Ilmu …, vol. 3, no. 1, pp. 1085–1092, 2019, Accessed: Jun. 07, 2023. [Online]. Available:

F. Nuraeni, Y. H. Agustin, A. E. Purnama, D. Stmik Tasikmalaya, and M. Stmik Tasikmalaya, “IMPLEMENTASI CAESAR CIPHER AND ADVANCED ENCRYPTION STANDARD (AES) PADA PENGAMANAN DATA PAJAK BUMI BANGUNAN,” Jurnal Ilmiah MATRIK, vol. 22, no. 2, 2020, doi:

Rizky F and Anwar, “Implementasi Kriptografi Dengan Metode Advanced Encryption Standard (AES) Untuk Realtime Chat Berbasis Mobile Pada E-Learning Politeknik Negeri Lhokseumawe,” JAISE : Journal of Artificial Intelligence and Software Engineering, vol. 1, no. 2, 2021, doi:

How to Cite
Permana langgeng wicaksono ellwid putra, C. A. Sari, and F. O. Isinkaye, “SECURE TEXT ENCRYPTION FOR IOT COMMUNICATION USING AFFINE CIPHER AND DIFFIE-HELLMAN KEY DISTRIBUTION ON ARDUINO ATMEGA2560 IOT DEVICES”, J. Tek. Inform. (JUTIF), vol. 4, no. 4, pp. 849-855, Aug. 2023.