TL;DR
This paper provides the first experimental comparison of DTLS/TLS 1.3 versus 1.2 on low-power IoT microcontrollers, revealing that the newer protocols offer significant improvements with only a minor, often negligible, increase in resource usage. The findings suggest that adopting TLS/DTLS 1.3 is feasible for resource-constrained IoT devices, with potential for further optimization.
What Problem Does This Paper Address?
The Internet of Things (IoT) is rapidly expanding, bringing with it a growing need for robust security. Standard protocols like TLS and DTLS are crucial for securing communications to and from these devices. While TLS 1.3 has been standardized and DTLS 1.3 is nearing completion, there's a significant knowledge gap regarding their performance on resource-constrained IoT devices, which are characterized by limited memory (RAM and Flash) and power. Existing security recommendations often mandate TLS/DTLS, but the practical implications of adopting the newer 1.3 versions on these devices, which are fundamentally different from typical computers, remain largely unquantified. This paper aims to bridge this gap by providing the first experimental analysis of DTLS/TLS 1.3 performance on real low-power microcontrollers.
Methods
The authors conducted a comprehensive experimental evaluation of DTLS/TLS 1.2 and 1.3 on actual IoT hardware. Their methodology involved:
- Protocol Overview: A detailed explanation of the new features and changes in TLS/DTLS 1.3 compared to its predecessor.
- Experimental Setup: Utilizing three different Arm Cortex M-based microcontrollers (nRF52840-DK, IoT-Lab M3 Node, and Keil MCBSTM32F400) to represent a range of low-power IoT devices.
- Software Implementations: Testing with multiple open-source implementations: WolfSSL (version 4.4.0), Mbed TLS (version 2.16), and their own custom DTLS 1.3 implementation.
- Configuration Variations: Evaluating different protocol versions (TLS/DTLS 1.2 vs. 1.3), authentication and key exchange profiles (PSK-based vs. ECDSA-ECDHE-based), and key sizes (128-bit vs. 256-bit for AES).
- Measurement Metrics: Quantifying performance based on:
- Stack and heap size requirements.
- Code size (Flash memory footprint).
- Over-the-wire network traffic overhead.
- Energy consumption.
- Application Layer: The experiments were performed on top of the CoAP protocol, a common choice for IoT communication.
Datasets
Not discussed in the paper. The experiments were conducted using custom-built applications and configurations on real hardware, rather than relying on pre-existing datasets for training or evaluation.
Key Insights and Ideas
- TLS/DTLS 1.3 is Feasible for IoT: The most significant takeaway is that TLS/DTLS 1.3 can be adopted on low-power microcontrollers without a prohibitive increase in resource requirements.
- Minor Resource Overhead: While some configurations of TLS/DTLS 1.3 do require slightly more Flash memory (around 20% increase), the impact on RAM is often negligible or even shows decreases in some cases.
- PSK is King for Low-Power: The performance difference between PSK-based authentication and ECDHE-ECDSA is stark, especially in terms of energy consumption. PSK is dramatically more efficient, making it the preferred choice for battery-powered IoT devices.
- Implementation Matters: Different libraries (WolfSSL, Mbed TLS) exhibit varying performance characteristics, highlighting the importance of choosing the right implementation for specific resource constraints.
- Protocol vs. Crypto: The study reveals that the cryptographic primitives themselves (symmetric vs. asymmetric) and their implementations can contribute a substantial portion of the overall code size and energy footprint, sometimes even rivaling the TLS protocol code itself.
- Optimization Potential: Despite the improvements, there's still room for optimization in existing implementations and further development of features like certificate compression.
Key Results
- Flash Memory: Mbed TLS showed approximately a 20% increase in Flash memory for TLS/DTLS 1.3 compared to 1.2 across various configurations.
- RAM Footprint: Impact on RAM was mixed. Some configurations showed increases (up to 25% for heap), while others, particularly with ECDHE, showed decreases (up to 30%).
- Bytes Over the Air: For TLS, there was a slight increase (around 10%), but for DTLS, PSK configurations showed a decrease (25% less), and ECDHE-ECDSA also decreased (15% less).
- Energy Consumption: The difference between PSK and ECDHE-ECDSA was dramatic. DTLS 1.2 with ECDHE-ECDSA consumed over 40 times more energy than DTLS 1.2 with PSK AES-128.
- Code Size Breakdown: For TLS 1.3 PSK with AES-128-CCM, symmetric crypto and the TLS protocol itself each accounted for roughly 33% and 21% of the Flash footprint, respectively. For ECDSA-ECDHE, asymmetric crypto and X.509 code became dominant, taking up 42% and 18% respectively.
Limitations and Future Work
- Hardware Crypto Acceleration: The study did not leverage hardware crypto acceleration capabilities of some microcontrollers (like the nRF52840-DK), which could significantly alter performance metrics.
- Configuration Complexity: The authors note that configuring different libraries to be comparable and achieve optimal resource utilization can be tricky.
- Future Work:
- Investigating the impact of hardware crypto acceleration.
- Exploring other security solutions like OSCORE and EDHOC for comparison.
- Further optimizing TLS/DTLS 1.3 implementations, particularly for certificate-related aspects and exploring features like compact TLS.
- Evaluating the performance of newly developed extensions for TLS/DTLS.
Summary updated