Dynamic Key Replacement Mechanism for Lightweight Internet of Things Microcontrollers to Resist Side-Channel Attacks

Chung‐Wei Kuo, Wei Wei, Chun‐Chang Lin, Yu-Yi Hong, Jia-Ruei Liu, Kuo‐Yu TsaiFuture 2025 · DOI

TL;DR

This paper introduces a novel dynamic key replacement mechanism for IoT devices that uses Moving Target Defense (MTD) and a lightweight Diffie-Hellman (D-H) key exchange with AES-128 encryption. This approach significantly enhances security against side-channel attacks (SCAs) by continuously updating encryption keys, making it much harder for attackers to compromise sensitive data on resource-constrained devices.

What Problem Does This Paper Address?

The proliferation of Internet of Things (IoT) devices, especially in smart home and industrial settings, means more sensitive data is being transmitted over potentially insecure environments. These devices, often using lightweight microcontrollers, are vulnerable to Side-Channel Attacks (SCAs). SCAs exploit physical emanations from the device (like power consumption or electromagnetic radiation) to infer secret encryption keys, bypassing traditional cryptographic security. Existing defenses often require significant hardware modifications or computational overhead, making them unsuitable for many IoT applications. This paper aims to provide a software-based solution that is both secure and efficient for these resource-constrained devices.

Methods

The core of the proposed solution is a dynamic key replacement mechanism for AES-128 encryption. This mechanism integrates two key concepts:

  • Moving Target Defense (MTD): Instead of using a static encryption key, the key is dynamically updated after each cryptographic operation or a small set of operations. This makes it difficult for attackers to build a stable profile of the device's behavior.
  • Lightweight Diffie-Hellman (D-H) Key Exchange: To generate new keys securely and efficiently, the paper employs a simplified D-H protocol. This protocol allows the IoT device and the server to establish a shared secret key over an insecure channel without prior key sharing, using carefully chosen parameters (G=37, P=2,147,483,647) that balance security and computational cost for microcontrollers.

The process involves an initial key (Key[0]) for the first connection, followed by D-H to generate a hopping operator d[0]. This operator, along with Key[0], is then used in a custom HashAESKey method to derive the next encryption key (Key[1]), and this process repeats for subsequent transmissions.

Datasets

Not discussed in the paper. The experiments involved a custom-built IoT access control system and simulated attack scenarios.

Key Insights and Ideas

  • Key Reuse is the Achilles' Heel: The paper strongly emphasizes that the vulnerability to SCAs often stems from the reuse of encryption keys, not necessarily the key length itself. This highlights the importance of dynamic key management.
  • MTD + Lightweight Crypto = Sweet Spot: The seamless integration of Moving Target Defense principles with lightweight cryptographic protocols like D-H and AES-128 offers a powerful combination for IoT security. It achieves a balance between robust security and minimal resource consumption.
  • D-H is Viable for IoT: The paper demonstrates that a carefully parameterized D-H key exchange can be implemented effectively on resource-constrained microcontrollers, providing a secure foundation for dynamic key generation.
  • Frequency Matters: The effectiveness of dynamic key replacement is directly proportional to its frequency. Replacing keys more often drastically reduces an attacker's ability to compromise them.

Key Results

  • Time Efficiency: Key updates introduce a minimal time overhead, ranging from 12 to 50 milliseconds per encryption transmission, which is considered negligible compared to user interaction times in typical applications.
  • SCA Resilience:
    • Without any protection, an attacker could recover all 16 AES-128 subkeys with approximately 55 traces.
  • With key replacement every 50 operations, 12 subkeys were recovered.
  • With replacement every 30 operations, 8 subkeys were recovered.
  • With replacement every 10 operations, only 2 subkeys were compromised.
  • With replacement after every single encryption cycle, the attacker's success was limited to just 2 subkeys after 20,000 attack attempts.
  • Scalability: Testing with five additional devices showed only a 3-millisecond increase in average communication latency during key negotiation, indicating good scalability for dense IoT environments.

Limitations and Future Work

  • Authentication: The proposed D-H protocol does not inherently provide explicit authentication. The paper suggests integrating digital signatures or certificate-based authentication to mitigate man-in-the-middle (MITM) attacks.
  • Integrity: While the shared key is secure, the integrity of transmitted data could be further enhanced by incorporating a Message Authentication Code (MAC).
  • Future Work: The authors suggest exploring further enhancements, such as time-sensitive parameters or nonces, to prevent replay attacks and potentially integrating more advanced SCA countermeasures. The applicability to other lightweight cryptographic algorithms is also mentioned.

Summary updated

Abstract

5G technology and IoT devices are improving efficiency and quality of life across many sectors. IoT devices are often used in open environments where they handle sensitive data. This makes them vulnerable to side-channel attacks (SCAs), where attackers can intercept and analyze the electromagnetic signals emitted by microcontroller units (MCUs) to expose encryption keys and compromise sensitive data. To address this critical vulnerability, this study proposes a novel dynamic key replacement mechanism specifically designed for lightweight IoT microcontrollers. The mechanism integrates Moving Target Defense (MTD) with a lightweight Diffie–Hellman (D-H) key exchange protocol and AES-128 encryption to provide robust protection against SCAs. Unlike traditional approaches, the proposed mechanism dynamically updates encryption keys during each cryptographic cycle, effectively mitigating the risk of key reuse—a primary vulnerability exploited in SCAs. The lightweight D-H key exchange ensures that even resource-constrained IoT devices can securely perform key exchanges without significant computational overhead. Experimental results demonstrate the practicality and security of the proposed mechanism, achieving key updates with minimal time overhead, ranging from 12 to 50 milliseconds per encryption transmission. Moreover, the approach shows strong resilience against template attacks, with only two out of sixteen AES-128 subkeys compromised after 20,000 attack attempts—a notable improvement over existing countermeasures. The key innovation of this study lies in the seamless integration of MTD with lightweight cryptographic protocols, striking a balance between security and performance. This dynamic key replacement mechanism offers an effective, scalable, and resource-efficient solution for IoT applications, particularly in scenarios that demand robust protection against SCAs and low-latency performance.
BibTeX
@inproceedings{kuo2025dynamic,
  author = {Chung‐Wei Kuo and Wei Wei and Chun‐Chang Lin and Yu-Yi Hong and Jia-Ruei Liu and Kuo‐Yu Tsai},
  title = {{Dynamic Key Replacement Mechanism for Lightweight Internet of Things Microcontrollers to Resist Side-Channel Attacks}},
  booktitle = {Future},
  year = {2025},
  doi = {10.3390/fi17010043},
}
Figure