An automated side-channel SPA attack method

CN117834106BActive Publication Date: 2026-09-15BEIJING CEC HUADA ELECTRONIC DESIGN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410003593.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2026-09-15
Estimated Expiration
2044-01-02

AI Technical Summary

Technical Problem

[0004]传统的SPA攻击主要依赖于人工操作,在原始功耗曲线上选取对应的基础运算单元特征或者较明显的基础运算单元分界线特征,然后人工遍历曲线,肉眼数曲线上的特征分布并记录,将之转换为对应的过程数据,这种传统的方式在面对长比特密钥计算的密码学算法(如ECC256、ECC512)时,效率很低且很容易由于人工遍历出错导致整个过程数据无效,最终导致攻击目标数据失败

Benefits of technology

[0005] The purpose of this invention is to provide an automated side-channel SPA attack method that reduces the error rate caused by manual traversal and greatly improves the efficiency of the attack.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117834106B_ABST
    Figure CN117834106B_ABST
Patent Text Reader

Abstract

The application is an automatic side channel SPA attack method, the original power consumption data curve is automatically processed, the relatively clear basic transport unit power consumption feature template is artificially recognized first, the correlation of the template at each position on the curve is calculated respectively through traversing the complete curve, so that the approximate position distribution of the basic operation unit on the curve is found, then the position is further clarified through the binarization operation, and the target data to be attacked is generated through reading and analyzing the position and the interval. Through the template matching, binarization and other operations on the original power consumption data curve, the proportion of manual analysis in the SPA attack process is reduced, the analysis efficiency is improved, and the errors introduced by manual analysis are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of chip security attacks, specifically involving an automated side-channel SPA attack method. Background Technology

[0002] Simple Power Analysis (SPA) is a common side-channel attack method in chip attack techniques. It is widely used in chip attacks because of its simple principle and good results.

[0003] The main principle of SPA is that when cryptographic operations are performed inside the chip, different data correspond to different underlying logic operations, and different logic operations generate different energy consumption. If the chip does not have relevant security design, the attack target data can be obtained by simply analyzing the power consumption, and then the relevant key data can be deduced and calculated.

[0004] Traditional SPA attacks mainly rely on manual operation. They involve selecting the corresponding basic operation unit features or obvious basic operation unit boundary features on the original power consumption curve, and then manually traversing the curve, counting and recording the feature distribution on the curve, and converting it into corresponding process data. This traditional method is very inefficient when facing cryptographic algorithms that compute long-bit keys (such as ECC256 and ECC512). It is also easy for errors in manual traversal to invalidate the entire process data, ultimately leading to the failure of the attack target data. Summary of the Invention

[0005] The purpose of this invention is to provide an automated side-channel SPA attack method that reduces the error rate caused by manual traversal and greatly improves the efficiency of the attack.

[0006] The core idea of ​​this invention is to completely replace manual analysis with machine-based data analysis after identifying the power consumption characteristics of the basic computing unit, thereby reducing human-introduced errors and achieving highly efficient and accurate SPA attacks. A detailed technical solution is described below:

[0007] The method of the present invention mainly includes the following steps:

[0008] Step 1: After manually identifying the feature template of the basic computing unit, traverse the complete curve and calculate the correlation between the template and each position of the power consumption curve to generate the template matching correlation result curve.

[0009] Step 2: Select appropriate critical parameter values ​​for the template matching correlation curve and perform binarization to generate a binarized curve;

[0010] Step 3: Read the binarized curve, calculate and analyze the position of the basic operation unit on the original power consumption curve and the spacing between adjacent units, corresponding to the bit values ​​of the operation process data, thereby generating the corresponding attack target data. When traversing the binarized result curve, if an ambiguous value that does not conform to the cryptographic operation rule is encountered, different attack target data are generated by traversing and guessing. For example, if there is a large gap between two adjacent "1"s on the curve, it is considered that the binarization parameter settings are inappropriate, resulting in the loss of some operation features. The approximate number of missing operation features can be calculated by the interval time, and then "0" and "1" are used to guess and fill them into the complete attack result data.

[0011] Step 4: Use the generated attack target data and input it into the data calculation module for correctness verification. If the verification is correct, output the attack data.

[0012] Step 5: If the above verification attack result is incorrect, adjust the critical parameters and repeat steps 2, 3, and 4 until the verification is correct and the attack data is output.

[0013] The method of the present invention can be better and more comprehensively understood by referring to the specific embodiments and accompanying drawings. Attached Figure Description

[0014] Figure 1 This is an example of analyzing the original power consumption curve using a template matching attack module (100).

[0015] Figure 2 This is an example of analyzing the template matching result curve using a binarization module (200).

[0016] Figure 3 This is an example of analyzing the binarized result curve (300).

[0017] Figure 4 This is a schematic diagram of the steps of an automated side-channel SPA attack method according to the present invention. Detailed Implementation

[0018] The core of the design concept and method of this invention is to use a computer to automatically traverse the data curve to replace the manual analysis and statistics of the data curve, and to guess and traverse the less clear nodes on the curve, which greatly reduces the human effort consumed and improves the efficiency of the attack.

[0019] like Figure 4 The diagram shows a flowchart of the automated side-channel SPA attack method of the present invention.

[0020] Step 1: After manually identifying the feature template of the basic computing unit, traverse the complete curve and calculate the correlation between the template and each position of the power consumption curve to generate the template matching correlation result curve.

[0021] Step 2: Select appropriate critical parameter values ​​for the template matching correlation curve and perform binarization to generate a binarized curve;

[0022] Step 3: Read the binarized curve, calculate and analyze the position of the basic operation unit on the original power consumption curve and the spacing between adjacent units, and assign them to the bit values ​​of the operation process data to generate the corresponding attack target data.

[0023] Step 4: Use the generated attack target data to perform a correctness verification in the mathematical attack module. If the verification is correct, output the attack target data.

[0024] Step 5: If the above verification attack result is incorrect, adjust the critical parameters and repeat steps 2, 3, and 4 until the verification is correct and the attack target data is output. Figure 1 By analyzing the details of the curve, we can find recurring power consumption characteristics and guess the power consumption template of the basic operation unit. Then, we can use this template as a reference to calculate the correlation between each position of the original power consumption curve and the template, and obtain the template matching result map. Taking the ECC256 algorithm as an example, the core calculation process is K·G operation. The entire operation includes two basic operation units: point addition and point doubling. We can find recurring characteristics on the complete power consumption curve, assume one period as the power consumption template of point addition or point doubling, and then perform correlation calculation between the template and each position on the curve to obtain the position distribution of the basic operation unit on the complete power consumption map.

[0025] Figure 1 Because the power consumption curve is a simulated signal, there will be some error in the correlation analysis. Therefore, the correlation results are densely distributed. The ones with higher correlation are those that have performed the same operation as the template. Thus, the approximate distribution of the basic operation units on the power consumption curve was found.

[0026] Figure 1 The correlation curves in the graph contain many interfering terms, so a filtering operation is needed to find the true operation location distribution map. By using a binarization method and setting an appropriate critical parameter, the true operation location and interfering terms can be distinguished more accurately. Taking the ECC256 algorithm as an example, in the location distribution map obtained by the above steps, there will be some erroneous power consumption characteristics before and after each operation unit location, which will also calculate a high correlation result. Therefore, a critical binarization parameter needs to be set, such as 0.9. Then, the correlation coefficient greater than 0.9 is considered to be the true basic operation unit, while the correlation coefficient less than 0.9 is considered to be an erroneous interfering term. After binarization, the interfering terms will be separated out.

[0027] Figure 2By setting appropriate critical parameters, the correlation results are binarized to remove interference terms that could affect subsequent analysis. The correlation results after this operation are the accurate distribution of computational positions.

[0028] Figure 2 The selection of the critical parameter is crucial and needs to be analyzed in conjunction with the specific algorithm being executed. The parameter can also be adjusted based on the feedback from subsequent attack results until the correct target data is obtained. Taking the ECC256 algorithm as an example, the KG operation requires 256 iterations of the basic operation. If the distribution of the basic operation units in the binarized result is much larger or smaller than 256, it is considered that the critical parameter is set too small or too large. The parameter can then be adjusted until the basic operation units in the result are close to 256.

[0029] Figure 3 To analyze the binarization results, each value of 1 is used as a marker to indicate the end of the operation. Different basic operations are distinguished based on the length of the interval between adjacent 1s, thereby analyzing the corresponding calculation process data. Figure 3 Taking dot product as an example, in a complete dot product operation, the more time-consuming part is the dot addition operation, and the less time-consuming part is the dot multiplication operation. By calculating and analyzing the complete curve through the program, the complete distribution of dot addition and dot multiplication points can be obtained, thus obtaining complete operation data. If, during the traversal, a 1 appears only after a long interval or multiple 1s appear consecutively after a short interval, it can be inferred that there was an error in the previous correlation calculation, resulting in the loss of basic operation units or interference from erroneous values. In this case, the more ambiguous data can be traversed by guessing.

[0030] Figure 3 After obtaining the process data, it is input into the mathematical attack module for calculation and verification. If the verification is successful, the final attack result data is output; if unsuccessful, it returns to step 2 to adjust the binarization parameters and continues the analysis until the attack data is successfully verified. Taking the ECC algorithm as an example, substituting the K value obtained from the above steps into s = (k)-1·(Hash(MSG)+r*d)mod n, the private key d can be calculated.

[0031] The key point of this invention is to replace manual operation with automatic data analysis and processing by computer, which greatly improves efficiency. At the same time, it can also guess and traverse some ambiguous process data, which greatly improves the success rate of attacks.

[0032] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. An automated side-channel SPA attack method, characterized in that, Includes the following steps: Step 1: After manually identifying the feature template of the basic computing unit, traverse the complete curve and calculate the correlation between the template and each position of the power consumption curve to generate the template matching correlation result curve. Step 2: Select appropriate critical parameter values ​​for the template matching correlation curve and perform binarization to generate a binarized curve; Step 3: Read the binarized curve, calculate and analyze the position of the basic operation unit on the original power consumption curve and the spacing between adjacent units, and correspond them to the bit values ​​of the operation process data to generate the corresponding attack target data; Step 4: Use the generated attack target data to perform correctness verification in the mathematical attack module. If the verification is correct, output the attack target data. Step 5: If the above verification is incorrect, adjust the critical parameters and repeat steps 2, 3, and 4 until the verification is correct and the attack target data is output.

2. The side-channel SPA attack method as described in claim 1, characterized in that: The correlation curve generated in step 1 corresponds perfectly with the original power consumption curve on the horizontal axis.

3. The side-channel SPA attack method as described in claim 1, characterized in that: The parameters set in step 2 during the binarization operation are different, and the binarization result cannot be completely correct. When traversing the binarization result curve, if an ambiguous value that does not conform to the rules of cryptographic operation is encountered, different attack target data is generated by traversing and guessing.

4. The side-channel SPA attack method as described in claim 1, characterized in that: In step 3, generating the corresponding attack target data requires another cryptographic operation to verify the validity of the data. If valid, the attack target data is output.

5. The side-channel SPA attack method as described in claim 1, characterized in that: If the verification in step 5 is incorrect, the critical parameters in step 2 need to be adjusted to regenerate the binarized curve until the target data is verified correctly in step 4 or the maximum number of attacks is reached and the attack stops.

Citation Information

Patent Citations

  • Key detection method applied to SM2 signature and system thereof

    CN106357378A

  • Rotorcraft Quiet Modes

    US20220169377A1