It's a Kind of Magic: A Novel Conditional GAN Framework for Efficient Profiling Side-Channel Analysis

Sengim Karayalcin, Marina Krcek, Lichao Wu, Stjepan Picek, Guilherme Perin

Introduction

Profiling attacks represent the most potent class of Side-Channel Analysis (SCA), typically assuming a "worst-case" scenario where an adversary possesses a fully controlled "clone" of the target device. In such white-box settings, the attacker can access internal "masks"—random values used to obfuscate secret data. However, real-world security evaluations often face black-box constraints where these masks are inaccessible, significantly degrading the performance of standard deep learning models.

This paper introduces CGAN-SCA, a framework designed to bridge the gap between white-box and black-box profiling. By leveraging Conditional Generative Adversarial Networks (CGANs), the authors demonstrate that it is possible to extract high-quality, "de-masked" features from a locked-down target device by training against a reference device, making black-box attacks nearly as effective as their white-box counterparts.

Methodology: The CGAN-SCA Framework

The core innovation lies in using a CGAN to perform non-linear dimensionality reduction and feature extraction. The framework operates through a knowledge transfer process between a reference device (white-box) and a target device (black-box).

Architecture

The system consists of two primary components:

  1. The Generator: This component receives raw traces from the target device. Its objective is to transform these traces into a feature set that mimics the "leaky" characteristics of the reference device. Notably, the generator operates without direct access to labels or masks during the transformation.
  2. The Discriminator: Acting as the "teacher," the discriminator receives both real features (from the reference device) and fake features (from the generator), along with their corresponding intermediate labels. It attempts to distinguish between the two, forcing the generator to produce features that are statistically indistinguishable from those known to contain secret information.
Comparison of standard GAN (a) and the proposed CGAN (b) architectures for side-channel analysis.

Through this adversarial training, the generator learns to isolate secret-carrying features while ignoring algorithmic noise introduced by masking, effectively "de-masking" the signal.

Experimental Evaluation

The authors evaluated CGAN-SCA across five diverse AES-128 software implementation datasets, covering different microcontrollers and countermeasures:

  • ASCADr & ASCADf: EM leakages from an 8-bit AVR microcontroller.
  • DPAv4.2: Power leakages from an 8-bit AVR with a distinct masking scheme.
  • CHES CTF 2018: Power leakages from a 32-bit ARM Cortex-M4.
  • ESHARD-AES128: EM leakages from a 32-bit ARM Cortex-M4 featuring shuffling countermeasures.

Key Results and Insights

The framework demonstrated remarkable efficiency and portability:

  • Performance Gains: In the DPAv4.2 dataset, where standard black-box deep learning often fails within 2,000 traces, CGAN-SCA successfully recovered the secret key using as few as 1 to 3 traces.
  • Search Success Rate: Finding effective hyperparameters for deep learning in SCA is notoriously difficult. CGAN-SCA increased the "search success rate" from a meager 0.74% to over 65% in specific datasets.
  • Cross-Architecture Portability: A significant finding was the framework's ability to transfer knowledge across different architectures. The authors successfully attacked a 32-bit ARM target using an 8-bit AVR reference, provided the word size and masking logic were comparable.
  • Interpretability: Using Layer-wise Relevance Propagation (LRP), the authors confirmed that the Generator precisely targets time samples corresponding to the processing of secret shares, validating that the model learns physical leakage patterns rather than statistical artifacts.

Conclusion and Future Directions

CGAN-SCA effectively elevates black-box attacks to the level of white-box "worst-case" scenarios. While currently optimized for synchronized traces using Multi-Layer Perceptrons (MLPs), future work aims to integrate Convolutional Neural Networks (CNNs) to handle desynchronized data and extend the framework to higher-order masking schemes. Despite the inherent complexity of GAN training, the resulting efficiency in the attack phase marks a significant advancement in practical security assessment.

Summary updated

BibTeX
@inproceedings{karayalcin2024it,
  author = {Sengim Karayalcin and Marina Krcek and Lichao Wu and Stjepan Picek and Guilherme Perin},
  title = {{It's a Kind of Magic: A Novel Conditional GAN Framework for Efficient Profiling Side-Channel Analysis}},
  booktitle = {ASIACRYPT},
  year = {2024},
  doi = {10.1007/978-981-96-0944-4\_4},
}
Figure