Abstract
Deep-learning-based side-channel attacks (DL-SCAs) have traditionally relied on standard machine learning loss functions like Negative Log-Likelihood (NLL). However, these metrics do not directly optimize for the primary goals of an attacker: maximizing Success Rate (SR) and minimizing Guessing Entropy (GE). This paper introduces the Probability Concentration Inequality (PCI) loss, a novel objective function derived from Bennett’s Inequality. PCI loss provides a theoretical upper bound for GE and a lower bound for SR, enabling more efficient key recovery. We also establish a formal "Key-Independence Condition" to justify the use of fixed keys during profiling. Experimental results on ASCAD and AES_HD datasets demonstrate that PCI loss significantly outperforms existing methods, particularly in the presence of desynchronization countermeasures.
Introduction
Side-channel attacks (SCAs) exploit physical leakages—such as power consumption or electromagnetic radiation—to extract secret keys from cryptographic hardware. While deep learning has significantly enhanced the efficacy of these attacks, the field has largely relied on empirical "trial and error" regarding model architecture and loss functions. Most DL-SCAs utilize Negative Log-Likelihood (NLL) loss, a general-purpose metric that may not be optimal for the specific ranking-based objectives of key recovery. This research addresses two critical gaps: the theoretical justification for training with fixed keys and the development of a loss function that directly optimizes attack performance metrics.
Theoretical Foundations
The Key-Independence Condition
A common practice in the "profiling" phase of an SCA is to train a model using a fixed secret key and then apply it to a device with a different, unknown key. The authors derive a formal mathematical Key-Independence Condition to validate this practice. They prove that if the leakage function and the cryptographic algorithm satisfy certain bijective properties, the choice of key during training does not affect the attack's success. While standard software implementations of AES typically meet this condition, the paper notes that hardware implementations with non-bijective register updates may require more careful consideration.
Probability Concentration Inequality (PCI) Loss
The core contribution of this work is the PCI loss function. Standard NLL loss aims to maximize the probability of the correct class. However, in SCAs, the attacker cares about the rank of the correct key among all candidates. Using Bennett’s Inequality—a tool from probability theory that bounds the deviation of a sum of random variables from its mean—the authors derive a loss function that acts as a differentiable proxy for Guessing Entropy (GE) and Success Rate (SR).
Unlike NLL, PCI loss is mathematically proven to be an upper bound for GE. This means that by minimizing PCI loss, the model is directly forced to minimize the average rank of the correct key. Furthermore, the authors demonstrate that while a perfect NLL score leads to an optimal attack, it is not a requirement; an optimal attack can be achieved even with high NLL, provided the probability distribution is sufficiently "concentrated" around the correct key.
Methodology: Two-Stage Learning
To implement PCI loss effectively, the authors propose a two-stage training pipeline:
- Feature Extraction (NLL Stage): A base model is trained using standard NLL loss to learn the fundamental features of the side-channel traces.
- Distribution Adjustment (PCI Stage): A second "adjustment" model is introduced. This model takes the output of the first stage and fine-tunes the probability distributions using the PCI loss function. This stage specifically optimizes the margin between the correct key and incorrect candidates.
Experimental Evaluation
The proposed method was validated using two industry-standard datasets:
- ASCAD: Power consumption traces from a masked AES software implementation, including versions with random time shifts (desynchronization).
- AES_HD: Electromagnetic radiation traces from an unprotected AES hardware implementation on an FPGA.
Key Results
- Superiority over Ranking Loss: PCI loss consistently outperformed the recently proposed "Ranking Loss." A significant advantage of PCI loss is its stability; it does not require the manual tuning of sensitive hyperparameters, such as the $\alpha$ coefficient required by Ranking Loss.
- Resilience to Desynchronization: On the ASCAD 100 dataset (characterized by high desynchronization), the PCI-based method reached a Guessing Entropy of 1 significantly faster than models using NLL or Ranking Loss. It effectively "closes the gap" between synchronized and desynchronized data.
- Hardware Validation: Results on the AES_HD dataset confirmed that the theoretical benefits of PCI loss translate to real-world hardware leaks, providing a robust tool for security evaluators.
Conclusion and Future Work
This paper moves DL-SCA from empirical heuristics toward a more rigorous theoretical framework. By introducing PCI loss, the authors provide a way to directly optimize the metrics that matter most in cryptographic auditing.
However, limitations remain. PCI loss focuses on the convergence of the "worst-case" key candidate, which can lead to slightly lower performance than NLL when the number of available attack traces is extremely small. Future research will focus on adapting PCI loss for imbalanced datasets—where certain intermediate values appear more frequently—and testing its efficacy against more advanced hardware countermeasures beyond simple desynchronization.
Summary updated