Abstract
Deep Learning (DL) has significantly advanced Side-Channel Analysis (SCA), enabling the bypass of sophisticated cryptographic countermeasures. However, the performance of these models is highly sensitive to hyperparameter selection—a process often described as a "black art" requiring extensive expert intuition. This paper introduces AutoSCA, an automated framework leveraging Bayesian Optimization to systematically discover high-performing neural network architectures for SCA. By evaluating AutoSCA on industry-standard benchmarks such as ASCAD and CHES CTF 2018, we demonstrate that automated tuning not only reduces the need for manual intervention but also consistently outperforms human-designed state-of-the-art models.
Introduction
Side-channel analysis (SCA) exploits physical leakages—such as power consumption or electromagnetic emissions—to extract secret keys from cryptographic devices. While Deep Learning has proven resilient against countermeasures like masking and desynchronization, its efficacy is tethered to the quality of the underlying neural network architecture. Currently, researchers rely on manual tuning, rigid methodologies, or computationally expensive random searches to find optimal hyperparameters. These approaches are often dataset-specific and fail to generalize across different hardware or leakage models.
AutoSCA addresses this gap by treating hyperparameter optimization (HPO) as a structured search problem, utilizing Bayesian Optimization (BO) to navigate the complex landscape of model architectures efficiently.
The AutoSCA Framework
AutoSCA is built upon the Auto-Keras library, modified to suit the specific requirements of cryptographic security evaluations. At its core, the framework utilizes a Bayesian Optimization engine to guide the search for optimal parameters (e.g., number of layers, filter sizes, learning rates, and activation functions).
Bayesian Optimization vs. Random Search
Unlike Random Search, which evaluates candidate models independently, Bayesian Optimization is an iterative, "informed" strategy. It maintains a probabilistic model (a Gaussian Process) of the objective function based on previous results. An acquisition function—specifically the Upper Confidence Bound (UCB)—is used to balance the trade-off between exploration (searching unknown regions of the parameter space) and exploitation (refining parameters in regions known to perform well). This allows AutoSCA to converge on superior architectures with significantly fewer trials than traditional methods.
SCA-Specific Objectives
Standard machine learning metrics like "Accuracy" or "Cross-Entropy Loss" often correlate poorly with an attacker's ultimate goal: key recovery. AutoSCA allows for optimization based on domain-specific metrics:
- Key Rank / Guessing Entropy: The average position of the correct key in a ranked list of candidates.
- $L_m$ Metric: A specialized metric designed to quantify the leakage captured by the model, providing a more robust objective for the BO engine in high-noise environments.
Experimental Evaluation
The authors evaluated AutoSCA against two primary benchmarks:
- ASCAD (Fixed and Random Keys): An 8-bit AVR microcontroller implementation of masked AES-128. The random key variant represents a significant challenge for DL models due to the increased complexity of the leakage.
- CHES CTF 2018: A 32-bit STM32 implementation of masked AES-128, characterized by high noise and complex countermeasures.
To maintain computational efficiency, AutoSCA employs a "fast-search" strategy where candidate models are trained for only 10 epochs. This allows the framework to quickly discard underperforming architectures and focus resources on the most promising candidates.
Key Insights
The "Easy Dataset" Trap
The study revealed that for simpler datasets (like ASCAD with a fixed key), Random Search is often sufficient to find a working model. This suggests that many existing "expert-designed" methodologies may be over-engineered for benchmarks that do not adequately represent the difficulty of real-world targets.
Superiority of Bayesian Optimization
As the difficulty of the dataset increases—specifically in the random key version of ASCAD or the CHES CTF dataset—the limitations of Random Search become apparent. In these scenarios, Bayesian Optimization consistently identifies architectures that successfully break the implementation, whereas Random Search often fails to converge on a viable solution.
Performance vs. Model Size
While recent SCA research has trended toward "miniaturizing" neural networks for efficiency, AutoSCA prioritizes raw attack performance. The authors argue that in a security evaluation context, the primary metric of success is the minimum number of traces required to recover the key, regardless of whether the model has a few thousand or a few million parameters.
Results
AutoSCA achieved new state-of-the-art (SotA) results across multiple benchmarks:
- ASCAD (Identity Leakage Model): AutoSCA discovered a Multilayer Perceptron (MLP) capable of fully recovering the secret key (Guessing Entropy = 1) in just 129 traces. This is a significant improvement over the previous best-known methodology, which required 191 traces.
- CHES CTF 2018: The framework successfully identified Convolutional Neural Network (CNN) architectures that outperformed hand-crafted models, demonstrating the power of automated search in high-noise, 32-bit environments.
Conclusion
The success of AutoSCA demonstrates that automated hyperparameter tuning is no longer just a convenience but a necessity for high-performance side-channel analysis. By moving away from the "black art" of manual tuning and adopting Bayesian Optimization, researchers can achieve better results with less effort. The authors conclude that for any modern DL-SCA workflow, automated tuning should be the standard starting point for model development.
Summary updated