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

TL;DR

This paper introduces CGAN-SCA, a framework that uses Conditional Generative Adversarial Networks to perform high-efficiency side-channel attacks on "black-box" devices. By learning from a different, fully controlled "reference" device, the framework allows attackers to extract secret keys even when they cannot access the internal masking randomness of the target hardware.

Introduction: The Challenge of Black-Box Side-Channel Analysis

In the field of hardware security, Profiling Side-Channel Analysis (SCA) is considered the "worst-case" attack scenario. It typically assumes an attacker has a clone of the target device (a profiling device) that they can fully control—allowing them to observe internal "masks" (random values used to hide secret data).

However, real-world secure devices often feature "life cycle protections" that lock out debug and test modes. This leaves the attacker with a black-box target where internal masks are invisible. Standard profiling attacks struggle in this setting because they cannot easily learn the relationship between noisy power consumption and hidden, masked data. The authors aim to close the performance gap between easy "white-box" lab evaluations and difficult "black-box" real-world attacks.

Methodology: The CGAN-SCA Framework

The authors propose a novel Conditional GAN (CGAN) architecture that acts as a sophisticated feature extractor. Unlike a standard GAN, a CGAN incorporates conditional information to guide the generation process.

Comparison between standard GAN (a) and Conditional GAN (b) architectures, showing how the latter incorporates labels (Y) to condition the output.

The framework operates through a multi-stage process:

  1. The Reference Device: The attacker sets up a "reference" implementation on a device they can control (e.g., a different microcontroller running the same algorithm). This creates a "gold standard" set of leaky features ($f_{ref}$) where the masks are known.
  2. The Generator ($G$): Unlike a standard GAN that starts with random noise, this generator takes raw power/EM traces from the target device ($X_{target}$) as input. Its goal is to transform these traces into a set of features ($f_{target}$) that follow the same statistical distribution as the reference features.
  3. The Discriminator ($D$): The discriminator is trained to distinguish between the "real" reference features and the "fake" generated features, conditioned on the known S-box output (the label).
  4. Feature Translation: Through this adversarial process, the Generator learns to "translate" the complex, high-order leakages from the target device into a simplified format that a standard profiling model can easily digest.
The complete CGAN-SCA framework and profiling attack pipeline, illustrating the flow from reference data to key recovery.

Experimental Setup and Datasets

The study evaluates the framework across five popular public AES-128 datasets, often using one as a reference to attack another:

  • ASCADf & ASCADr: Standard benchmarks based on 8-bit AVR microcontrollers.
  • DPAv4.2: Uses a different masking scheme (RSM) on an 8-bit MIPS architecture.
  • CHES CTF 2018: A 32-bit ARM Cortex-M4 implementation.
  • ESHARD-AES128: A 32-bit ARM implementation featuring both masking and operation shuffling.

Key Insights and Interpretability

  • Domain Adaptation: The core "magic" is that the generator learns to find the "leaky" points in a black-box trace by mimicking the distribution of a white-box reference. It effectively performs "feature translation" across different hardware architectures.
  • Relaxed Threat Model: An identical clone of the target is not required. As long as the reference device uses a similar type of countermeasure (e.g., Boolean masking) and word size (e.g., 8-bit), the CGAN can bridge the gap.
  • Interpretability with LRP: Using Layer-wise Relevance Propagation (LRP), the authors proved the generator learns to focus on the specific time samples in the power trace where the secret shares are processed.
  • Efficiency in Search: Finding a working deep learning model for black-box SCA is notoriously difficult. The authors found that once the CGAN extracts the features, finding a successful attack model becomes nearly trivial.

Results and Performance

The CGAN-SCA framework consistently outperformed standard black-box deep learning (BBDL) and rivaled the performance of "worst-case" white-box attacks:

  • Success Rate: In attacking the DPAv4.2 dataset using ASCADr as a reference, the hyperparameter search success rate jumped from 0.74% (standard BBDL) to 65.07% (CGAN-SCA).
  • Trace Efficiency: For many targets, the attack recovered the key using significantly fewer traces than standard black-box methods, often matching the efficiency of attacks that had full access to mask shares.
  • Cross-Architecture Robustness: The framework successfully attacked 32-bit ARM targets using 8-bit AVR devices as references, proving its robustness against architectural differences.

Limitations and Future Work

While the framework handles different chips well, it performs best when devices have similar word sizes. The authors suggest that extreme differences might limit "knowledge transfer." Future work will explore CNN-based generators to handle desynchronized (jittery) traces and investigate adapting this feature extraction capability to non-profiling settings where no training data is available.

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