A deep learning side channel analysis method for efficient key recovery
By building a single convolutional neural network model, the problem of time-consuming AES-128 key recovery in existing technologies is solved, side-channel analysis for efficient key recovery is achieved, the efficiency of side-channel attacks is improved, and the cost is reduced.
Patent Information
- Application Number
- CN202411694629.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-11-25
AI Technical Summary
In existing deep learning-based side-channel attacks, recovering the AES-128 key requires training 16 neural network models, which is cumbersome, time-consuming, and inefficient.
Build a single convolutional neural network model, collect and analyze the energy leakage information of encryption devices, establish a side channel analysis deep learning model, use a single model to recover the entire key, and reduce the number and time of model training.
This eliminates the need to select interest intervals for each byte, reduces attack time by 15/16, improves the efficiency of side-channel analysis, reduces costs, and enhances data processing capabilities.
Smart Images

Figure CN119276461B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technologies, and in particular to a deep learning side channel analysis method for efficiently recovering keys. Background Art
[0002] The explosive growth of the Internet of Things (IoT) has not only brought advancements to information and communications technology but also created security challenges. Because IoT devices tend to process personal data, potential attacks must be considered when protecting these devices. Side-channel analysis (SCA) is the most representative of these potential attacks. SCA is a technique based on analyzing data obtained from algorithm execution, rather than the algorithm itself. This data is referred to as leakage, and types of leakage include execution time, power consumption, and electromagnetic radiation. This information is used to attack and eavesdrop on cryptographic systems. Side-channel analysis has become a significant threat to information security and cryptographic products, far more damaging than traditional mathematical analysis methods. The ultimate goal of SCA is to reveal a device's secret key. This analysis is performed by exploiting the relationship between leakages obtained during algorithm execution and the secret key. An attacker collects leakages and analyzes them using specific models and appropriate metrics to determine the secret key. SCA can be transformed into a classification problem. Since classifying given data is a key application of deep learning, deep learning models can automatically understand the patterns, features, and logical relationships that may exist in the extracted data. Therefore, deep learning technology can be applied to SCA to improve the efficiency and accuracy of analysis. Power consumption attacks are a type of side-channel attack. The core idea is that the energy consumed by a cryptographic device during operation is directly related to the intermediate values calculated during the encryption process. These intermediate values are directly related to the key and ciphertext input and output of the device during operation. Existing work has combined deep learning methods with power consumption side-channel analysis to successfully recover the key.
[0003] Current deep learning-based side-channel attacks assume that, because the AES-128 encryption key consists of 16 bytes, an attacker would need to train 16 neural network models to recover the entire key. Performing deep learning side-channel analysis on each byte requires data collection and preprocessing, identifying the data locations corresponding to each sub-byte, slicing the data, and training each model separately. Ultimately, recovering the entire key is time-consuming and labor-intensive. Summary of the Invention
[0004] The purpose of the present invention is to address the shortcomings of the prior art and provide a deep learning side channel analysis method for efficiently recovering keys, comprising the following steps:
[0005] S1: Run an encryption device to obtain known plaintext and a known key, and collect energy leakage information obtained by performing a first round of encryption on the known plaintext and the known key. The energy leakage information is raw data formed by power consumption or energy traces. The energy traces encrypted using random plaintext and a random key are data used for modeling, and the energy traces encrypted using random plaintext and a fixed key are data used for testing.
[0006] S2: A data set is formed by corresponding one-to-one between the byte labels set for the bytes corresponding to the known key and the energy traces in the interval of interest, and the data set is divided into a training set, a validation set, and a test set. The interval of interest is the position on the energy trace corresponding to each byte of the known key found by analyzing the energy leakage information generated during AES encryption using correlation power analysis (CPA).
[0007] S3: constructing a single convolutional neural network model based on the relationship between the energy leakage generated in the interest interval and the known key, and establishing a side channel analysis deep learning model based on the single convolutional neural network model;
[0008] S4: Inputting the training set into the side channel analysis deep learning model for training to obtain a final model, and collecting training indicators during the training process;
[0009] S5: Evaluate the final model, use the final model to recover the key of the bytes, and evaluate the attack effect.
[0010] Preferably, the step S1 further comprises:
[0011] Randomly generate the known plaintext , run the encryption device, the known key The known plaintext is encrypted by the first round of encryption operation Encryption, the intermediate value corresponding to the energy leakage generated during the encryption process is the output of the first round of Sbox. The first round of encryption operation is the byte replacement operation of the AES algorithm. The energy leakage is the energy trace collected during the encryption process. The calculation formula of the first round of encryption operation is:
[0012]
[0013] in, For the XOR operation, Corresponding to the S-box lookup table operation.
[0014] Preferably, in step S2, the use of correlation power analysis (CPA) to analyze the energy leakage information generated during AES encryption to find the position on the energy trace corresponding to each byte of the known key, i.e., the interval of interest, further includes:
[0015] S211: Aligning the energy leakage information;
[0016] S212: Calculating an intermediate value based on the byte replacement operation matrix;
[0017] S213: Calculate the intermediate value The assumed power consumption data corresponding to the matrix is obtained, the Pearson correlation coefficient between the assumed power consumption data and the original data is calculated, and the interval with the maximum correlation coefficient, i.e., the interval of interest, is selected. The original data is subjected to dimensionality reduction processing through CPA, the power consumption data information within the interval of interest is retained, and the interval of interest on the original data corresponding to each byte of the known key is selected.
[0018] Preferably, in step S2, forming the data set further comprises:
[0019] S221: The byte label is set and outputted with the byte of the known key as the attack target. The calculation formula of the byte label is:
[0020]
[0021] in, The first byte, The first byte;
[0022] S222, selecting energy traces in the interval of interest from the original data through CPA as the data set;
[0023] S223: Select 70% of the data set as the training set, 10% as the validation set, and 20% as the test set.
[0024] Preferably, in step S3, constructing a single convolutional neural network model and establishing a side channel analysis deep learning model based on the single convolutional neural network model further includes:
[0025] S31: establishing an input layer InputLayer for receiving the power consumption data information;
[0026] S32: Establishing a network layer for processing the power consumption data information;
[0027] S33: Establish an output layer Dense with 256 units, wherein the output layer Dense uses a softmax activation function network to output a probability distribution of 256 categories, corresponding to 256 sub-keys;
[0028] S34: Configure the single convolutional neural network model to obtain the side channel analysis deep learning model.
[0029] Preferably, in step S32, the network layer further includes:
[0030] The network layer includes a first one-dimensional convolutional layer Conv1D, a first one-dimensional average pooling layer AveragePooling1D, a second one-dimensional convolutional layer Conv1D, a second one-dimensional average pooling layer AveragePooling1D, Flatten for converting multi-dimensional feature data into one-dimensional data, and a fully connected layer Dense with 256 units, and the activation function of the fully connected layer Dense is softmax.
[0031] Preferably, the step S4 further comprises:
[0032] S41: Using model accuracy acc as the training indicator;
[0033] S42: Input the training set into the side channel analysis deep learning model for training. After each training, use the current model to test the verification set, and record the model accuracy acc to view the quality of the current model. After reaching the preset number of steps, save the final model.
[0034] Preferably, in step S42, the calculation formula of the model accuracy acc is as follows:
[0035] ,
[0036] in, represents the validation set, Indicates the first Power consumption curve, Indicates the correct key, represents the set of the power consumption curves when the guessed key is equal to the correct key, and the model accuracy acc is the ratio of the number of power consumption curves when the guessed key is equal to the correct key to the number of power consumption curves in the verification set.
[0037] Preferably, the step S5 further comprises:
[0038] S51: Input the test set into the final model to attack and output the model;
[0039] S52, saving the model output , performing a reverse operation on the model output to obtain the guessed key;
[0040] S53, use The indicator evaluates the attack effect of the final model. The fewer attack curves used, the better the model.
[0041] Preferably, the Indicators further include:
[0042] described The indicator is the ranking of the correct key among the guessed keys. The calculation formula of the ranking is as follows:
[0043] ,
[0044] in, is the index value of the guessed key, The output of the model is 16 tensors with 256 elements, corresponding to the probabilities of 256 possible outcomes of guessing the key using 16 bytes. A tensor sorted in descending order.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] By training a model, the present invention can recover the entire key without selecting the interval of interest for each byte. At the same time, it reduces the attack time of deep learning side channel analysis by 15 / 16, reduces the number of model training, increases the efficiency of side channel attacks, and reduces the cost of side channel attacks.
[0047] From a data perspective, the present invention enhances the data. The model can obtain better training results by training all bytes than by training a single byte. Due to the AES encryption algorithm running on the microcontroller, there is a strong correlation between each byte in the same round of training. This method of processing data also performs well for data sets with strong noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the invention.
[0049] Figure 1 This is a flow chart of a deep learning side channel analysis method for efficiently recovering keys according to the present invention;
[0050] Figure 2 A schematic diagram of the interesting interval of 16 bytes of AES-128 on the power consumption trace for a deep learning side channel analysis method for efficiently recovering keys according to the present invention;
[0051] Figure 3This is a schematic diagram of the rank value results of the CNN model of the deep learning side channel analysis method for efficiently recovering keys in the present invention against a 16-byte attack. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Obviously, the embodiments described are part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of this application.
[0053] Those skilled in the art will understand that, unless otherwise specified, the singular forms "a," "an," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0054] See also Figure 1 As shown, this embodiment provides a deep learning side channel analysis method for efficiently recovering keys, including the following steps:
[0055] S1: Run an encryption device to obtain known plaintext and a known key, and collect energy leakage information obtained by performing a first round of encryption on the known plaintext and the known key. The energy leakage information is raw data formed by power consumption or energy traces. The energy traces encrypted using random plaintext and a random key are data used for modeling, and the energy traces encrypted using random plaintext and a fixed key are data used for testing.
[0056] S2: A data set is formed by corresponding one-to-one between the byte labels set for the bytes corresponding to the known key and the energy traces in the interval of interest, and the data set is divided into a training set, a validation set, and a test set. The interval of interest is the position on the energy trace corresponding to each byte of the known key found by analyzing the energy leakage information generated during AES encryption using correlation power analysis (CPA).
[0057] S3: Constructing a single convolutional neural network model based on the relationship between the energy leakage generated in the interval of interest and the known key, and establishing a side channel analysis deep learning model based on the single convolutional neural network model. Specifically, in this embodiment, parameters such as different layers of the neural network, loss function, and number of training steps are set;
[0058] S4: Inputting the training set into the side channel analysis deep learning model for training to obtain a final model, and collecting training indicators during the training process;
[0059] S5: Evaluate the final model, use the final model to recover the key of the bytes, and evaluate the attack effect.
[0060] Preferably, the step S1 further comprises:
[0061] Randomly generate the known plaintext , run the encryption device, the known key The known plaintext is encrypted by the first round of encryption operation Encryption, the intermediate value corresponding to the energy leakage generated during the encryption process is the output of the first round of Sbox. The first round of encryption operation is the byte replacement operation of the AES algorithm. The energy leakage is the energy trace collected during the encryption process. The calculation formula of the first round of encryption operation is:
[0062]
[0063] in, For the XOR operation, Corresponding to the S-box lookup table operation.
[0064] More preferably, this embodiment uses the output of the Sbox of the first round of AES-128 encryption as the attack target, including: randomly generating 80k of 16-byte plaintext, running the encryption device, encrypting with a random key, collecting power consumption data as modeling data, randomly generating 20k of 16-byte plaintext, running the encryption device, encrypting with a fixed key, collecting power consumption data as test data, the intermediate value corresponding to the energy leakage generated during the first round of encryption is the output of the Sbox in the first round, the encryption operation performed is the AES algorithm byte replacement operation, and the power consumption trajectory, plaintext, ciphertext and key are added to the data set.
[0065] Preferably, in step S2, the use of correlation power analysis (CPA) to analyze the energy leakage information generated during AES encryption to find the position on the energy trace corresponding to each byte of the known key, i.e., the interval of interest, further includes:
[0066] S211: Aligning the energy leakage information;
[0067] S212: Calculating an intermediate value based on the byte replacement operation matrix;
[0068] S213: Calculate the intermediate value The assumed power consumption data corresponding to the matrix is obtained, the Pearson correlation coefficient between the assumed power consumption data and the original data is calculated, and the interval with the maximum correlation coefficient, i.e., the interval of interest, is selected. The original data is subjected to dimensionality reduction processing through CPA, the power consumption data information within the interval of interest is retained, and the interval of interest on the original data corresponding to each byte of the known key is selected.
[0069] More preferably, step S211 further includes:
[0070] After aligning all data, the energy consumption matrix is obtained ,The encryption device generates n energy curves during the encryption process, each curve has p energy consumption points, and the original data is written in the form of a matrix. Each row is a power consumption curve, and each column is the value of p power consumption sampling points corresponding to time:
[0071] .
[0072] More preferably, step S212 further includes:
[0073] Possible keys , the plain text input is , calculate the pseudo intermediate value matrix , the size is , calculation formula:
[0074]
[0075] More preferably, step S213 further includes:
[0076] Using the Hamming weight model as the energy mapping model, the assumed intermediate value matrix is mapped to the assumed power consumption data matrix, and the assumed intermediate value is calculated, wherein the assumed power consumption matrix is calculated. The calculation formula is:
[0077] ;
[0078] Calculate the assumed power consumption moment Afterwards, the assumed power consumption matrix is calculated and actual power consumption matrix The correlation coefficient of and They are column vectors and The arithmetic mean of is the number of possible keys, is the number of sampling points for each power, and the Pearson correlation coefficient matrix is obtained , the size is , the calculation formula is as follows:
[0079] ;
[0080] Please refer to Figure 2 As shown, the point with the largest correlation coefficient is selected as the interest point. The positions of the 16-byte interest points are [96, 192, 288, 384, 480, 576, 672, 768, 864, 960, 1056, 1152, 1248, 1344,
[0081] 1440,1536], an interval consisting of 95 sampling points including the interest point is selected to form a 16-byte interest interval.
[0082] Preferably, in step S2, forming the data set further comprises:
[0083] S221: The byte label is set and outputted with the byte of the known key as the attack target. The calculation formula of the byte label is:
[0084]
[0085] in, The first byte, The first Specifically, in this embodiment, if the first byte of the key is used as the attack target, the label is the intermediate value of the first byte after the byte replacement calculation. The calculation formula of the label is: , where Indicates the first byte of the key, The first byte of the plaintext is represented. When attacking with a key containing other bytes, it is only necessary to replace the key and plaintext with the corresponding bytes. Therefore, the label is set to the middle value corresponding to 16 bytes.
[0086] S222. Using CPA, select the energy trace within the interval of interest from the raw data as the dataset. Specifically, in this embodiment, using CPA, select the 16-byte interval of power consumption data from the raw data as the dataset. Using CPA, the original trace is divided into 16 parts. Each energy trace corresponds to the leakage of that byte of the key during the encryption process of the cryptographic device. The 16 energy traces correspond to 16 different labels, which must be a one-to-one correspondence to ensure sufficient correlation between the labels and energy traces.
[0087] S223. Select 70% of the data set as the training set, 10% as the validation set, and 20% as the test set. Specifically, in this embodiment, there are 100k collected energy trajectories. We select 70k as the training set, 10k as the validation set, and 20k as the test set.
[0088] Preferably, in step S3, constructing a single convolutional neural network model and establishing a side channel analysis deep learning model based on the single convolutional neural network model further includes:
[0089] S31: establishing an input layer InputLayer for receiving the power consumption data information. Specifically, in this embodiment, the input is an energy trajectory within an interest interval corresponding to 16 bytes, each of which has 95 sampling points.
[0090] S32: Establishing a network layer for processing the power consumption data information;
[0091] S33: Establish an output layer Dense with 256 units. The output layer Dense uses a softmax activation function network to output a probability distribution of 256 categories, corresponding to 256 subkeys. Specifically, in this embodiment, the output layer Dense has a total of 256 units and outputs a vector with 256 elements. The last layer uses the softmax activation function.
[0092] S34: Configure the single convolutional neural network model to obtain the side channel analysis deep learning model. Specifically, in this embodiment, RMSporp is set as the optimizer, the learning rate is 0.0005, the batch_size is 200, the number of epochs is 200, the loss function is categorical_crossentropy, and the input of the model is the power consumption data within the 16-byte interest interval of the key. The output of the model is a tensor with 256 elements, which correspond to the probabilities of guessing the key {0, 1, ···, 255}.
[0093] Preferably, in step S32, the network layer further includes:
[0094] The network layer includes a first one-dimensional convolution layer Conv1D, a first one-dimensional average pooling layer AveragePooling1D, a second one-dimensional convolution layer Conv1D, a second one-dimensional average pooling layer AveragePooling1D, a Flatten layer for converting multi-dimensional feature data into one-dimensional data, and a fully connected layer Dense layer with 256 units. The activation function of the fully connected layer Dense is softmax. Specifically, in this embodiment, the first one-dimensional convolution layer Conv1D includes 32 filters, a convolution kernel size of 3, and an activation function of ReLU. The first one-dimensional average pooling layer AveragePooling1D is a one-dimensional average pooling layer with a pooling window size of 2 and a step size of 1. The second one-dimensional convolution layer Conv1D includes 64 filters, a convolution kernel size of 5, and an activation function of ReLU. The second one-dimensional average pooling layer AveragePooling1D is a one-dimensional average pooling layer with a pooling window size of 2 and a step size of 1. The fully connected layer Dense includes a first fully connected layer Dense and a second fully connected layer Dense.
[0095] Preferably, the step S4 further comprises:
[0096] S41: Using model accuracy acc as the training indicator;
[0097] S42: Input the training set into the side channel analysis deep learning model for training. After each training, use the current model to test the verification set, and record the model accuracy acc to view the quality of the current model. After reaching the preset number of steps, save the final model.
[0098] Preferably, in step S42, the calculation formula of the model accuracy acc is as follows:
[0099] ,
[0100] in, represents the validation set, Indicates the first Power consumption curve, Indicates the correct key, represents the set of the power consumption curves when the guessed key is equal to the correct key, and the model accuracy acc is the ratio of the number of power consumption curves when the guessed key is equal to the correct key to the number of power consumption curves in the verification set.
[0101] Preferably, the step S5 further comprises:
[0102] S51: Inputting the test set into the final model to attack and output the model. Specifically, in this embodiment, the power consumption data of the test set is input into the final model;
[0103] S52, saving the model output , perform an inverse operation on the model output to obtain the guessed key. Specifically, in this embodiment, the model output is a one-dimensional floating-point array of 256 elements, where the index represents the candidate subkey, and the value at the index represents the probability that the candidate subkey is the correct subkey. The index value is inversely Sboxed and XORed with the plaintext to convert the model output into the probability of the guessed key. Use NumPy's argmax function to sort the guessed key probability array in descending order. The guessed key with the highest probability is the attack result;
[0104] S53, use The indicator evaluates the attack effect of the final model. The fewer attack curves used, the better the model.
[0105] Preferably, the Indicators further include:
[0106] described The indicator is the ranking of the correct key among the guessed keys. The calculation formula of the ranking is as follows:
[0107] ,
[0108] in, is the index value of the guessed key, The output of the model is 16 tensors with 256 elements, corresponding to the probabilities of 256 possible outcomes of guessing the key using 16 bytes. A tensor sorted in descending order.
[0109] Please refer to Figure 3 As shown in the figure, power consumption data from different bytes of the test set are fed into the model and attacks are performed on different bytes. The horizontal axis represents the number of power consumption data points used in the attack, and the vertical axis represents the rank value. The probability of the attack results over several curves is accumulated. For 16 bytes, the rank eventually stabilizes to 0 within ten curves, indicating that the model can recover the key for all bytes.
[0110] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A deep learning side channel analysis method for efficient key recovery, characterized by: The following steps are involved: S1: Obtaining a known plaintext and a known key, and collecting energy leakage information of a first round of encryption of the known plaintext and the known key, wherein the energy leakage information is raw data formed by power consumption or energy trace; S2: A data set is formed by corresponding one-to-one between the byte labels set for the bytes corresponding to the known key and the energy traces in the interval of interest, and the data set is divided into a training set, a validation set, and a test set. The interval of interest is the position on the energy trace corresponding to each byte of the known key found by analyzing the energy leakage information generated during AES encryption using correlation power analysis (CPA). S3: constructing a single convolutional neural network model based on the relationship between the energy leakage generated in the interest interval and the known key, and establishing a side channel analysis deep learning model based on the single convolutional neural network model; S4: Inputting the training set into the side channel analysis deep learning model for training to obtain a final model, and collecting training indicators during the training process; S5: Evaluate the final model, use the final model to recover the key of the bytes, and evaluate the attack effect.
2. A deep learning side channel analysis method for efficiently recovering keys according to claim 1, characterized in that: The step S1 further comprises: Randomly generate the known plaintext , run the encryption device, the known key The known plaintext is encrypted by the first round of encryption operation Encryption, the intermediate value corresponding to the energy leakage generated during the encryption process is the output of the first round of Sbox. The first round of encryption operation is the byte replacement operation of the AES algorithm. The energy leakage is the energy trace collected during the encryption process. The calculation formula of the first round of encryption operation is: in, For the XOR operation, Corresponding to the S-box lookup table operation.
3. A deep learning side channel analysis method for efficiently recovering keys according to claim 2, characterized in that: In step S2, the energy leakage information generated during AES encryption is analyzed using correlation power analysis (CPA) to find the position on the energy trace corresponding to each byte of the known key, i.e., the interval of interest, further comprising: S211: Aligning the energy leakage information; S212: Calculating an intermediate value based on the byte replacement operation matrix; S213: Calculate the intermediate value The assumed power consumption data corresponding to the matrix is obtained, the Pearson correlation coefficient between the assumed power consumption data and the original data is calculated, and the interval with the maximum correlation coefficient, i.e., the interval of interest, is selected. The original data is subjected to dimensionality reduction processing through CPA, the power consumption data information within the interval of interest is retained, and the interval of interest on the original data corresponding to each byte of the known key is selected.
4. A deep learning side channel analysis method for efficiently recovering keys according to claim 3, characterized in that: In step S2, forming a data set further includes: S221: The byte label is set and outputted with the byte of the known key as the attack target. The calculation formula of the byte label is: in, The first byte, The first byte; S222, selecting energy traces in the interval of interest from the original data through CPA as the data set; S223: Select 70% of the data set as the training set, 10% as the validation set, and 20% as the test set.
5. A deep learning side channel analysis method for efficiently recovering keys according to claim 4, characterized in that: In step S3, constructing a single convolutional neural network model and establishing a side channel analysis deep learning model based on the single convolutional neural network model further includes: S31: establishing an input layer InputLayer for receiving the power consumption data information; S32: Establishing a network layer for processing the power consumption data information; S33: Establish an output layer Dense with 256 units, wherein the output layer Dense uses a softmax activation function network to output a probability distribution of 256 categories, corresponding to 256 seed keys; S34: Configure the single convolutional neural network model to obtain the side channel analysis deep learning model.
6. A deep learning side channel analysis method for efficiently recovering keys according to claim 5, characterized in that: In step S32, the network layer further includes: The network layer includes a first one-dimensional convolutional layer Conv1D, a first one-dimensional average pooling layer AveragePooling1D, a second one-dimensional convolutional layer Conv1D, a second one-dimensional average pooling layer AveragePooling1D, Flatten for converting multi-dimensional feature data into one-dimensional data, and a fully connected layer Dense with 256 units, and the activation function of the fully connected layer Dense is softmax.
7. A deep learning side channel analysis method for efficiently recovering keys according to claim 6, characterized in that: The step S4 further comprises: S41: Using model accuracy acc as the training indicator; S42: Input the training set into the side channel analysis deep learning model for training. After each training, use the current model to test the verification set, and record the model accuracy acc to view the quality of the current model. After reaching the preset number of steps, save the final model.
8. A deep learning side channel analysis method for efficiently recovering keys according to claim 7, characterized in that: In step S42, the calculation formula of the model accuracy acc is as follows: , in, represents the validation set, Indicates the first Power consumption curve, Indicates the correct key, represents the set of the power consumption curves when the guessed key is equal to the correct key, and the model accuracy acc is the ratio of the number of power consumption curves when the guessed key is equal to the correct key to the number of power consumption curves in the verification set.
9. A deep learning side channel analysis method for efficiently recovering keys according to claim 8, characterized in that: The step S5 further comprises: S51: Input the test set into the final model to attack and output the model; S52, saving the model output , performing a reverse operation on the model output to obtain the guessed key; S53, use The indicator evaluates the attack effect of the final model. The fewer attack curves used, the better the model.
10. A deep learning side channel analysis method for efficiently recovering keys according to claim 9, wherein Indicators further include: described The indicator is the ranking of the correct key among the guessed keys. The calculation formula of the ranking is as follows: , in, is the index value of the guessed key, The output of the model is 16 tensors with 256 elements, corresponding to the probabilities of 256 possible outcomes of guessing the key using 16 bytes. A tensor sorted in descending order.
Citation Information
Patent Citations
Different device side channel analysis method based on multi-label learning
CN116366229A
Side channel multi-byte key recovery analysis method based on multi-label learning
CN116388977A