A data rearrangement power consumption analysis method based on correlation ranking
Data rearrangement is performed by calculating the correlation coefficient between the energy trace and the 'benchmark' energy trace, which solves the dimension disaster problem caused by complex data processing in the existing technology, improves the success rate and versatility of power consumption analysis, and reduces the recovery cost. The number of energy traces required for the key.
Patent Information
- Application Number
- CN202210442260.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-04-26
AI Technical Summary
Existing power consumption analysis methods can easily lead to dimensionality disasters when processing complex data, affecting attack effects. Moreover, existing data preprocessing methods are complex and highly targeted, making it difficult to effectively reduce noise and improve attack success rates.
The data is rearranged by calculating the correlation coefficient between the energy trace and the 'baseline' energy trace, giving priority to analyzing the energy traces with higher correlation with the 'baseline', reducing the number of energy traces required to recover the key, and combining it with the Pearson correlation coefficient Sort and rearrange to improve attack success rate.
It improves the attack success rate in power consumption analysis and reduces the number of energy traces required to recover the key. The method has good versatility, is suitable for all block cipher algorithms, and can be superimposed with existing preprocessing methods. Further improve the analysis effect.
Smart Images

Figure CN114826550B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to a data rearrangement power consumption method based on correlation ranking, which performs power consumption analysis on an algorithm through data preprocessing. Background Art
[0002] Side channel analysis can analyze cryptographic algorithms through side information such as power consumption leaked during the operation of cryptographic devices. Among them, power consumption analysis method is one of the commonly used attack methods, including differential power analysis (DPA) and correlation power analysis (CPA). This type of analysis method does not require attackers to be familiar with cryptographic devices, but only needs to know the algorithms in the device. It has the advantages of high attack efficiency and low analysis cost.
[0003] In power consumption analysis, the characteristics of input data have a great impact on the performance of the attack, so data preprocessing methods play an important role in the entire attack process. As the amount of data continues to increase, the data that needs to be processed when analyzing the algorithm is becoming more and more complex, which can easily cause problems such as dimensionality disasters and affect the results of the experiment. Therefore, without data preprocessing, the existing power consumption analysis methods are difficult to complete the attack on the algorithm based only on the original energy trace of the algorithm, or the success rate of the attack is low. By preprocessing the original data, the noise can be effectively reduced, the amount of data required can be reduced, and the success rate of the attack can be increased.
[0004] The existing data preprocessing methods for power consumption analysis mainly include the following methods: (1) Introducing the idea of feature selection to screen effective features, that is, reducing the number of feature points in each energy trace to achieve the purpose of data dimensionality reduction, such as principal component analysis (PCA), linear discriminant analysis (LDA), isometric feature mapping (ISOMAP), etc. (2) Processing the energy trace accordingly through basic mathematical transformation or curve alignment techniques such as shift and reconstruction. The operation rules of this type of method are mainly aimed at the characteristics of the data itself. Appropriate rules help reduce the noise of the energy trace and improve the correlation of correctly guessing the key in power consumption analysis, such as centering, square matrix, static alignment, and alignment method based on wavelet transform. (3) Combining deep learning technology to process data, changing the storage method of data, and effectively improving its availability, such as imaging energy traces.
[0005] Existing data preprocessing methods can filter out noise data or amplify effective features through feature selection, data transformation or deep learning. These methods are relatively complex and highly targeted. Summary of the invention
[0006] In response to the problems of the background technology, the present invention proposes a data rearrangement method based on correlation ranking. By calculating the correlation coefficient between the energy trace and the "benchmark" energy trace and rearranging the energy trace data, when performing power consumption analysis, the energy traces with a higher correlation with the "benchmark" energy trace can be preferentially extracted for analysis, thereby improving the success rate of the attack and reducing the number of energy traces required to recover the key.
[0007] The technical solution for achieving the purpose of the present invention is:
[0008] A data rearrangement power consumption analysis method based on correlation ranking comprises the following steps:
[0009] (1) Obtain power consumption information;
[0010] Obtain the power consumption information leaked during the operation of the cryptographic device, i.e., the energy trace;
[0011] (2) Calculate the “baseline” energy trace;
[0012] Based on the acquired energy trace data, the “benchmark” energy trace is calculated using the mean method;
[0013] (3) Calculate the correlation coefficient between each energy trace and the “reference” energy trace;
[0014] The correlation coefficient of each energy trace with the “benchmark” energy trace was calculated based on the Pearson correlation coefficient;
[0015] (4) Data sorting;
[0016] According to the calculated correlation coefficient value, the correlation coefficient matrix is sorted in descending order from large to small, and the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value is set according to the sorting result;
[0017] (5) Data rearrangement;
[0018] Rearrange the original energy trace and plaintext data according to the set sorting position;
[0019] (6) Power consumption analysis;
[0020] Based on the rearranged energy traces and plaintext data, the power consumption analysis of cryptographic algorithms is realized.
[0021] In the data rearrangement power consumption analysis method of the present invention, the step (1) of obtaining power consumption information comprises the following specific steps:
[0022] (1.1) Obtaining the energy trace of the cryptographic algorithm to be attacked can be done through acquisition or from existing public data sets; the energy trace obtained is expressed as T =( t 1 ,…,t N ),in N represents the number of energy traces;
[0023] (1.2) Set the random plaintext to X= ( x 1 ,…,x N ),in N represents the number of energy traces, and the fixed key is key =( k 1,…, k byte ), byte Represents the number of bytes in the key.
[0024] In the data rearrangement power consumption analysis method of the present invention, the step (2) of calculating the "baseline" energy trace is specifically performed as follows:
[0025] (2.1) Calculate the average value of the data corresponding to each feature point position in all energy traces;
[0026] (2.2) Construct an energy trace using the data mean of all feature points of all energy traces, and use this energy trace as the “benchmark” energy trace benchmarkT , since averaging the sample data can effectively reduce the noise of the initial data, the benchmark energy trace benchmarkT Has lower noise in current environment.
[0027] In the data rearrangement power consumption analysis method of the present invention, the step (3) of calculating the correlation coefficient between each energy trace and the "reference" energy trace is specifically performed as follows:
[0028] (3.1) The Pearson correlation coefficient is used as the correlation evaluation index to evaluate the correlation between all energy traces and the "benchmark" energy trace. The closer the absolute value of the calculated correlation coefficient is to 1, the higher the correlation between the two samples. The calculation method of the Pearson correlation coefficient is as follows, where X represents an energy trace to be evaluated, Y represents the reference energy trace, cov(•) represents the covariance function, σ represents the sample standard deviation, E (•) represents the mathematical expectation function;
[0029]
[0030] (3.2) According to the Pearson correlation coefficient, the correlation coefficient between each energy trace and the "benchmark" energy trace is calculated to obtain a one-dimensional array coff , the number of elements it contains is the same as the number of initial energy traces; the larger the absolute value of the correlation coefficient, the closer the energy trace is to the "benchmark" energy trace and the smaller its noise deviation is; conversely, the smaller the absolute value of the correlation coefficient, the greater the noise it contains.
[0031] In the data rearrangement power consumption analysis method of the present invention, the data sorting in step (4) is specifically performed as follows:
[0032] (4.1) For the correlation coefficient array coff , sorted in descending order according to the correlation coefficient value;
[0033] (4.2) Set the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value according to the sorting result.
[0034] In the data rearrangement power consumption analysis method of the present invention, the data rearrangement in step (5) is specifically performed as follows:
[0035] (5.1) The original energy trace is sorted according to the set sorting position T Rearrange to form a new energy trace data set arrangeT ;
[0036] (5.2) Similarly, the plaintext data set is sorted according to the set sorting position X Rearrange to form a new plaintext data set arrangeX .
[0037] In the data rearrangement power consumption analysis method of the present invention, the power consumption analysis in step (6) comprises the following specific steps:
[0038] (6.1) The new energy trace dataset arrangeT and plaintext data arrangeX As the input data of the relevant power consumption analysis, the encryption algorithm is analyzed according to the analysis method. The energy traces that have been rearranged and arranged in front and have a high similarity with the "benchmark" energy trace will be prioritized for analysis to increase the success rate of the attack;
[0039] (6.2) Based on the input rearranged energy trace data and plaintext data, power consumption analysis is performed on the cryptographic algorithm to be attacked. The analysis ends when the success rate of the power consumption analysis reaches 100%, or when all energy traces have been superimposed during the analysis.
[0040] The beneficial effects of the present invention are:
[0041] (1) The method of the present invention has good versatility. It is applicable to the data preprocessing stage of non-modeling power consumption analysis methods for all block cipher algorithms, and is also applicable to the second-order power consumption analysis of block cipher algorithms.
[0042] (2) The method of the present invention performs preprocessing by rearranging the data, giving priority to analyzing energy traces with relatively low noise, effectively expanding the correlation between the assumed power consumption and the measured energy traces under the condition of correctly guessing the key during the analysis process, and reducing the number of energy traces required to recover the key;
[0043] (3) The method of the present invention can be directly superimposed with existing preprocessing methods such as centering, square matrix, fast Fourier series and normalization to further improve the availability of input data, thereby improving the relevance of power consumption analysis and reducing the number of energy traces required to recover the key. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A power consumption analysis structure diagram of data rearrangement based on correlation ranking according to the method of the present invention;
[0045] Figure 2 The present invention is a flow chart of power consumption analysis based on data rearrangement and correlation ranking according to the method of the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited thereto. Example
[0047] Reference Figure 1-2 , a data rearrangement power consumption analysis method based on correlation ranking, taking the classic block cipher algorithm AES as an example, realizes data preprocessing of power consumption data and performs relevant power consumption analysis. The specific steps are as follows:
[0048] (1) Obtain the power consumption information of the AES algorithm during the operation of the cryptographic device, namely the energy trace;
[0049] (2) Calculate the “baseline” energy trace based on the acquired energy trace data;
[0050] (3) Calculate the correlation coefficient between each energy trace and the “reference” energy trace;
[0051] (4) According to the calculated correlation coefficient value, the correlation coefficient matrix is sorted in descending order from large to small, and the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value is set according to the sorting result;
[0052] (5) Rearrange the energy trace and plaintext data of the AES algorithm according to the sorting position;
[0053] (6) Based on the rearranged energy trace and plaintext data, the power consumption analysis of the AES algorithm is realized.
[0054] Step (1) obtains the power consumption information of the AES algorithm during the operation of the cryptographic device. This embodiment is completed through data collection. The specific steps are as follows:
[0055] (1.1) For the classic block cipher algorithm AES, the algorithm is implemented based on ARM Cortex M4 and burned on the ARM board. After correctness verification, the power consumption of the device at runtime is collected using the power consumption collection platform;
[0056] (1.2) Select 5000 random plaintexts and fixed keys key
[16] ={0x11, 0x22, 0x33, 0x44,0x55, 0x66, 0x77, 0x88, 0x99, 0x00, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}. 5000 energy traces are collected for data processing and related power consumption analysis. Each power consumption curve has 20000 points.
[0057] Step (2) calculates the “baseline” energy trace based on the collected power consumption data. The specific steps are as follows:
[0058] (2.1) Calculate the average value of the data corresponding to each feature point position in all energy traces benchmarkT ;
[0059] (2.2) benchmarkT As the "benchmark" energy trace of the AES algorithm in the current environment.
[0060] Step (3) calculates the correlation coefficient between each energy trace and the “baseline” energy trace. The specific steps are as follows:
[0061] (3.1) Select the Pearson correlation coefficient as the calculation method for each energy trace and benchmarkT Statistics of correlation coefficients between
[0062] (3.2) According to the Pearson correlation coefficient, the correlation coefficient between each energy trace and the "benchmark" energy trace is calculated to obtain a one-dimensional array coff , the number of elements it contains is the same as the number of initial energy traces; the larger the absolute value of the correlation coefficient, the closer the energy trace is to the "benchmark" energy trace and the smaller its noise deviation is; conversely, the smaller the absolute value of the correlation coefficient, the greater the noise it contains.
[0063] In step (4), the correlation coefficients are sorted in descending order, and the sorting position of the input data is set according to the sorting result. The specific steps are as follows:
[0064] (4.1) For the correlation coefficient array coff , sorted in descending order according to the correlation coefficient value;
[0065] (4.2) According to the sorting result, the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value is set.
[0066] Step (5) rearranges the energy trace and plaintext data of the AES algorithm. The specific steps are as follows:
[0067] (5.1) Raw energy trace of the AES algorithm according to the sorting position T Rearrange to form a new energy trace data set arrangeT ;
[0068] (5.2) Plaintext data set for AES algorithm according to sorting position X Rearrange to form a new plaintext data set arrangeX .
[0069] Step (6) Based on the rearranged energy trace and plaintext data, the power consumption analysis of the AES algorithm is realized. The specific steps are as follows:
[0070] (6.1) The new energy trace dataset arrangeT and plaintext data arrangeX As input data for relevant power consumption analysis, the AES algorithm is analyzed according to the analysis method;
[0071] (6.2) The corresponding key analysis result is {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,0x88, 0x99, 0x00, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}. The real key of the AES algorithm is {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, 0xaa, 0xbb,0xcc, 0xdd, 0xee, 0xff}, which ends the power consumption analysis process for the AES block cipher algorithm.
[0072] The data rearrangement power consumption analysis method of the present invention can analyze the data with relatively low noise first by rearranging the data, thereby improving the success rate of the attack and reducing the number of energy traces required.
Claims
1. A data rearrangement power consumption analysis method based on correlation ranking, characterized in that: The steps include: (1) Obtain power consumption information; Obtain the power consumption information leaked during the operation of the cryptographic device, i.e., the energy trace; (2) Calculate the "baseline" energy trace; Based on the acquired energy trace data, the "baseline" energy trace is calculated using the mean method. The specific steps are as follows: (2.1) Calculate the average value of the data corresponding to each feature point position in all energy traces; (2.2) Construct an energy trace using the data mean of all feature points of all energy traces, and use this energy trace as the "baseline" energy trace benchmarkT ; (3) Calculate the correlation coefficient between each energy trace and the "baseline" energy trace; The correlation coefficient between each energy trace and the "benchmark" energy trace is calculated based on the Pearson correlation coefficient. The specific steps are as follows: (3.1) The Pearson correlation coefficient is used as the correlation evaluation index to evaluate the correlation between all energy traces and the "baseline" energy trace. The closer the absolute value of the calculated correlation coefficient is to 1, the higher the correlation between the two samples. The calculation method of the Pearson correlation coefficient is as follows, where X represents an energy trace to be evaluated, Y represents the reference energy trace, cov(•) represents the covariance function, σ represents the sample standard deviation, E (•) represents the mathematical expectation function; ; (3.2) Based on the Pearson correlation coefficient, the correlation coefficient between each energy trace and the "baseline" energy trace is calculated to obtain a one-dimensional array coff , the number of elements it contains is the same as the number of initial energy traces; the larger the absolute value of the correlation coefficient, the closer the energy trace is to the "benchmark" energy trace and the smaller its noise deviation is; conversely, the smaller the absolute value of the correlation coefficient, the greater the noise it contains; (4) Data sorting; According to the calculated correlation coefficient value, the correlation coefficient matrix is sorted in descending order from large to small, and the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value is set according to the sorting result; (5) Data rearrangement; Rearrange the original energy trace and plaintext data according to the set sorting position; (6) Power consumption analysis; Based on the rearranged energy traces and plaintext data, the power consumption analysis of the cryptographic algorithm is realized. The specific steps are as follows: (6.1) The new energy trace dataset arrangeT and plaintext data arrangeX As the input data of the relevant power consumption analysis, the cryptographic algorithm to be attacked is analyzed according to the analysis method. The energy traces that have been rearranged and arranged in front and have a high similarity with the "benchmark" energy trace will be prioritized for analysis to increase the success rate of the attack; (6.2) Based on the input rearranged energy trace data and plaintext data, power consumption analysis is performed on the cryptographic algorithm to be attacked. The analysis ends when the success rate of the power consumption analysis reaches 100%, or when all energy traces have been superimposed during the analysis.
2. The data rearrangement power consumption analysis method according to claim 1, characterized in that: The specific steps of obtaining power consumption information in step (1) are as follows: (1.1) Obtain the energy trace of the cryptographic algorithm to be attacked, which can be completed by acquisition or obtained from an existing public data set; the obtained energy trace is expressed as T =( t 1 ,…,t N ),in N represents the number of energy traces; (1.2) Set the random plaintext to X= ( x 1 ,…,x N ),in N represents the number of energy traces, and the fixed key is key =( k 1,…, k byte ), byte Represents the number of bytes in the key.
3. The data rearrangement power consumption analysis method according to claim 1, characterized in that: The data sorting in step (4) is specifically performed as follows: (4.1) For the correlation coefficient array coff , sorted in descending order according to the correlation coefficient value; (4.2) Set the sorting position of the original energy trace and plaintext data corresponding to the correlation coefficient value according to the sorting result.
4. The data rearrangement power consumption analysis method according to claim 1, characterized in that: The data rearrangement in step (5) is specifically performed as follows: (5.1) The original energy trace is sorted according to the set sorting position T Rearrange to form a new energy trace data set arrangeT ; (5.2) Similarly, the plaintext data set is sorted according to the set sorting position X Rearrange to form a new plaintext data set arrangeX .
