Abstract
Side-channel attacks (SCA) pose a significant threat to cryptographic hardware by exploiting physical leakages like power consumption. Traditional deep-learning-based SCA requires extensive manual preprocessing and custom model tuning for specific implementations. This paper introduces the Generalized Power Analysis Model (GPAM), a framework leveraging Transformer architectures and multi-task learning to automate SCA across diverse algorithms and hardware. GPAM utilizes temporal patchification and a multi-head Directed Acyclic Graph (DAG) structure to break sophisticated masking countermeasures without manual feature engineering. Experimental results on ECC and AES datasets demonstrate state-of-the-art performance, enabling full key recovery from raw power traces.
Introduction
Side-channel attacks (SCA) exploit physical outputs—such as power consumption or electromagnetic emissions—to leak secret cryptographic keys. To defend against these, engineers implement countermeasures like masking (randomizing intermediate values) and shuffling. Historically, attacking these protected chips using machine learning has been a "bespoke" process, requiring side-channel experts to manually align traces, filter noise, and design custom neural networks for every specific chip and algorithm. This lack of generality makes security audits expensive and slow. GPAM addresses these challenges by providing an automated system that allows for the evaluation of hardware resilience during the design phase without requiring extensive manual tuning.
Methodology
GPAM introduces three key architectural innovations to handle the unique challenges of high-dimensional power traces:
- Temporal Patchification: Power traces can contain millions of data points. To manage the quadratic computational cost of standard Transformers, GPAM groups contiguous trace points into "patches." This preserves the temporal shape of the data while making the sequence length manageable.
- Gated Attention Units (GAU): Instead of standard Transformer blocks, GPAM utilizes GAUs. These are more computationally efficient and excel at identifying long-range dependencies, which is critical for correlating a secret key with a random mask used thousands of cycles apart.
- Multi-task Relational Outputs: This is the core mechanism for breaking masked implementations. The model is trained to simultaneously predict intermediate values, such as random masks, alongside the secret key. These outputs are organized in a Directed Acyclic Graph (DAG), allowing the model to learn the mathematical relationships between the mask, the blinded value, and the actual secret.
Experimental Setup and Datasets
The study evaluates GPAM using a combination of new and established datasets:
- ECC (Elliptic Curve Cryptography): Four datasets (CM0 to CM3) were generated using an NXP K82F chip, ranging from simple constant-time execution to complex combined additive and multiplicative masking.
- AES (Advanced Encryption Standard): The model was tested on the ASCADv1 and ASCADv2 datasets, which are standard benchmarks for deep-learning-based SCA.
- REASSURE ECC: A public dataset used for comparative analysis against prior specialized models.
Key Results and Discussion
GPAM demonstrates significant improvements in both attack efficiency and generality:
- Breaking ECC Protections: The model successfully attacked four hardened ECC implementations, recovering the four most significant bits (MSBs) of the secret scalar with accuracy between 71.86% and 96.39%. By feeding these predictions into a lattice-based attack, the researchers recovered the full 256-bit private key from approximately 8,000 traces.
- State-of-the-Art on AES: On the ASCADv2 dataset, GPAM achieved 100% accuracy in predicting the mask ($r_m$) and outperformed previous specialized models on S-BOX input prediction without requiring manual "Points of Interest" (PoI) selection.
- Automated Domain Knowledge: Instead of manual data cleaning, the authors "injected" cryptographic knowledge into the model's DAG structure. Visualization of the training process revealed that the model learns to "unpack" protections step-by-step—first predicting the mask, then the secret key.
Conclusion and Future Work
GPAM represents a major advancement in making side-channel analysis more accessible and automated. However, challenges remain in "black-box" scenarios where masks are unknown during training, particularly for advanced countermeasures like CM3. Future work will focus on improving performance in these black-box settings and refining the model's ability to handle complex mathematical operations like "carry" bits through improved adjacency relations. Despite these limitations, GPAM significantly lowers the expertise barrier for testing chip security, enabling faster and more robust hardware audits.
Summary updated