Hiding in Plain Sight: Non-profiling Deep Learning-based Side-channel Analysis with Plaintext/Ciphertext

Lichao Wu, Guilherme Perin, Stjepan Picek

Introduction

Side-channel analysis (SCA) represents a significant threat to cryptographic implementations by exploiting physical leakages, such as power consumption or electromagnetic emissions, to extract secret keys. Historically, SCA methodologies have been divided into two primary categories: profiling and non-profiling attacks.

Profiling attacks, such as Deep Learning-based Side-Channel Analysis (DLSCA), are highly effective but rely on the restrictive assumption that an attacker has access to a "clone" device—an identical system where they can control the secret keys to train a model. Conversely, non-profiling attacks like Correlation Power Analysis (CPA) or Differential Deep Learning Analysis (DDLA) are more realistic but often suffer from high computational costs or reduced efficacy against modern countermeasures like masking. This paper introduces Plaintext Labeling Deep Learning (PLDL), a novel non-profiling approach that bridges this gap, achieving the performance of profiling attacks without the need for a clone device.

The PLDL Methodology

The fundamental challenge in non-profiling deep learning is the lack of ground-truth labels for training, as the secret intermediate values (e.g., the output of an AES S-box) depend on an unknown key. The core innovation of PLDL lies in the observation of a bijective relationship between public data (plaintext or ciphertext) and secret intermediate values when the key remains fixed.

Training with Public Labels

Instead of attempting to guess keys during the training phase, PLDL trains a single neural network to map leakage traces directly to known plaintext or ciphertext bytes. Because the relationship between the public labels and the internal cryptographic state is constant for a fixed key, the model can learn the physical "footprint" of the data processing using only publicly available information.

Key Recovery and Spearman Correlation

Once the model is trained, the attacker must still determine the secret key. This is achieved by calculating a "Plaintext Distribution" (PD) for every possible key hypothesis. The attacker then applies Spearman correlation to compare the probabilities output by the trained model against the distributions generated by each key guess. The key guess that yields the highest correlation is identified as the correct key. The use of Spearman correlation, rather than the more common Pearson correlation, provides enhanced numerical stability, particularly when the relationship between labels and physical leakage is non-linear.

Data Augmentation

The researchers emphasize that data augmentation—specifically the random shifting of traces—is a critical component of the PLDL pipeline. This technique prevents the model from overfitting on environmental noise and forces it to focus on the temporal features of the cryptographic operations, significantly improving the attack's robustness.

Experimental Evaluation

The effectiveness of PLDL was evaluated against five benchmark datasets representing various hardware and software implementations of AES-128, including those with countermeasures:

  • ASCAD_F & ASCAD_R: Masked AES on 8-bit AVR microcontrollers.
  • AES_RD: Implementations featuring random delay countermeasures to desynchronize signals.
  • CHES_CTF: Masked AES on 32-bit STM32 microcontrollers.
  • AES_HD: An unprotected FPGA implementation characterized by Hamming Distance leakage.

Performance Results

PLDL demonstrated remarkable efficiency and potency across these benchmarks:

  • Efficiency: Unlike previous non-profiling methods like DDLA, which may require training 256 separate models (one for each possible byte value), PLDL requires only one model. This reduces the computational overhead from hours to minutes.
  • Convergence Speed: PLDL reached a "key rank of zero" (successful recovery) at least 3x faster than competing non-profiling methods such as MOR or DDLA.
  • Surpassing Profiling Attacks: In a surprising result, PLDL occasionally outperformed state-of-the-art profiling attacks. On the ASCAD_F dataset, PLDL required only 8 traces to recover the key, whereas the profiling DLSCA required 464 traces.
  • Robustness to Noise: The method proved highly resilient to desynchronization, outperforming competitors in 9 out of 10 simulated noise scenarios.

Discussion and Limitations

While PLDL represents a significant advancement, its performance varies depending on the leakage model. The approach is optimized for "Identity" (ID) leakage models. In scenarios where devices primarily exhibit "Hamming Weight" (HW) or "Hamming Distance" (HD) leakages—common in hardware implementations like the AES_HD dataset—the mapping between public labels and physical leakage is less direct, leading to a slight decrease in efficiency.

Furthermore, the current mathematical framework for the Plaintext Distribution assumes a Gaussian noise profile. While effective in most benchmarks, real-world environments with non-Gaussian noise may require further refinement of the statistical model.

Conclusion

PLDL redefines the capabilities of non-profiling side-channel attacks. By demonstrating that secret information is "hiding in plain sight" within the relationship between public data and physical leakage, the authors have shown that attackers do not necessarily need clone devices to perform high-performance deep learning attacks. Future work will likely focus on ensemble learning techniques to further stabilize results and adapting the methodology for more complex hardware leakage models.

Summary updated

BibTeX
@article{wu2023hiding,
  author = {Lichao Wu and Guilherme Perin and Stjepan Picek},
  title = {{Hiding in Plain Sight: Non-profiling Deep Learning-based Side-channel Analysis with Plaintext/Ciphertext}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2023},
  url = {https://openreview.net/forum?id=mGoZsFF5pK},
}
Figure