Abstract
This paper introduces a novel unsupervised deep learning framework designed to "self-correct" noisy private keys recovered from single-trace side-channel attacks (SCA). Traditional horizontal attacks against Elliptic Curve Cryptography (ECC) often yield keys with significant bit errors, making cryptanalysis computationally infeasible. Our iterative approach utilizes a Convolutional Neural Network (CNN) to refine initial, low-accuracy key guesses (as low as 52%) into 100% accurate recoveries. By leveraging regularization techniques like dropout and data augmentation, the model learns to prioritize consistent physical leakage signals over random label noise. The framework is evaluated on real-world datasets from an ARM Cortex-M4 microcontroller, demonstrating robust performance against various constant-time implementations.
Introduction
Side-channel attacks exploit physical leakages, such as power consumption or electromagnetic emissions, to extract cryptographic keys from hardware. To counter these, engineers implement "blinding" or "randomization," which alters the private key for every execution, rendering traditional multi-trace attacks ineffective. Attackers have pivoted to Horizontal Attacks, which attempt to recover the key from a single trace by analyzing repeated operations. However, these attacks are frequently noisy. The challenge addressed here is correcting these errors without "ground truth" labels or a secondary profiled device.
Methodology
Iterative Deep Learning Framework
The proposed framework treats key recovery as a semi-supervised denoising problem. The process begins with Initial Labeling using a simple horizontal clustering attack (e.g., k-means) to generate a preliminary, albeit poor, key guess.
The core of the method is an Iterative Loop:
- Data Splitting: Noisy labeled sub-traces are divided into two sets, $D_1$ and $D_2$.
- Cross-Labeling: A CNN is trained on $D_1$ using noisy labels to predict and relabel $D_2$. Subsequently, a new CNN is trained on the updated $D_2$ to relabel $D_1$.
- Refinement: This process is repeated, shuffling data between iterations.
Regularization and Feature Selection
The framework relies on the principle that neural networks learn general patterns before memorizing noise. Dropout and Data Augmentation (random trace shifting) force the model to focus on the underlying physical leakage. Furthermore, Gradient Visualization (GV) is employed to identify the most influential parts of the power trace, allowing the attacker to narrow the "attack interval" to high-leakage areas.
Experimental Results
Datasets
The framework was evaluated on two datasets from an ARM Cortex-M4 running the $\mu$NaCl library:
- Pointer-Cswap: Constant-time operations via pointer swapping.
- Arith-Cswap: Constant-time operations via arithmetic masks. Each dataset comprised 300 traces of Curve25519 scalar multiplication, with each trace split into 255 sub-traces.
Performance
Starting from a baseline clustering accuracy of approximately 52%, the iterative framework consistently improved average key accuracy to over 90%. In many instances, the framework achieved 100% single-trace accuracy. This success spanned both pointer-based and arithmetic-based implementations, the latter of which is typically more resistant to horizontal analysis.
Discussion and Conclusion
The primary insight of this work is that deep learning's robustness to label noise can be harnessed for unsupervised side-channel analysis. By randomizing CNN architectures between iterations, the model avoids local minima of incorrect labels. While the method requires an initial seed slightly better than random (e.g., 51-52%), it removes the need for expensive profiling phases. Future work will explore ensemble models and automated early stopping metrics to further optimize the correction process.
Summary updated