Cryptographic algorithms can be mathematically secure yet vulnerable in physical reality. As a hardware device executes a cryptographic operation, it inadvertently leaks physical signals—such as fluctuations in power consumption, electromagnetic (EM) emissions, or execution timing. Side-channel analysis (SCA) aims to recover secret keys by exploiting these physical footprints.
Traditionally, SCA required significant domain expertise. An analyst had to manually align noisy signals, isolate specific "Points of Interest" (PoIs) in time, and assume a rigid mathematical relationship (a leakage model, such as Hamming weight) between the processed data and the physical emissions.
Deep learning has fundamentally shifted this paradigm. By treating physical traces as high-dimensional data, neural networks can automatically discover complex features, bypass advanced hardware countermeasures, and extract cryptographic keys with minimal prior assumptions.
Automated Feature Discovery from Raw Traces
In traditional side-channel attacks, the primary bottleneck is signal processing. A single power or EM trace can consist of hundreds of thousands of data points, most of which represent environmental noise or unrelated hardware operations.
Deep learning architectures eliminate the need for manual feature engineering. As explained by Sengim Karayalcin et al. in A Practical Tutorial on Deep Learning-based Side-channel Analysis, deep neural networks enable end-to-end profiling. Instead of hand-picking leakage points, models process raw, unaligned physical traces directly.
[Raw Physical Trace] ---> [Convolutional Layers] ---> [Fully Connected Layers] ---> [Key Bit Prediction]
(High-dimensional, (Automated Filtering & (Non-linear Feature (Extracted Secret)
Noisy, Unaligned) Shift Invariance) Synthesis)
This works primarily due to the architectural properties of Convolutional Neural Networks (CNNs). A 1D convolutional layer slides filters across the time domain, acting as a shift-invariant feature detector. If a hardware countermeasure introduces clock jitter or artificial delays, the physical leakage point shifts in time. Traditional statistical methods fail under this desynchronization, but a CNN's filters can capture the leakage pattern regardless of its temporal position.
Consequently, manual feature selection is no longer a prerequisite for successful attacks. Work by Guilherme Perin et al. in Exploring Feature Selection Scenarios for Deep Learning-based Side-channel Analysis demonstrated that even small neural networks can efficiently extract keys from raw, unprocessed intervals, allowing black-box attackers to succeed without expert knowledge of the target hardware. This automated pipeline can adapt to diverse cryptographic implementations, such as learning the relationships between physical emissions and secret bits in lightweight ciphers [Parisa Amiri Eliasi et al., Xoodyak Under SCA Siege], or extracting instruction-level execution patterns from low-sampling-rate sensors on shared FPGAs [Ognjen Glamocanin et al., Instruction-Level Power Side-Channel Leakage Evaluation of Soft-Core CPUs on Shared FPGAs].
Defeating Countermeasures via Non-Linear Modeling
To protect hardware against SCA, designers deploy countermeasures like masking and hiding. Masking breaks a sensitive variable into multiple random shares (e.g., Boolean masking), ensuring that no single share correlates linearly with the secret key. Traditional first-order statistical attacks are mathematically blinded by this defense because they only evaluate single points in time.
Deep learning models bypass masking because they are universal function approximators capable of learning high-order, non-linear relationships across multiple time steps simultaneously.
$$\text{Secret Key } (X) = \text{Share } 1 \,(M_1) \oplus \text{Share } 2 \,(M_2)$$
While a linear statistical test sees only random noise when looking at $M_1$ or $M_2$ individually, the hidden layers of a deep network combine the features from the distinct time steps where $M_1$ and $M_2$ are processed. By learning the non-linear interaction between these temporal regions, the network reconstructs the underlying secret.
The authors of Learning to Localize Leakage of Cryptographic Sensitive Variables, Anand Raghunathan et al., demonstrated that deep neural networks successfully detect high-order information leakage that remains completely invisible to linear statistical tests. This capability allows neural network distinguishers to break implementations protected by standard software masking [Rei Ueno et al., Curse of Re-encryption: A Generic Power/EM Analysis on Post-Quantum KEMs].
Furthermore, deep learning models can perform single-trace attacks, identifying minute physical variations within a single execution window. This neutralizes algorithmic blinding countermeasures that randomize internal values across different operations, as shown by Akira Ito et al. in One Truth Prevails: A Deep-learning Based Single-Trace Power Analysis on RSA-CRT with Windowed Exponentiation, where networks distinguished true memory operations from dummy decoy loads. Similarly, Leo Weissbart et al. in Systematic Side-Channel Analysis of Curve25519 with Machine Learning demonstrated that CNNs can bypass coordinate and scalar randomization on elliptic curves using a single power measurement.
Relaxing Attacker Assumptions
Traditional profiling attacks (such as Template Attacks) require a strict two-phase process:
- Profiling Phase: The attacker uses a fully controlled replica ("clone") device to log physical traces for every possible key or data combination, building an exact statistical template.
- Attack Phase: The attacker captures traces from the victim device and matches them against the template.
Deep learning relaxes these constraints by enabling non-profiled and model-flexible attacks, lowering the barrier to entry for real-world adversaries [Alexander Benjamin et al., Deep Learning Based Side Channel Attacks on Lightweight Cryptography (Student Abstract)].
Instead of relying on a clone device or a rigid, predefined leakage model, networks can adapt dynamically to the target hardware. As shown by Lichao Wu in Leakage Model-flexible Deep Learning-based Side-channel Analysis, decomposing a target value into independent bit-level classifications allows a neural network to automatically learn the specific physical contribution of each bit during training, evolving an optimal leakage model on the fly.
Traditional SCA: [Raw Traces] + [Assumed Leakage Model] ---> [Statistical Matching] ---> Key
Deep Learning: [Raw Traces] + [Public Labels] ---> [Neural Optimization] ---> Key
Even more remarkably, non-profiling methodologies can extract keys directly from the victim device by optimizing for statistical dependencies or utilizing public data. In Hiding in Plain Sight: Non-profiling Deep Learning-based Side-channel Analysis with Plaintext/Ciphertext, Lichao Wu et al. introduced Plaintext Labeling Deep Learning (PLDL). This technique trains models using known, public inputs (plaintexts or ciphertexts) as training labels rather than secret intermediate states. By exploiting the bijective mapping between the public inputs and the internal cryptographic states, the network automatically localizes relevant leakage points across unsegmented physical signals [Lichao Wu et al., Plaintext-based Side-channel Collision Attack], often matching or exceeding the efficiency of traditional profiling attacks [Max Panoff et al., A Review and Comparison of AI-enhanced Side Channel Analysis].
Opening the Black Box for Hardware Defense
While the high-dimensional pattern recognition of neural networks makes them devastating tools for attackers, their internal mechanics can be opaque. To use deep learning for hardware auditing, defenders leverage interpretability methods to inspect what the network has learned.
By applying attribution and visualization techniques, engineers can map a network's internal weights back to specific time points in the physical trace. For instance, Stjepan Picek et al. in OccPoIs: Points of Interest Based on Neural Network's Key Recovery in Side-Channel Analysis Through Occlusion utilized systematic occlusion—hiding segments of the trace—to pinpoint the absolute minimum data points required for key recovery.
This interpretability transforms deep learning from a pure attack mechanism into an evaluative tool. It allows researchers to practically estimate the conditional probability distributions of cryptographic shares given their physical leakage, bridging the gap between theoretical information-theoretic bounds and real-world vulnerabilities [Akira Ito 0002 et al., On the Success Rate of Side-Channel Attacks on Masked Implementations: Information-Theoretical Bounds and Their Practical Usage].
Once these vulnerabilities are exposed, automated frameworks can optimize defenses. For example, Jorai Rijsdijk et al. in Reinforcement Learning-based Design of Side-channel Countermeasures used reinforcement learning to automatically discover low-cost combinations of hiding techniques (like noise injection and clock jitter) capable of thwarting deep learning attacks. By integrating these AI-driven pre-silicon simulators directly into early-stage ASIC design flows, hardware engineers can validate physical security properties long before manufacturing [Asmita Adhikary et al., PROACT - Physical Attack Resistance of Cryptographic Algorithms and Circuits with Reduced Time to Market].
Key Foundational Work
Systematic Side-Channel Analysis of Curve25519 with Machine Learning (2020) — contributed 3 concept elements to this direction.
One Trace Is All It Takes: Machine Learning-Based Side-Channel Attack on EdDSA (2019) — contributed 2 concept elements to this direction.
I Choose You: Automated Hyperparameter Tuning for Deep Learning-based Side-channel Analysis (2020) — contributed 1 concept elements to this direction.