DL-SITM: Deep Learning-Based See-in-the-Middle Attack on AES

Tomas Gerlich, Jakub Breier, Pavel Sikora, Zdenek Martinasek, Aron Gohr, Anubhab Baksi, Xiaolu HouIACR ePrint 2024

Abstract

This paper introduces DL-SITM, an automated side-channel attack framework that enhances the See-in-the-Middle (SITM) technique using deep learning. By employing a Convolutional Neural Network (CNN) to identify differential patterns in power traces, DL-SITM overcomes the traditional requirements for manual inspection and extensive trace averaging. Experimental results on an ATMega8515 smart card demonstrate that the attack maintains high accuracy (99.7%) even with minimal averaging and significant timing jitter, enabling full key recovery of AES-128 in less than 24 hours.

Introduction

Side-channel analysis (SCA) exploits physical leakages, such as power consumption, to extract cryptographic keys. The See-in-the-Middle (SITM) attack is a sophisticated method that merges differential cryptanalysis with SCA to identify collisions deep within a cipher's rounds. Despite its theoretical strength, practical application has been hindered by three major "real-world" challenges: the human bottleneck of manual trace inspection, the high noise levels requiring extensive trace averaging, and the effectiveness of timing jitter as a countermeasure.

The See-in-the-Middle Attack

The core of the SITM attack lies in tracking how specific input differences propagate through the rounds of AES. By observing the power consumption at points of interest (POI), an attacker can detect whether a predicted differential pattern has occurred.

Differential propagation through standard AES round functions.

As illustrated in Figure 1, a single-byte difference introduced at the beginning of a round propagates through the SubBytes (SB), ShiftRows (SR), and MixColumns (MC) operations. The linear nature of the MixColumns step ensures that a single active byte in an input column results in a full active column in the output, creating a distinct signature in the device's power profile.

Deep Learning Methodology

DL-SITM automates the detection of these signatures by replacing manual inspection with a CNN. The network is designed to classify differential traces into five distinct categories: four corresponding to the specific active columns resulting from successful differential propagation, and one "null" class for non-matching traces.

The four differential patterns targeted by the CNN classifier.

Figure 3 details the four target patterns ($\Delta S$). The CNN architecture was optimized using Bayesian optimization (via Keras Tuner) to determine ideal hyperparameters, such as kernel sizes and learning rates. This automated search ensures the model is robust enough to handle the non-linear features of hardware leakage and the spatial shifts caused by timing countermeasures.

Experimental Results and Resilience

The researchers evaluated DL-SITM using power traces from an ATMega8515 smart card mounted on Sasebo Sakura G and W boards. A key finding was the model's exceptional performance under noisy conditions. While traditional SITM required averaging 1,000 traces to make patterns visible to humans, the CNN achieved 99.7% accuracy with only 4-fold averaging. Interestingly, performance slightly decreased with 1,024-fold averaging, suggesting that heavy averaging may strip away fine-grained features the CNN relies on.

Furthermore, the model demonstrated significant resilience to timing jitter. Because CNNs possess inherent spatial invariance, DL-SITM maintained a high F1-score of 0.974 even with a jitter of ±15 samples. In a practical attack scenario, the method reduced the AES-128 key search space to approximately $2^{43}$ candidates, allowing for full recovery in less than a day on a standard 12-core PC.

Conclusion

DL-SITM represents a significant advancement in side-channel cryptanalysis, proving that deep learning can effectively bypass noise and temporal countermeasures that stymie traditional manual attacks. While the current approach requires a profiling stage with an identical device, its ability to automate key recovery in the presence of jitter makes it a powerful tool for evaluating hardware security. Future work will explore the effectiveness of this approach against more complex protections such as masking and shuffling.

Summary updated

BibTeX
@article{gerlich2024dl,
  author = {Tomas Gerlich and Jakub Breier and Pavel Sikora and Zdenek Martinasek and Aron Gohr and Anubhab Baksi and Xiaolu Hou},
  title = {{DL-SITM: Deep Learning-Based See-in-the-Middle Attack on AES}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2024},
}
Figure