Abstract
We study a two-stage deep learning method for offline analysis of measured AES power traces with known plaintexts. An LSTM-based sensitivity score identifies candidate leakage windows, and a CNN ranks byte differences from the selected trace segments. In illustrative byte-pair evaluations on public datasets, the correct difference first reached rank 1 with fewer than 700 CNN evaluation traces on ASCAD and with 1000 on DPA Contest V4. In a separate ASCAD experiment on one byte pair across five training seeds, the mean ranks at 1500 and 2000 evaluation traces were 6.4 and 38.2, respectively. These results describe the evaluated records and conditions.
1. Introduction
Over the past few years, side-channel attacks (SCAs) [1] have proven to be an extremely effective method for attacking cryptographic algorithms. It exploits physical information—such as execution time, power consumption [2], and electromagnetic radiation—leaked [3] during the execution of cryptographic algorithms on physical devices (e.g., smart cards [4], Internet of Things (IoT) devices [5], and microcontrollers [6]) to analyze and break the cryptographic algorithms. Non-profiled SCA [7,8,9], which relies neither on a profiling device completely identical to the target device nor on a predefined leakage model, conducts analysis relying solely on the plaintexts and power traces of the target device. Therefore, it is closer to realistic physical attack and defense scenarios than profiled attacks.
With the rapid development of computer hardware and the significant improvement in computational capability in recent years, deep learning technology has become an indispensable tool in various research fields. Similarly, researchers have introduced deep learning into non-profiled SCA, thereby enhancing its attack performance. For example, the non-profiled deep learning side-channel attack method (DDLA) [10] proposed by Timon, and the improved model with a regularization strategy proposed by Kuroda [11] et al., have both achieved important progress in this field.
In addition to the DDLA framework, Zhang et al. [12] also proposed a deep learning-driven unmodeled side channel attack scheme, which was named neural mutual information analysis. This scheme estimated the mutual information value through neural network and used it as a classifier to complete the unmodeled side channel analysis task. Compared with the traditional deep learning network architecture, the attention mechanism-based unmodeled side channel attack network proposed by Pu et al. [13] enhances the feature selection ability through the attention module, which further improves the expression ability of complex leakage patterns, thus also proving the effectiveness of the attention mechanism in the unmodeled attack environment. Ramezanpour et al. [14] did not perform a technical iteration on the existing framework of traditional unmodeled side channel analysis, but built different attack frameworks based on reinforcement learning. The core logic of the framework is as follows: firstly, the dimension of leaked features is reduced by automatic encoder, then the compressed features are clustered by reinforcement learning algorithm, and finally the key recovery is realized. There is also another kind of research that mainly focuses on the attack cracking of asymmetric cryptographic algorithms. Under normal circumstances, it takes a long time to analyze the side channel of asymmetric cryptosystem, so Lee et al. [15] put forward an attack scheme based on a twin network that can complete the recovery of the complete key within a reasonable time range. However, there is a core limitation of this method: the model needs a support set, that is, a small amount of labeled trajectory data as a reference data set to support the one-shot learning process [16].
However, existing non-profiled deep learning attack models exhibit certain limitations in practical applications. First, when dealing with long power consumption traces that typically contain hundreds of thousands of samples, accurately locating the effective leakage intervals, which constitute only a very small proportion, poses a significant challenge. Traditional methods often rely on prior information about masks or sensitive intermediate values. Second, to accumulate sufficient collision features for key recovery under complex noise and countermeasure mechanisms, existing models typically require an extremely large number of power consumption traces for training and attacks (e.g., tens or even hundreds of thousands of traces). To overcome these limitations, this paper proposes a non-profiled side-channel collision attack model that integrates a long short-term memory (LSTM) [17] network with a convolutional neural network (CNN) [18]. The LSTM network excels at processing temporal dependencies, is capable of quantifying the contribution of sample points in the input traces, and automatically locates the leakage intervals; meanwhile, the CNN can perform highly efficient feature extraction and collision analysis on these localized interval segments.
We evaluate the method on the public ASCAD [19] and DPA Contest V4 datasets.
The contributions are a gradient-based procedure for selecting candidate intervals from long traces and a two-stage framework that evaluates byte-pair ranks using those intervals.
The intended application is offline analysis of measured power traces with known plaintexts. The method identifies candidate leakage windows and evaluates byte-pair ranks on public ASCAD and DPA Contest V4 records.
The remaining sections of this paper are structured as follows: Section 2 introduces the proposed non-profiled side-channel collision attack method, including the LSTM-based leakage identification layer and the CNN-based collision attack layer. Section 3 presents the experimental setup, results, and comparative analysis on the ASCAD and DPA Contest V4 datasets. Section 4 discusses the potential implications and limitations of the obtained results. Finally, Section 5 summarizes the paper and outlines future research directions.
2. Materials and Methods
In the field of side-channel attacks, the raw power consumption traces used to construct public datasets typically contain a large number of consecutive samples. For example, the ASCAD dataset used in this study contains 100,000 samples per trace in its original trace set. The core sensitive operation of the Advanced Encryption Standard (AES) encryption, namely the S-box calculation in the SubBytes layer after the first AddRoundKey round, is executed sequentially, byte by byte. The S-box calculations corresponding to the 16 plaintext bytes occur in different, discrete, and relatively small side-channel leakage intervals throughout the trace. Only the samples within these intervals carry leakage information about the corresponding key bytes, while the majority of the remaining data consists of irrelevant noise or power consumption from non-sensitive operations.
Assuming the attack dataset uses the AES-128 algorithm to simplify model design and computational derivation, the key recovery process is structured as a coherent workflow. First, an improved sensitivity analysis method is employed to determine the leakage interval when a single plaintext byte undergoes S-box operations. Subsequently, a neural network named is constructed for leakage localization. By calculating the partial derivatives of the loss function with respect to the input sample points, three levels of leakage intervals are progressively determined from coarse to fine: (coarse-grained, wide range), (medium-grained, moderate range), and (fine-grained, final core interval). These intervals satisfy the condition and , where M represents the total number of sample points in a single trace.
Following the completion of leakage interval localization, the subsequent phase involves constructing a second neural network, , for the collision attack. Since the key byte remains unknown in non-profiling scenarios, is directly trained using the i-th plaintext byte as a 256-class label. The training inputs are the segments for , corresponding to the core leakage interval of the i-th byte in the power trace set , where N is the total number of traces in the dataset used for the model. Once trained, the attack model learns the mapping relationship between the value of the i-th plaintext byte and the features of its corresponding power segment.
Building upon the trained collision attack model , a side-channel collision attack is executed to progressively narrow down the AES key search space. For the j-th plaintext byte () in the first round of AES encryption, its core leakage interval is determined using the previously established network, and the corresponding segment is extracted from each trace in T, for . Without key information in this non-profiling context, the segment is directly fed into the trained to obtain a 256-class probability distribution for each trace. Here, represents the plaintext byte candidate value, and denotes the predicted probability for candidate q in the s-th trace. Since the collision attack exploits the property that identical S-box intermediate values yield similar leakage patterns, the matching probability output by will be higher when the intermediate value corresponding to the j-th byte’s trace segment collides with the intermediate value associated with a specific candidate plaintext value of the i-th byte.
After obtaining the respective predicted probabilities, the feasibility of key difference estimation and full key recovery is elucidated through theoretical derivation. The true S-box inputs corresponding to the i-th and j-th bytes in the first round of AES encryption are defined as follows:
where and are the i-th and j-th plaintext bytes corresponding to the s-th trace, respectively. The terms and represent AES key bytes that are unknown in the non-profiling scenario but remain globally constant across the entire trace set, and ⊕ denotes the exclusive-OR operation over the finite field .
Given that the S-box employed by AES is a bijective function over , during hardware execution, the side-channel power features exhibit consistency if and only if the input values of the two S-boxes are perfectly identical. Thus, the necessary and sufficient condition for a side-channel collision is . By substituting the definition of the S-box inputs into this condition, an equivalent transformation can be made: . Rearranging this yields the true differential relationship between the AES key bytes, which serves as the core equation of the side-channel collision attack:
This equation dictates that if the s-th trace satisfies a collision, a fixed difference exists between the key bytes, which can be directly mapped via the plaintext values without relying on any physical information leakage model.
Based on these theoretical derivations, the trained model , which utilizes the i-th plaintext byte as its label, outputs a predicted probability . Physically, this represents the model’s assessed probability that the power features of the current input trace segment for the j-th byte match those observed during the training phase when the i-th plaintext byte had a value of q. The value achieves its maximum within the 256-dimensional output of a single trace if and only if the plaintext candidate q equals the true i-th plaintext byte of the s-th trace. However, due to hardware noise and environmental interference, the prediction results from a single trace lack sufficient stability and cannot be directly utilized for key difference estimation.
To suppress noise interference from individual traces and enhance the robustness of the key difference estimation, a global accumulation of the predicted probabilities across all s traces is performed based on the core differential equation. This constructs a key difference candidate statistical vector , calculated as follows:
where is the candidate value for the key difference between the i-th and j-th bytes, and represents the i-th plaintext byte corresponding to the candidate difference in the core equation. The core logic of this formulation is to accumulate the model’s predicted probabilities of the theoretical plaintext values across the entire trace set for each key difference candidate, thereby quantifying the degree of matching between that candidate and the collision patterns within the full traces.
According to the core theory of side-channel collisions, the cumulative probability sum across all traces reaches its global maximum if and only if the candidate value is perfectly consistent with the true key difference . Consequently, the candidate value corresponding to the maximum in the statistical vector is taken as the final estimated result for the key difference between the i-th and j-th bytes:
By iterating this byte-level attack procedure 15 times, 15 independent sets of key difference estimates can be acquired. For the AES-128 algorithm, the full key comprises 16 eight-bit key bytes, presenting an original search space of , which is impossible to enumerate using conventional computing resources. However, once 15 independent and correct key differences are obtained, the values of the remaining 15 key bytes form a uniquely bound relationship with the reference key byte . Specifically, any key byte can be expressed as
At this stage, the search space for the complete key is determined solely by the reference byte , effectively compressing it from the original down to . Consequently, recovering the entire 16-byte AES key only requires 256 brute-force enumerations of , thereby realizing a practical full key recovery under standard computational resources. The specific implementation of this deep learning-based collision attack principle is detailed in Algorithm 1.
| Algorithm 1 Operational Algorithm of Deep Learning-Based Collision Attack Model |
| Require: Traces ; plaintexts (); training byte i; DL model Ensure: Key difference vector (where ) 1: 2: 3: for do 4: 5: 6: end for 7: return |
Having clarified the implementation process of the non-profiling attack, the model structure is further specifically designed. The model consists of a leakage identification layer and a collision attack layer; the former is utilized to locate the effective leakage interval, while the latter is employed to accomplish feature learning and key recovery analysis. The overall architecture of the proposed model is illustrated in Figure 1.
Figure 1.
Neural network model combining LSTM and CNN. Blue boxes denote the LSTM stages, orange boxes denote reshaping and convolutional feature extraction, and green boxes denote the CNN classification stages. Arrows indicate the direction of data flow between stages.
2.1. Leak Identification Layer
The proposed method requires two different neural networks in total. The first neural network, an LSTM, is utilized to identify the leakage ranges , , and , which is referred to as the leakage identification layer model in this study. The second neural network is a CNN, employed to train the actual attack model based on the determined range , ultimately achieving the effect of key recovery through a collision attack. This is referred to as the collision attack layer model. The primary objective of the leakage identification layer is to design a neural network for identifying the precise leakage range of the power trace corresponding to the plaintext, and to pass it as an initial value to the deep learning model of the collision attack layer to assist in key recovery.
Classic methods for localizing side-channel leakage intervals include Signal-to-Noise Ratio (SNR) analysis and Pearson Correlation Coefficient (PCC) analysis. However, these two categories of methods require acquiring prior information such as random masks and sensitive intermediate values in cryptographic implementations to accomplish effective leakage localization. Therefore, they are only applicable to profiling attack scenarios equipped with complete prior information, making them difficult to apply directly in the proposed non-profiling attack scenario without key and mask priors, unless additional conditions are introduced. To strictly adhere to the settings of non-profiling attacks and accomplish leakage interval localization under the premise of possessing only the plaintexts and their corresponding power traces, this study adapts the scenario based on the sensitivity analysis method proposed in the literature [20]. It is modified into a scheme that requires only plaintext bytes as labels to complete the entire analysis process. As can be observed from the corresponding sensitivity formulation, the existing sensitivity calculation method requires not only the plaintext but also the sensitive intermediate values during the encryption process as inputs. In actual cryptographic implementations, this input often further necessitates known keys, masks, and implementation details for specific computation. Under the relatively strict non-profiling attack environment proposed in this paper, this method is inapplicable. Therefore, drawing inspiration from the design methodology of classical sensitivity analysis for measuring the contribution of sample points, and combining the constraints of obtainable information in non-profiling scenarios, this study constructs an improved sensitivity metric based on gradient contribution.
Initially, an LSTM model is constructed to quantify the contribution degree of each sample point in the input trace to the classification result, and to localize the leakage regions strongly correlated with the plaintext bytes. Its formalized calculation process begins by calculating the partial derivative of the loss function with respect to each sample point of the input trace, thereby characterizing the impact of a single sample point on the classification result, as shown in Equation (6):
where represents the value of the s-th power trace at the l-th sampling instant, is the mean squared error (MSE) loss function corresponding to the s-th sample, is the coarse-grained trace interval to be analyzed, and N is the total number of traces participating in the analysis.
On this basis, the final sensitivity value of each sample point is obtained, with the calculation formula shown in Equation (7):
The score sums the absolute sample–gradient products across traces to avoid cancelation. Dividing by N preserves the ranking when the same traces are used at every position. If one sample is multiplied by while all others are held fixed, the first-order change in loss is . Thus, high scores identify windows to which the trained loss responds locally. Independent evidence is needed to determine the physical source of a peak.
Unlike the score in Equation (7), the standardized derivative in Equation (1.12) in Saltelli et al. [20] scales the derivative by the ratio of the input and output standard deviations, and their Equation (4.9) defines a first-order variance ratio. Our score weights the derivative by the observed sample amplitude and uses neither standard-deviation normalization nor output variance decomposition. In the recorded ASCAD control, original and shuffled labels selected the same windows, with peaks at sample points 30,462 and 36,740 near the right edges of their respective windows. This control does not independently establish the origin of the peaks. Window selection in this control did not depend on correctly pairing traces with plaintext labels. Shared waveform characteristics may have influenced the sensitivity scores. We use the score to select candidate time windows. This control does not establish that the windows contain plaintext-dependent leakage. This control is shown in Figure 2.
Figure 2.
ASCAD control with original and shuffled labels for the two examined bytes.
The localization model uses an LSTM to represent temporal dependencies within each candidate window.
Based on the aforementioned working principle, the LSTM model is designed following a systematic process. First, the input side-channel traces are converted into a 3D format required by the LSTM, with the last dimension serving as the feature dimension, thereby ensuring compatibility with the sequential input requirements of the LSTM layers. This step lays the foundation for the data format needed for subsequent processing by the recurrent neural network. The first LSTM layer comprises 64 neurons and is configured to output a sequence. The choice of 64 neurons is primarily based on the complexity and sequence length of the side-channel traces, enabling the model to adequately capture long-term dependencies within the traces while avoiding overfitting. It is configured to retain the sequence output, ensuring that temporal information is passed on to the next layer, providing a complete sequential context for subsequent feature extraction. Following this, a Dropout layer with a dropout rate of 0.2 is applied to randomly deactivate neurons, thereby reducing the risk of overfitting and enhancing the model’s generalization ability.
For example, B single-channel windows of 1000 samples form an input tensor of shape , with axes for traces, time steps, and channels. After matching trace and plaintext records, each cropped window is paired with the known plaintext byte at the target position. For example, byte 0x2A maps to class 42 in a 256-dimensional one-hot vector. The LSTM uses MSE between this vector and the 256 Softmax probabilities.
Subsequently, the second LSTM layer uses 32 neurons but only outputs the final state. The goal of reducing the number of neurons to 32 is to aggregate and compress features from the previous layer, shifting the focus from local details to global information in the sequence. This design effectively integrates timing features across the entire trajectory segment, thereby capturing the overall leakage pattern during operation execution. Similarly, after the second LSTM layer, a Dropout layer with a drop rate of 0.2 is added to further enhance model robustness. Additionally, a fully connected layer containing 100 neurons is set up and uses the ReLU activation function. The function of this layer is to transform the sequence features extracted by the LSTM layer into more expressive high-dimensional representations, capturing complex relationships between features through nonlinear transformations. The ReLU activation function effectively alleviates the gradient vanishing problem and accelerates the model’s convergence process. Finally, the output layer consists of 256 neurons and also uses the Softmax activation function. The output dimension of 256 corresponds to 256 possible values for a single AES byte; the Softmax function converts these output values into probability distributions, helping the model better learn the mapping between plaintext and leak trajectories.
After training, we use the score to select a candidate window. Figure 3 shows the LSTM architecture.
Figure 3.
LSTM architecture for candidate-window localization.
2.2. Collision Attack Layer
The CNN architecture is adapted from the ASCAD reference CNN of Benadjila et al. [19]. The reference has five convolution–pooling stages and two hidden fully connected layers with 4096 units each. The evaluated configuration has three convolution–pooling stages and three hidden layers with 10, 4, and 2 units. We chose the 10–4–2 configuration to limit the parameter count of the fully connected layers. Narrowing the last hidden layer from a hypothetical 10 units to two reduces the number of weights in the 256-class output layer from 2560 to 512.
Essentially, raw side-channel traces are one-dimensional time series signals containing physical leaks generated when a device performs cryptographic operations, such as power consumption and electromagnetic radiation. These leak signals typically exhibit local correlations: leaks from the same operation appear within consecutive time windows, while the leak patterns differ across different operations. One-dimensional convolutional neural networks (1D-CNNs) are inherently suited for processing such time series data. Their convolutional kernels can slide along the time dimension to capture feature patterns within local time windows, while parameter sharing helps reduce model complexity and prevent overfitting. Therefore, this study selects 1D-CNNs as the core architecture for feature extraction, rather than fully connected networks (which are prone to noise interference and parameter redundancy) or recurrent neural networks (which suffer from high computational complexity and training instability).
Specifically, the processing workflow for the convolutional layer is as follows: first, the input side channel traces are converted into a three-dimensional format that meets the one-dimensional convolution requirements, with the last dimension designated as the channel dimension to ensure matching with the input requirements of the convolutional layer. This step lays the foundation for subsequent convolution operations. The first layer of convolution uses two kernels of size 75, with a step size of 1, ensuring the output length matches the input. The 75 convolution kernel size is chosen mainly based on the time resolution and operation period of the side channel trace. Since leaks from a single S-box operation typically span multiple sampling points, a window size of 75 can cover the full operational leak pattern, capturing all physical responses during execution. By utilizing two convolution kernels, the model can learn different types of local features. Subsequently, the feature map is downsampled by averaging pooling with a step size of 25. Choosing 25 as the step size is related to the time interval of AES operations, which can reduce data dimensions while preserving key features and improving computational efficiency.
Then, the second convolutional layer uses two convolutional kernels of size 3, each with a step size of 1. Smaller convolutional kernel sizes help capture more localized detailed features, such as rapid changes at operational boundaries or faint signals hidden in noise. To stabilize the training process, a batch normalization (BN) layer is added after the second convolutional layer. By normalizing features in each batch, this layer can reduce internal covariate shift, accelerate model convergence, and improve model applicability. Next, the feature dimension is further reduced by an average pooling operation with a stride of 4, thereby compressing the feature map into a more compact representation. Additionally, the third convolutional layer uses eight convolutional kernels of size 2, with a step size of 1. Increasing the number of convolution kernels to eight aims to enhance the model’s feature expression capability to capture a wider variety of leak patterns. At the same time, a convolutional kernel of size 2 can finely capture correlations between adjacent sample points, such as transient leakage caused by a single logic gate switch. Finally, the final feature map is output through an average pooling operation with a step size of 2. At this point, features are abstracted from the noisy raw traces into higher-dimensional representations with semantic information.
The design of the convolutional layer is closely related to the objectives of side-channel attacks. This research requires the model to distinguish between different leakage patterns generated by various plaintext inputs, thereby identifying leakage collisions caused by identical key operations during collision attacks. Therefore, each design step of the convolutional layer aims to enhance the model’s sensitivity to input-related leakage features while suppressing noise interference. During the training phase, this convolutional network structure undergoes deep learning via a classification task; the learned feature representations can capture plaintext-related leakage patterns. This architecture effectively extracts key features from side-channel traces, enabling the model to accurately predict plaintext byte values after training and successfully recover the key during the attack phase through collision detection. Compared to traditional fully connected networks, convolutional networks achieve higher accuracy and faster convergence under identical training data conditions. Additionally, the design of the convolutional layer also considers scalability: by adjusting the size and number of convolutional kernels as well as the pooling strategy, the network can adapt to side-channel trace features generated by different devices and encryption algorithms. This flexibility allows the model to be widely applied to side-channel attack tasks in various scenarios.
The fully connected layer is a core component of convolutional neural networks (CNNs), responsible for integrating local features extracted by convolutional layers and providing a global foundation for classification decisions. In the context of side-channel attack scenarios, this study systematically designs and validates the structure, activation functions, weight initialization, and regularization strategies of the fully connected layer. The fully connected module first transforms the 3D feature map output by the convolutional blocks into a 1D vector via a flattening operation. Subsequently, it connects to three fully connected layers for feature compression, containing 10, 4, and 2 neurons, respectively. Finally, the output is fed into a Softmax output layer with 256 neurons, thereby forming a feature space with progressively reduced dimensionality. By gradually compressing the feature dimensions, this structure guides the model to focus on the most discriminative features while reducing the number of parameters.
The hidden fully connected layers use HeUniform initialization and SeLU activation.
Figure 4 shows the CNN architecture.
Figure 4.
CNN architecture for class scoring on selected trace segments.
3. Results
For the supplementary experiment, the reference and target windows were standardized separately at each sampling position using the mean and population standard deviation computed from 8000 development traces. We used . These statistics were fixed before evaluation, and the resulting segments were converted to float32.
The main experiments used an Intel Core i9-10900K, an NVIDIA GeForce RTX 4080, and 64 GB of memory. All 20,000 ASCAD traces were used for localization. Two disjoint subsets of 8000 and 2000 were used for CNN training and evaluation, respectively. The remaining 10,000 were used only for localization.
The experiments were implemented in Python 3.10 using TensorFlow 2.20. The ASCAD experiment uses fixed-key raw power traces from the ATMega8515_raw_traces.h5 subset. Each trace contains 100,000 samples. The target operation is the first-round AES SubBytes operation.
Although masking protection is present in the ASCAD dataset, in such protected datasets, the plaintext is only directly processed during the initial loading phase and the mask application phase, and is not directly invoked during the actual computation of the cryptographic functions. In the first round of AES encryption within the ASCAD dataset, the true masked values input to the S-boxes for the i-th and j-th bytes can be expressed as shown in Equation (8):
where and are the unmasked true inputs (outputs of the AddRoundKey operation) to the S-boxes, and and are independent, first-order Boolean masks that are randomly generated per trace for their respective bytes.
Let x and y denote the unmasked reference and target S-box inputs, and let and denote their masks. XOR cancelation gives
Equal masks therefore make equality of the masked inputs equivalent to . For different masks, equality of the masked inputs implies . The candidate class index in Equation (3) is based on the unmasked key-difference relation in Equation (2). The reported rankings show how well the CNN scores distinguish candidates under the evaluated masking conditions. They do not establish that the CNN learns mask-invariant features.
3.1. ASCAD
The objective of the leakage identification layer is to cover the relevant leakage of the target byte within the smallest possible sampling interval , thereby reducing the computational overhead of the neural network while ensuring that the sampling intervals of all state bytes cover homologous types of leakage features, providing consistent feature inputs for the subsequent collision attack. During the training process of the leakage identification layer, the number of epochs for the LSTM model is set to 10. This study selects the 10th byte as the initial training target. To balance the search efficiency on ultra-long raw traces and the coverage integrity of sample points at the initial boundary, a multi-stage sliding window traversal strategy is adopted during the localization of the coarse-grained leakage interval . Initially, boundary detection is performed on the sample point interval at the beginning of the raw trace to ensure the initial region is not overlooked. Subsequently, a sliding window with a length of 10,000 and a stride of 10,000 is employed to continue traversing backward along the time axis until the corresponding sensitivity output by the model exhibits a significant peak. The specific results are illustrated in Figure 5 and Figure 6. When the window traverses to the interval [25,000, 34,999], the first significant peak is observed, corresponding to the sample point 29,464. Therefore, this interval can be designated as the coarse-grained candidate leakage interval for the target byte. Furthermore, since the length of the medium-grained interval is set to 2000, an interval of = [28,464, 30,463] is obtained by centering on this peak. After repeating the aforementioned training and sensitivity analysis process within this interval, a new peak position is located at 28,481, ultimately determining the fine-grained leakage interval as = [27,981, 28,980]. At the reported sampling and clock rates, the coarse, medium, and fine widths correspond to approximately 20, 4, and 2 clock cycles, respectively. These widths specify the search stages. The observed sensitivity peaks are treated as candidate locations.
Figure 5.
Coarse-grained range training results for the ASCAD dataset.
Figure 6.
Medium-grained range training results for the ASCAD dataset.
Subsequently, the final sampling interval obtained from the above positioning is used as the start and end interval for the trajectories during the CNN model training process. By training according to the neural network hyperparameters proposed in Section 2, the attack model can be obtained. Feeding the test subset into this model yields the probability ranking of the key differences for the corresponding attacked bytes. Similarly, taking the scenario where the 10th byte is the training target and the 7th byte is the attack target as an example, the ranking results of the key XOR differences are shown in Figure 7. To distinguish it from the 0-based indexing used for guessing entropy, the ranking results use the natural ranking representation; that is, Rank 1 indicates that the correct key difference is positioned at the top of the candidate results. In this illustrative run with random seed 30, the correct difference first reached rank 1 with fewer than 700 traces from the held-out ASCAD test set. This study continues to employ the same method to complete the attacks on the remaining bytes. However, under a single model with a randomly selected byte as the training target, attacks on the other bytes are not guaranteed to be successful. Therefore, models are trained using different bytes as training targets to sequentially acquire sufficient key difference equations.
Figure 7.
Experimental results of the non-profiled attack on the ASCAD dataset.
Furthermore, to eliminate the impact of random initialization on the attack results, during the actual training process, this study trains five independent models for the leakage interval corresponding to each plaintext byte, resulting in a model ensemble . For any target byte j, the identical power trace is input into all five models to obtain a set of key difference prediction results: . This paper adopts a majority voting strategy to determine the final key difference. The experiment tallies the occurrence frequency of each key difference across the five predictions, and the value with the highest frequency is taken as the final estimated value of . This strategy conforms to the decision logic of deep learning classification tasks and can effectively counteract the prediction fluctuations caused by the random initialization of the models, thereby enhancing the stability and accuracy of key difference recovery. The ASCAD dataset designed masking protection mechanisms for all 16 state bytes of the AES-128 algorithm. However, for the convenience of testing during its initial design, the random masks for the 0th and 1st bytes were set to 0. Therefore, consistent with other research implemented on this dataset, this study directly treats the 0th and 1st bytes as key leakage bytes. The remaining 14 state bytes employ complete first-order Boolean masking protection, possessing typical side-channel security protection features. Consequently, this paper selects these 14 bytes as the effective training and attack target bytes, training each byte independently five times, resulting in a total of 70 models.
The maximum number of training epochs was 500, with early stopping at a preset validation accuracy. Most ASCAD runs completed within 450 epochs. The examples describe the observed rankings and do not estimate the probability of recovering all target differences with one model.
At a fixed evaluation budget, joint recovery requires one model to rank the correct reference-relative difference first for every target: 13 differences for the 14-byte masked ASCAD subset or 15 differences for the 16 first-round DPA bytes. The supplementary fixed-key ASCAD evaluation covers one byte pair, so it does not provide a joint success rate. For the supplementary evaluation, we used the same byte pair and trained five models with seeds 31–35. All five models were evaluated on the same ordered set of 2000 held-out ASCAD traces. With the first 1500 traces, three runs ranked the correct difference first, and the majority vote selected the correct candidate. After the remaining 500 traces were included, those three runs lost their first-place positions and the majority-voting rule abstained. The ranks did not improve monotonically as traces were added, and the rank records do not establish the cause of this change. At 500 and 750 traces, comparison with benchmark ground truth showed that the majority-vote candidates were incorrect. Without ground truth, a separate held-out trace set can be used to check vote stability. A conflicting result flags the candidate as unverified. Agreement provides evidence of stability only. Figure 8 shows the ranks.
Figure 8.
Rank and guessing entropy for one fixed-key ASCAD byte pair over five training seeds as the held-out trace budget varies.
The counts in Table 1 refer to different targets and evaluation conditions. They are provided as context for interpreting the evaluated trace budgets. The publicly available abstract of Zhang et al. [12] does not specify which datasets or target bytes were evaluated or how many traces were used in each experiment, so we could not verify a trace count directly comparable to those in Table 1.
Table 1.
Reported ASCAD results and their evaluation scope.
3.2. DPA Contest V4
In this experiment, the first 10,000 power traces are utilized as the training set for the leakage identification layer model. Similar to the partitioning of the ASCAD dataset, this study randomly samples 8000 traces from these 10,000 traces as the model training subset for the collision attack phase, while the remaining 2000 traces serve as the attack test subset.
The DPA Contest V4 dataset contains 100,000 raw traces [22], each with 435,000 samples. The records cover the first AES round and the beginning of the second. Compared with ASCAD, the longer records increase the interval searched during localization.
Although the DPA Contest V4 dataset employs the AES-256 encryption algorithm with a key length of 32 bytes, the application logic of its Rotating S-box Masking (RSM) protection remains entirely consistent across rounds. Therefore, it is sufficient for the research to verify the model’s attack efficacy on the first-round 16-byte subkey corresponding to the SubBytes operation of AES-256. In numerous studies utilizing the DPA Contest V4 dataset to validate the effectiveness of non-profiling side-channel attacks, the recovery of the first-round 16-byte subkey corresponding to the first-round SubBytes operation is universally adopted as the metric for a successful attack. Hence, this study also follows this convention in its experiments.
In the experiments detailed in this part, because the number of sample points in this dataset is vastly greater than that in the ASCAD dataset—with a single trace containing more than four times the number of sample points—this study expands the range of the coarse-grained leakage analysis from 10,000 to 100,000 sample points, and the range of the medium-grained leakage analysis from 2000 to 4000 sample points.
This study continues to select the 10th byte as the initial training target. Similar to the coarse-grained interval detection strategy used for the ASCAD dataset, to ensure search efficiency on the ultra-long raw traces, a multi-stage sliding window traversal strategy is also adopted during the localization of the coarse-grained leakage interval . Initially, boundary detection is performed on the sample point interval [0, 49,999] at the starting end of the raw trace to guarantee that the initial region is not overlooked. Subsequently, a sliding window with a length of 100,000 and a stride of 100,000 is employed to traverse backward along the time axis until a significant peak in sensitivity emerges. The specific results are illustrated in Figure 9 and Figure 10. When the window traverses to the interval [50,000, 149,999], the first significant peak is observed, corresponding to the sample point 130,400. Therefore, this interval can be designated as the coarse-grained candidate leakage interval for the target byte. Furthermore, given that the length of the medium-grained interval is set to 4000, an interval of [128,400, 132,399] is obtained by centering on this peak. After repeating the aforementioned training and sensitivity analysis process within this interval, a new peak position is located at 129,900, ultimately determining the fine-grained leakage interval as [129,400, 130,399].
Figure 9.
Coarse-grained range training results for the DPA Contest V4 dataset.
Figure 10.
Medium-grained range training results for the DPA Contest V4 dataset.
For DPA Contest V4, we selected a 4000-sample interval around the candidate peak and refined it to 1000 samples. Table 2 lists the window sizes for both datasets.
Table 2.
Window sizes in samples.
The coarse window determines the initial search range, while the medium and fine stages narrow the candidates. The larger DPA coarse window covers more of each long trace at each search step. If both coarse-window settings retain the same leakage region and the medium stage selects the same candidate interval, increasing the coarse window does not reduce the final localization precision. A wider window may contain several candidate peaks and can change which region enters the next stage. The fine window contains 1000 samples for both datasets.
For the same byte in DPA Contest v4, we compared coarse-window widths of 10,000 and 100,000 samples. Both settings selected the same 1000-sample final interval, with a start-index difference of zero samples (Table 3). The coarse-window width did not change the selected interval for the byte evaluated.
Table 3.
Final intervals selected for the same byte in DPA Contest v4 under two coarse-window settings.
To mitigate the impact of random initialization on the attack results, this study chooses to adopt the same scheme as that used for the ASCAD dataset. For each plaintext byte, five independent models are trained for the corresponding leakage interval , yielding a model ensemble . For any target byte j, the identical power trace is input into all five models to, respectively, obtain a set of key difference prediction results: . Finally, a majority voting strategy is adopted to determine the ultimate key difference. Therefore, this paper selects these 16 bytes as valid training and attack targets, with each byte trained independently five times, resulting in a total of 80 models. Following the operations described previously, the final sampling interval obtained from the aforementioned localization is subsequently used as the start and end interval for the traces during CNN model training. The CNN hyperparameters remain unchanged from the previous text. After training, the probability ranking of the key differences for the corresponding attacked bytes can be acquired.
Taking the scenario where the 10th byte is the training target and the 7th byte is the attack target as an example, the ranking results of the key XOR differences are shown in Figure 11.
Figure 11.
Experimental results of the non-profiled attack on the DPA Contest V4 dataset.
The correct difference reached rank 1 at 1000 evaluation traces in the DPA Contest V4 example. Training was capped at 500 epochs with early stopping, and most DPA runs completed within 480 epochs.
Synthesizing the different implementation schemes of non-profiling side-channel attacks on the DPA Contest V4 dataset in existing research, this study presents a summary as shown in Table 4.
Table 4.
Reported DPA results and related benchmark context.
Table 4 separates the reported counts and experimental settings. Earlier collision research by Moradi et al. [24] provides context but is omitted from the numerical comparison of non-profiled methods. Table 5 reports the supplementary ASCAD rankings and voting outcomes for the evaluation shown in Figure 8.
Table 5.
Five-seed supplementary evaluation of one ASCAD byte pair.
4. Discussion
The two-stage workflow first identifies candidate windows and then evaluates byte-pair ranks on the selected segments.
These two evaluated datasets exhibit distinctly different trace characteristics. The traces in the ASCAD dataset contain 100,000 sampling points, while each trace in the DPA Contest V4 dataset contains approximately 435,000 sampling points [22]. Therefore, the multi-stage sliding window strategy provides a practical way to adapt the leakage localization method according to the trace length. The different peak locations observed for individual bytes in the DPA Contest V4 experiments further indicate that byte-level localization should not simply assume a common fixed interval for all state bytes.
The reported trace budgets include the traces used for localization, including the subsets used to train and evaluate the CNN. The total number of distinct traces was 20,000 on ASCAD and 10,000 on DPA Contest V4.
Sensitivity peaks identify candidate leakage windows, and their physical origin requires independent evidence. Individual byte-pair ranks describe recovery for the tested pair. Our evaluation is limited to the public ASCAD and DPA Contest V4 datasets and the conditions evaluated here. The sensitivity of the method to changes in noise, clock drift, and temperature was outside the scope of this evaluation. The window parameters and CNN configuration may need to be readjusted for other devices, sampling rates, or implementations.
5. Conclusions
This study evaluated a two-stage method for identifying candidate leakage windows and ranking byte differences from measured AES power traces with known plaintexts.
The leakage identification layer uses an LSTM classifier and a gradient-based sensitivity metric to quantify the contribution of individual sample points. A three-stage localization procedure progressively narrows the candidate interval from coarse-grained to fine-grained resolution. On the ASCAD dataset, the procedure reduced the final interval to 1000 sample points. A similar procedure was applied to the DPA Contest V4 dataset, where the longer traces required a wider coarse-grained search range and a 4000-sample medium-grained interval before the final 1000-sample interval was determined.
The correct difference first reached rank 1 with fewer than 700 evaluation traces in the illustrative ASCAD byte-pair result and with 1000 in the DPA Contest V4 example. The supplementary five-seed ASCAD evaluation characterizes the observed rank variability for one byte pair.
The findings apply to the public benchmark records and experimental conditions evaluated in this study.
Author Contributions
Conceptualization, K.Y., M.Y. (Mingzhi Yang) and M.Y. (Meng Yue); methodology, K.Y. and M.Y. (Mingzhi Yang); software, K.Y. and X.Z.; validation, K.Y., X.Z. and Y.Y.; formal analysis, K.Y. and M.Y. (Mingzhi Yang); investigation, K.Y., X.Z. and Y.Y.; data curation, K.Y. and X.Z.; writing—original draft preparation, K.Y.; writing—review and editing, K.Y., X.Z., M.Y. (Mingzhi Yang), Y.Y. and M.Y. (Meng Yue); supervision, M.Y. (Meng Yue). All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the Fundamental Research Funds for the Central Universities under Grant 3122026GJ13.
Institutional Review Board Statement
Not applicable.
Data Availability Statement
The ASCAD dataset and the DPA Contest V4 dataset analyzed in this study are publicly available. The ASCAD dataset is available from the ANSSI ASCAD repository, and the DPA Contest V4 traces are available from the official DPA Contest website.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Ganesh, R.; Khan, B.U.I.; Khan, A.R.; Kamsin, A.B. A panoramic survey of the advanced encryption standard: From architecture to security analysis, key management, real-world applications, and post-quantum challenges. Int. J. Inf. Secur. 2025, 24, 216. [Google Scholar] [CrossRef] [Scilit]
- Sasi, T.; Lashkari, A.H.; Lu, R.; Xiong, P.; Iqbal, S. A comprehensive survey on IoT attacks: Taxonomy, detection mechanisms and challenges. J. Inf. Intell. 2024, 2, 455–513. [Google Scholar] [CrossRef] [Scilit]
- Ferrigno, J.; Hlaváč, M. When AES blinks: Introducing optical side channel. IET Inf. Secur. 2008, 2, 94–98. [Google Scholar] [CrossRef] [Scilit]
- Herbst, C.; Oswald, E.; Mangard, S. An AES smart card implementation resistant to power analysis attacks. In Proceedings of the International Conference on Applied Cryptography and Network Security, Singapore, 6–9 June 2006; pp. 239–252. [Google Scholar]
- Pammu, A.A.; Chong, K.S.; Ho, W.G.; Gwee, B.H. Interceptive side channel attack on AES-128 wireless communications for IoT applications. In Proceedings of the IEEE Asia Pacific Conference on Circuits and Systems (APCCAS), Jeju, Republic of Korea, 25–28 October 2016; pp. 650–653. [Google Scholar]
- Yarom, Y.; Falkner, K. FLUSH+ RELOAD: A high resolution, low noise, l3 cache Side-Channel attack. In Proceedings of the USENIX Security Symposium, San Diego, CA, USA, 20–22 August 2014; pp. 719–732. [Google Scholar]
- Niu, Y.; Zhang, J.; Wang, A.; Chen, C. An Efficient Collision Power Attack on AES Encryption in Edge Computing. IEEE Access 2019, 7, 18734–18748. [Google Scholar] [CrossRef] [Scilit]
- Kocher, P.; Jaffe, J.; Jun, B. Differential power analysis. In Proceedings of the Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 1999; pp. 388–397. [Google Scholar]
- Han, J.; Kim, Y.J.; Kim, S.J.; Sim, B.Y.; Han, D.G. Improved correlation power analysis on bitslice block ciphers. IEEE Access 2022, 10, 39387–39396. [Google Scholar] [CrossRef] [Scilit]
- Timon, B. Non-profiled deep learning-based side-channel attacks with sensitivity analysis. IACR Trans. Cryptogr. Hardw. Embed. Syst. 2019, 2019, 107–131. [Google Scholar] [CrossRef] [Scilit]
- Kuroda, K.; Fukuda, Y.; Yoshida, K.; Fujino, T. Practical Aspects on Non-profiled Deep-learning Side-channel Attacks against AES Software Implementation with Two Types of Masking Countermeasures including RSM. In Proceedings of the 5th Workshop on Attacks and Solutions in Hardware Security, ASHES ’21, Virtual Event, Republic of Korea, 19 November 2021; pp. 29–40. [Google Scholar]
- Zhang, C.; Lu, X.; Cao, P.; Gu, D.; Guo, Z.; Xu, S. A nonprofiled side-channel analysis based on variational lower bound related to mutual information. Sci. China Inf. Sci. 2022, 66, 112302. [Google Scholar] [CrossRef] [Scilit]
- Pu, K.; Dang, H.; Kong, F.; Zhang, J.; Wang, W. A Quantitative Analysis of Non-Profiled Side-Channel Attacks Based on Attention Mechanism. Electronics 2023, 12, 3279. [Google Scholar] [CrossRef] [Scilit]
- Ramezanpour, K.; Ampadu, P.; Diehl, W. SCARL: Side-channel analysis with reinforcement learning on the ascon authenticated cipher. arXiv 2020, arXiv:2006.03995. [Google Scholar]
- Lee, N.; Hong, S.; Kim, H. Single-Trace Attack Using One-Shot Learning With Siamese Network in Non-Profiled Setting. IEEE Access 2022, 10, 60778–60789. [Google Scholar] [CrossRef] [Scilit]
- Vinyals, O.; Blundell, C.; Lillicrap, T.; Kavukcuoglu, K.; Wierstra, D. Matching networks for one shot learning. In Proceedings of the 30th International Conference on Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; pp. 3637–3645. [Google Scholar]
- Greff, K.; Srivastava, R.K.; Koutník, J.; Steunebrink, B.R.; Schmidhuber, J. LSTM: A search space odyssey. IEEE Trans. Neural Netw. Learn. Syst. 2016, 28, 2222–2232. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chua, L.O. CNN: A vision of complexity. Int. J. Bifurc. Chaos 1997, 7, 2219–2425. [Google Scholar] [CrossRef] [Scilit]
- Benadjila, R.; Prouff, E.; Strullu, R.; Cagli, E.; Dumas, C. Deep learning for side-channel analysis and introduction to ASCAD database. J. Cryptogr. Eng. 2020, 10, 163–188. [Google Scholar] [CrossRef] [Scilit]
- Saltelli, A.; Ratto, M.; Andres, T.; Campolongo, F.; Cariboni, J.; Gatelli, D.; Saisana, M.; Tarantola, S. Global Sensitivity Analysis: The Primer; John Wiley & Sons, Ltd.: Chichester, UK, 2008. [Google Scholar]
- Fukuda, Y.; Yoshida, K.; Fujino, T. CA-SCA: Non-Profiled Deep Learning-Based Side-Channel Attacks by Using Cluster Analysis. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2025, E108-A, 227–241. [Google Scholar] [CrossRef] [Scilit]
- DPA Contest. DPA Contest V4: RSM Traces. Official DPA Contest Website. Available online: https://dpacontest.telecom-paris.fr (accessed on 22 October 2026).
- Staib, M.; Moradi, A. Deep Learning Side-Channel Collision Attack. IACR Trans. Cryptogr. Hardw. Embed. Syst. 2023, 2023, 422–444. [Google Scholar] [CrossRef] [Scilit]
- Moradi, A.; Mischke, O.; Eisenbarth, T. Correlation-Enhanced Power Analysis Collision Attack. In Proceedings of the Cryptographic Hardware and Embedded Systems—CHES 2010; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2010; Volume 6225, pp. 125–139. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.










