Comparative Analysis of AES-GCM and ChaCha20-Poly1305 in IoT Data Encryption Based on ESP32 - Dwi Dinda Meylani Angelina; Ronald David Marcus (Jurusan Teknologi Informasi Politeknik Negeri Jember, 2026)
Internet of Things (IoT) devices have become integral to modern applications, yet their resource constraints pose significant challenges for implementing robust security measures. While AES-GCM and ChaCha20-Poly1305 are widely recognized Authenticated Encryption with Associated Data algorithms, their comparative performance on resource-limited microcontrollers like ESP32 remains underexplored, particularly regarding execution time, memory usage, power consumption, and throughput. This research aims to conduct a comprehensive performance analysis of both algorithms for securing IoT data transmission on ESP32-WROOM-32D microcontrollers. The study implements both algorithms using Arduino IDE 2.3.6, leveraging ESP32's hardware acceleration for AES-GCM and optimized software implementation for ChaCha20-Poly1305. Performance evaluation encompasses various payload sizes (16, 64, and 256 bytes) with precise measurements of execution time using micros() function, memory usage via ESP.getFreeHeap(), and power consumption through shunt resistor analysis. The results reveal distinct performance characteristics between the two algorithms across all evaluated metrics, providing valuable comparative insights for IoT developers to select optimal cryptographic solutions based on specific application requirements and resource constraints, thereby enhancing security implementation on embedded systems.