An Enhanced Convolutional Neural Network in Side-Channel Attacks and Its Visualization

Minhui Jin, Mengce Zheng, Honggang Hu, Nenghai YuarXiv 2020 · arXiv

Abstract

This paper introduces an "Attention Network," a ResNet-based Convolutional Neural Network (CNN) enhanced with a Convolutional Block Attention Module (CBAM), designed to improve the efficiency of side-channel attacks (SCA). By selectively focusing on informative "leakage" points in power or electromagnetic traces while suppressing noise, the model significantly outperforms existing benchmarks. Additionally, the authors propose Class Gradient Visualization (CGV), a novel method to interpret the network's internal decision-making process and verify that it learns cryptographic secrets rather than environmental artifacts.

Introduction

In hardware security, Side-Channel Attacks (SCA) exploit physical leakages—such as power consumption or electromagnetic emissions—to extract secret keys from cryptographic implementations. While deep learning has automated feature extraction in this domain, models often struggle with high noise levels and the "black box" problem, where it is unclear if the network is identifying actual cryptographic leakage or overfitting to noise. This research addresses these challenges by building a model that selectively attends to critical trace segments and providing a visualization tool to validate its focus.

Proposed Methodology

The researchers propose two major innovations: the Attention Network architecture and the Class Gradient Visualization (CGV) technique.

The Attention Network

Departing from standard VGG-like architectures, the proposed model adopts a Residual Network (ResNet) structure integrated with a Convolutional Block Attention Module (CBAM). The ResNet backbone helps mitigate the degradation problem in deep networks, while the CBAM acts as a dynamic filter through two stages:

  1. Channel Attention: Identifies which feature maps (filters) contain the most meaningful information.
  2. Spatial Attention: Pinpoints where in the 1D trace the most informative Points of Interest (PoI) are located.
The overall architecture of the proposed Attention Network, showcasing the integration of residual blocks and attention modules.
A detailed view of the first residual block combined with the attention mechanism, highlighting the sequential channel and spatial attention processes.

Class Gradient Visualization (CGV)

To address the interpretability of 1D SCA models, the authors developed CGV. Unlike standard tools like Grad-CAM, CGV is optimized for 1D traces and the specific pooling layers used in this architecture. It computes the gradient of the predicted class score with respect to the features in the final pooling layer, creating a "weight map" that highlights the input segments most influential to the model's prediction.

Experimental Setup and Datasets

The model was validated against four public AES-based datasets featuring common countermeasures:

  • DPAcontest v4: Software implementation with Rotating Sbox Masking (RSM).
  • AES_RD: Software implementation with random delays causing desynchronization.
  • AES_HD: Hardware implementation (FPGA) with high environmental and algorithmic noise.
  • ASCAD: The standard benchmark for masked AES implementations.

Key Results and Insights

The Attention Network consistently required fewer traces to recover secret keys compared to the state-of-the-art ASCAD network and traditional Template Attacks (TA):

  • Desynchronization (AES_RD): The Attention Network succeeded with only 171 traces, compared to 247 for the ASCAD network; traditional TA failed even with 20,000 traces.
  • High Noise (AES_HD): The Attention Network recovered the key with 2,100 traces, while both the ASCAD network and TA failed after 25,000 traces.
  • Masking (ASCAD): The model required 552 traces, outperforming the benchmark's 769 traces.

Visualization via CGV confirmed a strong correlation between the model's focus and traditional Correlation Power Analysis (CPA) results, proving that the attention mechanism successfully steers the model toward actual cryptographic leakages.

Conclusion

The integration of attention mechanisms into ResNet architectures provides a powerful tool for side-channel analysis, effectively increasing the signal-to-noise ratio of input data. While the model shows superior performance, future work may explore more universal architectures to reduce hyperparameter sensitivity and investigate alternative attention mechanisms like Transformers for even greater robustness against complex real-world countermeasures.

Summary updated

Abstract

In recent years, the convolutional neural networks (CNNs) have received a lot of interest in the side-channel community. The previous work has shown that CNNs have the potential of breaking the cryptographic algorithm protected with masking or desynchronization. Before, several CNN models have been exploited, reaching the same or even better level of performance compared to the traditional side-channel attack (SCA). In this paper, we investigate the architecture of Residual Network and build a new CNN model called attention network. To enhance the power of the attention network, we introduce an attention mechanism - Convolutional Block Attention Module (CBAM) and incorporate CBAM into the CNN architecture. CBAM points out the informative points of the input traces and makes the attention network focus on the relevant leakages of the measurements. It is able to improve the performance of the CNNs. Because the irrelevant points will introduce the extra noises and cause a worse performance of attacks. We compare our attention network with the one designed for the masking AES implementation called ASCAD network in this paper. We show that the attention network has a better performance than the ASCAD network. Finally, a new visualization method, named Class Gradient Visualization (CGV) is proposed to recognize which points of the input traces have a positive influence on the predicted result of the neural networks. In another aspect, it can explain why the attention network is superior to the ASCAD network. We validate the attention network through extensive experiments on four public datasets and demonstrate that the attention network is efficient in different AES implementations.
BibTeX
@misc{jin2020enhanced,
  author = {Minhui Jin and Mengce Zheng and Honggang Hu and Nenghai Yu},
  title = {{An Enhanced Convolutional Neural Network in Side-Channel Attacks and Its Visualization}},
  year = {2020},
  eprint = {2009.08898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.08898},
}
Figure