The Message Queuing Telemetry Transport (MQTT) protocol is widely used in Internet of Things (IoT) systems due to its lightweight communication mechanism and low resource consumption. However, MQTT does not provide built-in security features, making data transmission vulnerable to packet sniffing and data manipulation attacks. This study aims to analyze the impact of Transport Layer Security (TLS) implementation on the security and performance of MQTT communication in an ESP32-C3 Super Mini-based IoT system. An experimental method was employed by comparing MQTT communication without TLS (port 1883) and with TLS (port 8883) using the HiveMQ Cloud broker. Performance evaluation was conducted by measuring latency and packet size, while security analysis was performed through packet sniffing using Wireshark. The results show that TLS successfully encrypts MQTT payloads, preventing unauthorized access to transmitted data. However, TLS introduces communication overhead, increasing the average latency from 45.25 ms to 51.76 ms (14.39%) and the average packet size from 79 bytes to 103.2 bytes (30.63%) due to the TLS handshake process and encryption mechanism. Despite these increases, the communication performance remained stable and consistent, indicating an acceptable trade-off between security and performance. These findings demonstrate that TLS is a feasible solution for securing MQTT communication in ESP32-based IoT systems while maintaining reliable communication performance.
Copyrights © 2026