Introduction
In the field of hardware security, Side-Channel Analysis (SCA) remains a potent threat. Attackers exploit physical leakages—such as power consumption or electromagnetic emissions—to extract secret cryptographic keys from embedded devices. While classical statistical methods like Correlation Power Analysis (CPA) have long been the standard, the advent of Deep Neural Networks (DNNs) has shifted the landscape. DNNs excel at breaking "masked" implementations, where secrets are split into random shares to obfuscate leakages.
However, the power of DNNs comes at the cost of interpretability. These models are often viewed as "black boxes," making it difficult for security evaluators to understand which specific features of a power trace the network is utilizing. Existing Explainable AI (XAI) techniques, such as Saliency Maps or Layer-wise Relevance Propagation (LRP), provide heatmaps of importance but fail to identify the minimal set of points necessary for a successful attack. This paper, presented at INDOCRYPT 2024, introduces Key Guessing Occlusion (KGO) to bridge this gap.
The Key Guessing Occlusion (KGO) Algorithm
The authors propose KGO as a method to identify the absolute minimum data points—termed OccPoIs (Occluded Points of Interest)—that a neural network requires to recover a secret key. Unlike standard XAI methods that analyze gradients or internal weights, KGO focuses on the model's output performance under systematic input perturbation.
The algorithm follows a greedy, iterative workflow:
- Occlusion: Starting with a fully trained DNN and a set of attack traces, the algorithm systematically hides (sets to zero) individual sample points.
- Verification: For each hidden point, the DNN attempts to perform a key recovery attack. The success is measured using Guessing Entropy (GE), which represents the average rank of the correct key among all possible candidates.
- Decision Logic: If the GE remains low (indicating the key is still recoverable), the occluded point is deemed redundant and remains hidden. If the GE rises significantly, the point is considered essential for the attack and is restored.
- Refinement: This process continues until the trace is reduced to its most critical components.
The authors also introduce 1-KGO, a variant used for visualization. By measuring the GE increase when a single point is removed, 1-KGO creates an importance ranking that provides a clearer picture of the leakage landscape than traditional heatmaps.
Experimental Evaluation
The researchers validated KGO across several industry-standard datasets, ranging from unprotected implementations to those with sophisticated countermeasures:
- ChipWhisperer (CW): An unprotected AES-128 implementation characterized by a high Signal-to-Noise Ratio (SNR).
- AES_HD: An unprotected AES implementation on an FPGA with low SNR, representing a more challenging target.
- ASCAD (ASCADf and ASCADr): The benchmark datasets for first-order masked AES. These are particularly difficult because the leakage is hidden across multiple points in time.
- ASCAD_desync: Versions of the masked dataset containing artificial timing "jitter," testing the algorithm's robustness against desynchronization countermeasures.
Results and Insights
The experiments yielded several critical insights into how DNNs perceive side-channel leakages:
1. Extreme Minimalism
KGO revealed that DNNs are remarkably efficient. In unprotected scenarios, a network might require only a single sample point out of thousands to achieve a successful key recovery. Even in complex masked implementations like ASCADr, the feature space was reduced from 1,400 points to just 6 OccPoIs.
2. Superior Feature Selection
One of the most significant findings is KGO's utility as a feature selection tool for classical attacks. In the ASCADf dataset, a classical Template Attack (TA) using KGO-selected features achieved a successful recovery (GE=0) in just 313 traces. In contrast, TAs using features selected by Saliency Maps, LRP, or standard statistical metrics (SOSD, SOST) failed to converge even after 10,000 traces. This demonstrates that KGO identifies non-linear relationships and high-order leakages that other methods overlook.
3. Mask-Agnostic Analysis
Traditional feature selection for masked implementations often requires the attacker to know the random masks used during the profiling phase. KGO removes this requirement. It identifies the necessary points simply by observing what the trained DNN finds important, making it a powerful tool for "black-box" security evaluations.
4. Robustness to Countermeasures
KGO proved effective even in the presence of noise and desynchronization. It successfully identified leaking points in the low-SNR AES_HD dataset and the desynchronized ASCAD traces without requiring any preprocessing or manual resynchronization steps.
Limitations and Future Directions
While powerful, KGO is computationally intensive. Its complexity is $O(D \times M)$, where $D$ is the trace length and $M$ is the cost of a DNN inference. For traces spanning tens of thousands of points, the process can take hundreds of hours. Furthermore, as a greedy heuristic, KGO finds a minimal set of points, but not necessarily the global minimum or the only valid set.
Future research aims to extend KGO to higher-order masking schemes (where secrets are split into three or more shares) and to optimize the algorithm's runtime to handle even larger datasets.
Conclusion
OccPoIs and the KGO algorithm represent a significant step forward in making deep learning-based side-channel analysis interpretable and actionable. By stripping away redundant data, KGO not only explains the "why" behind a DNN's success but also provides a robust framework for improving classical cryptographic attacks on protected hardware.
Summary updated