Deep Learning-Based Side-Channel Analysis Against AES Inner Rounds

Sudharshan Swaminathan, Lukasz Chmielewski, Guilherme Perin, Stjepan Picek

In the world of hardware security, the Advanced Encryption Standard (AES) is the gold standard. However, even mathematically "perfect" encryption can leak secrets through physical side channels like power consumption. Traditionally, attackers focus on the first or last rounds of AES because they are the easiest to crack. This paper by Swaminathan et al. explores a more challenging frontier: attacking the inner rounds using Deep Learning.

TL;DR

This paper generalizes side-channel attacks (SCA) against the intermediate rounds of AES-128, demonstrating that Deep Learning-based SCA (DL-SCA) significantly outperforms traditional Correlation Power Analysis (CPA). While traditional methods struggle as the "guess space" grows exponentially in deeper rounds, DL-SCA can recover keys from the second and third rounds with remarkably few traces, even in the presence of noise and misalignment.

What Problem Does This Paper Address?

Most side-channel attacks target the "outer rounds" (Round 1 or Round 10) because the intermediate values depend on only a small portion of the secret key (usually 8 bits). Because of this, designers often focus their expensive countermeasures—like masking or shuffling—only on these outer rounds, leaving the "inner rounds" unprotected.

The challenge is that as you move deeper into the AES algorithm, the "diffusion" property kicks in. A single byte in Round 3 depends on many more bytes of the original key than a byte in Round 1. To attack these rounds, an attacker must guess 16, 24, or even 32 bits of information simultaneously. This creates a massive computational bottleneck for traditional statistical attacks like CPA.

Methods

The authors compare two primary approaches:

  1. Correlation Power Analysis (CPA): A standard statistical method that correlates a power model (hypothesis) with actual measured power traces.
  2. Deep Learning-based SCA (DL-SCA): Using a Convolutional Neural Network (CNN) with a VGG-like architecture.

The Innovation: The authors provide a mathematical generalization for computing hypothesis values for any byte in the intermediate rounds. They show that by fixing specific plaintext bytes, they can reduce the complexity of inner-round attacks.

For the DL-SCA approach, they use a "profiled" attack. This means the attacker has a copy of the target device to "train" the network on how specific data processing looks in the power traces before attempting to steal the key from the actual target.

Datasets

The researchers used power traces captured from a Pinata development board (featuring an ARM Cortex-M4 based STM32F4 microcontroller).

  • Traces: They collected 10,000 traces for Round 2 attacks and 3,000 traces for Round 3.
  • Synthetic Noise: To simulate real-world conditions, they added Gaussian noise and artificial misalignment to the captured traces to see how the models would hold up.

Key Insights and Ideas

  • The Complexity Wall: In Round 1, you guess 8 bits ($2^8 = 256$ possibilities). By Round 3, you are effectively guessing 24 bits ($2^{24} \approx 16$ million possibilities).
  • DL’s Secret Weapon: The "Aha!" moment is that while the attack phase of CPA becomes computationally expensive (brute-forcing 16 million correlations), the training phase of a Deep Learning model is not hindered by this complexity. Once the model is trained to recognize the leakage of a specific intermediate state, the actual attack is nearly instantaneous.
  • Robustness to Misalignment: Traditional CPA is extremely sensitive to "jitter" or misalignment in traces. The CNN's convolutional layers naturally act as filters that can identify features even if they shift slightly in time, making DL-SCA much more effective against "hiding" countermeasures.

Key Results

  • Round 2: DL-SCA successfully recovered the key in just 238 traces. When Gaussian noise was added, DL-SCA still succeeded in 139 traces, while CPA failed to find the key even after 2,000 traces.
  • Round 3: This is where DL-SCA truly shined. It recovered the key in only 11 traces (on aligned data).
  • Computational Efficiency: For Round 3, performing a CPA attack required brute-forcing 24 bits, which took over 7 hours on a high-end Intel i9 processor. The DL-SCA model, once trained, could perform the same evaluation in seconds.

Limitations and Future Work

The paper hits a "wall" at Round 4. At this stage, the mathematical requirements to isolate a single byte's leakage require fixing all 16 bytes of the plaintext. This leaves zero variability for the Deep Learning model to learn from during the profiling phase, causing the attack to fail.

Future Directions: * Multi-label Learning: Instead of targeting one byte, future models could target multiple intermediate states simultaneously to bypass the Round 4 limitation. * Decryption Mode: The current study focuses on the encryption path; the authors suggest applying these techniques to the decryption path in future work. * XOR Labels: Using the XOR of S-box input and output as a label might provide a more efficient leakage signal for deeper rounds.

Summary updated

BibTeX
@inproceedings{swaminathan2022deep,
  author = {Sudharshan Swaminathan and Lukasz Chmielewski and Guilherme Perin and Stjepan Picek},
  title = {{Deep Learning-Based Side-Channel Analysis Against AES Inner Rounds}},
  booktitle = {ACNS Workshops},
  year = {2022},
  doi = {10.1007/978-3-031-16815-4\_10},
}
Figure