One-Time Pad Cryptography for Secure Data Transmission in IoT Smart Door Using QR Code

Authors

DOI:

https://doi.org/10.69616/mit.v2i2.248
\

Keywords:

Internet of Things, Smart Door, One-Time Pad, XOR Algorithm, Data Encryption

Abstract

The increasing use of the Internet of Things (IoT) in security systems such as Smart Doors has created new challenges for data security, especially the risk of wiretapping through sniffing attacks. This research proposes applying the One-Time Pad (OTP) XOR algorithm as an encryption method to protect QR Code-based data transmission in the Smart Door system. The implementation is carried out on three main communication paths: sending UUID from the server to the user's website, sending the results of QR Code scanning from ESP32-CAM to the server, and sending instructions from the server to the ESP32 device. The test results show that the resulting ciphertext is always different even though the plaintext is the same, with a 0% algorithm identification success rate by Cipher Identifier and a 100% resistance level to brute force XOR, based on testing using dCode.fr tools. In addition, the encryption and decryption processes are very fast, with an average encryption time on the ESP32-CAM of 0.34 milliseconds and an average decryption time on the ESP32 of 0.17 milliseconds. These results show that the OTP XOR algorithm is able to disguise data against basic cryptanalysis attacks and can be run on IoT devices that have limited resources. In the future, it is suggested to apply better key management methods such as pre-shared key (PSK), key rotation, or key derivation function (KDF) to improve the security of key distribution in this symmetrical system. In addition, the security system can be improved through separating the OTP key transmission path using an approach such as Out-of-Band Key Exchange or asymmetric key wrapping with the RSA algorithm so that the key remains protected even if sniffing occurs.

References

A. M. N. Hidayat and M. Na’im Al Jum’ah, “BIMTEK FTI: Digital Village Governance,” MEKONGGA J. Pengabdi. Masy., vol. 1, no. 1, pp. 15–20, 2024, https://doi.org/10.69616/mekongga.v1i1.173.

T. Aditya and O. A. Dhewa, “Design and Implementation of Update Script in the IoT-Based Smart Indoor Farming System Module at PT Inastek Using Over-the-Air Programming,” Media Comput. Sci., vol. 1, no. 2, pp. 129–138, 2024, https://doi.org/10.69616/mcs.v1i2.201.

A. Selay et al., “Karimah Tauhid, Volume 1 Nomor 6 (2022), e-ISSN 2963-590X,” Karimah Tauhid, vol. 1, no. 2963–590X, pp. 861–862, 2022.

M. A. Juniawan and A. H. Rismayana, “PROTOTIPE SMART DOOR LOCK BERBASIS INTERNET OF THINGS ( STUDI KASUS LAB KOMPUTER POLITEKNIK TEDC BANDUNG ),” vol. 8, no. 5, pp. 10856–10861, 2024, https://doi.org/10.36040/jati.v8i5.11148.

M. Adedoyin and F. Olukoya, “Development of a Smart Lock System using QR Code Technology,” vol. 7, no. 2, pp. 484–492, 2024, https://doi.org/10.53982/ajerd.2024.0702.46-j.

H. Fereidouni, O. Fadeitcheva, and M. Zalai, “IoT and Man-in-the-Middle Attacks,” 2023.

J. Manullang, J. Tamba, and F. P. Sitohang, “Cryptography With One-Time Pad ( OTP ) Algorithm Xor Based,” vol. 3, no. 02, pp. 54–60, 2024, https://doi.org/10.58471/ju-ti.v3i02.664.

W. Adhiwibowo, A. M. Hirzan, and M. S. Suprayogi, “Peningkatan Keamanan Data End-To-End Smart Door Menggunakan Advanced Encryption Standard,” J. ELTIKOM, vol. 6, no. 2, pp. 186–194, 2022, doi: 10.31961/eltikom.v6i2.574, https://doi.org/10.31961/eltikom.v6i2.574.

A. Arianto, F. D. Hudaibah, N. Nurhalifah, M. Qippiah, and S. Bantun, “Learning Innovations in Coastal Areas Through Augmented Reality and Gamification,” J. Media Inf. Teknol., vol. 1, no. 2, pp. 95–102, 2024, https://doi.org/10.69616/mit.v1i2.193.

H. A. Wahid, J. Maulindar, and A. I. Pradana, “Rancang Bangun Sistem Penyiraman Tanaman Otomatis Aglonema Berbasis IoT Menggunakan Blynk dan NodeMCU 32,” Innov. J. Soc. Sci. Res., vol. 3, no. 2, pp. 6265–6276, 2023.

D. Setiawan, H. Jaya, S. Nurarif, T. Syahputra, and M. Syahril, “Implementasi Esp32-Cam Dan Blynk Pada Wifi Door Lock System Menggunakanteknik Duplex,” J. Sci. Soc. Res., vol. 5, no. 1, p. 159, 2022, https://doi.org/10.54314/jssr.v5i1.807.

Z. Avista and O. Fahlovi, “Rancang Bangun Smart Door Access Berbasis Fingerprint untuk Keamanan Ruang Laboratorium,” Venus J. Publ. Rumpun Ilmu Tek., vol. 2, no. 1, pp. 1–13, 2024, https://doi.org/10.61132/venus.v2i1.73.

M. `Toby S. Pratika, I. N. Piarsa, and A. A. K. A. C. Wiranatha, “Rancang Bangun Wireless Relay dengan Monitoring Daya Listrik Berbasis Internet of Things,” JITTER J. Ilm. Teknol. dan Komput., vol. 2, no. 3, p. 515, 2021, https://doi.org/10.24843/JTRTI.2021.v02.i03.p10.

M. Raudiah and E. Elfizon, “Perancangan Keamanan Brangkas Berbasis Arduino dan Android,” JTEIN J. Tek. Elektro Indones., vol. 1, no. 2, pp. 246–250, 2020, https://doi.org/10.24036/jtein.v1i2.80.

A. Fauzi and H. Sembiring, “Internet-Based Smart Door Design of Things ( IOT ) with Visitor Access Controller Indoor,” vol. 4, no. 1, pp. 1–8, 2024, https://doi.org/10.59934/jaiea.v4i1.566.

A. Herlan, I. Fitri, and R. Nuraini, “Rancang Bangun Sistem Monitoring Data Sebaran Covid-19 Secara Real-Time menggunakan Arduino Berbasis Internet of Things (IoT),” J. JTIK (Jurnal Teknol. Inf. dan Komunikasi), vol. 5, no. 2, p. 206, 2021, https://doi.org/10.35870/jtik.v5i2.212.

M. E. Hashimyar, M. Aiash, A. Khoshkholghi, and G. Nalli, “Signature-Based Security Analysis and Detection of IoT Threats in Advanced Message Queuing Protocol,” Network, vol. 5, no. 1, 2025, https://doi.org/10.3390/network5010005.

D. B. KalaiSelvi and A. K, “Network Traffic Analysis Using Wireshark,” Int. J. Res. Publ. Rev., vol. 4, no. 12, pp. 1960–1965, 2023, https://doi.org/10.55248/gengpi.4.1223.123506.

M. R. Fahlevi, D. Ridha, D. Putri, and R. Doni, “Teknik Keamanan File Teks Menggunakan Kriptografi Dengan Algoritma One Time Pad Cipher,” J. Sains Komput. Inform. (J-SAKTI, vol. 4, no. 2, pp. 588–597, 2020.

A. A. Permana, R. Taufiq, and R. Destriana, “Implementasi Aplikasi Pengamanan Pesan Gambar Menggunakan Algoritma One Time Pad,” Proceeding SENDIU 2021, pp. 978–979, 2021.

I. Meyasha, S. Widyastuti, and R. Maulana, “Penerapan Algoritma Vernam Cipher Dan Base64 Untuk Keamanan Data Pernikahan Pada Kua Kecamatan Harjamukti,” vol. 18, no. 2, pp. 12–22, 2025.

Published

2025-10-15

How to Cite

Asrofa, M. D., Bahri, S. ., & Kasliono, K. (2025). One-Time Pad Cryptography for Secure Data Transmission in IoT Smart Door Using QR Code. Jurnal Media Informasi Teknologi, 2(2), 133-148. https://doi.org/10.69616/mit.v2i2.248