Department of Computer Science, Faculty of Engineering, Dayananda Sagar Academy of Technology and Management, Bangalore, India.
International Journal of Science and Research Archive, 2025, 15(03), 1748-1760
Article DOI: 10.30574/ijsra.2025.15.3.1925
Received on 15 May 2025; revised on 23 June 2025; accepted on 25 June 2025
With the increasing adoption of IoT in critical sectors such as automobiles and healthcare, ensuring secure communication has become imperative. This paper presents a prototype system for securing MQTT-based communication using AES and XOR encryption mechanisms on a Raspberry Pi-based sensor platform. The system encrypts sensor data before transmission and decrypts it upon reception, mitigating risks like man-in-the-middle attacks.
We compare the impact of encryption schemes on performance metrics such as latency, throughput, and packet loss using tools like Wireshark, iperf3, and MQTT logs. Real-time data from a DHT11 sensor is collected and analyzed under multiple test scenarios. Results show a trade-off between security and performance, with AES providing higher security and XOR offering lower latency. The system architecture, design decisions, and testing strategies are detailed in this paper. The proposed solution serves as a secure and efficient IoT framework for real-world applications in sensitive domains.
IoT; MQTT; AES; XOR; Raspberry Pi; Encryption; Man-in-the-middle attack; Latency; Packet loss; Wireshark; Iperf3
Preview Article PDF
Dr Nandini C, Jyothis K P, Ramyashree R C and Divya S. Securing MQTT-based communication for the automobile and medical industries against man-in- the-middle attacks. International Journal of Science and Research Archive, 2025, 15(03), 1748-1760. Article DOI: https://doi.org/10.30574/ijsra.2025.15.3.1925.
Copyright © 2025 Author(s) retain the copyright of this article. This article is published under the terms of the Creative Commons Attribution Liscense 4.0