Fault injection method and device and electronic equipment

By obtaining the energy curve and layout of the chip, combined with signal processing and correlation analysis, the key time points and locations are determined, and a fault injection method in both space and time domains is used to solve the problem of low fault injection accuracy and efficiency in the existing technology, and achieve for more efficient fault injection.

CN118733369AActive Publication Date: 2024-10-01BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410755123.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-01
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Existing fault injection methods have problems such as low fault injection accuracy and low fault injection attack efficiency.

Method used

By obtaining the energy curve of the chip under test, signal processing is performed to filter out the execution time interval, calculate key time points based on the correlation between input data and output data, and determine the fault injection scanning method based on the functional area distribution map to perform space-time dual domain Fault injection scans to identify critical physical locations.

Benefits of technology

It improves the accuracy of fault injection and attack efficiency, achieving more accurate fault injection positioning and a higher success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733369A_ABST
    Figure CN118733369A_ABST
Patent Text Reader

Abstract

The invention provides a fault injection method and device and electronic equipment, and belongs to the technical field of chips. The method comprises the following steps: acquiring an energy curve of a to-be-tested chip during working; performing signal processing on the energy curve to screen out an operation execution time interval of the chip to be tested in the energy curve; calculating a key time point in the operation execution time interval based on the correlation between the input data of the chip to be tested and the energy curve and the correlation between the output data of the chip to be tested and the energy curve; obtaining a functional area distribution diagram of the to-be-tested chip layout; determining a fault injection scanning mode based on the fault protection type of the object to be subjected to fault injection in the functional area distribution diagram; and performing fault injection scanning based on the fault injection scanning mode, and determining a key physical position point based on a scanning result. According to the fault injection method based on the time domain and the space domain, the key time point and the key physical position point are positioned from the time domain and the space domain respectively, and the fault injection accuracy and the fault injection attack efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to a fault injection method, a fault injection device, an electronic device, a fault injection system, a machine-readable storage medium and a computer program product. Background Art

[0002] Fault injection attacks refer to the introduction of faults during the normal operation of chips and cryptographic modules, causing them to be in an abnormal working state, thereby causing unexpected changes in program flow, data flow, etc., leading to the output of erroneous results, or even leakage of sensitive information, etc. Common fault injection methods include voltage, laser, electromagnetic, bias, radiation, temperature, etc. In order to evaluate the anti-fault attack capabilities of chips and cryptographic modules, attackers usually try various fault injection methods and attack parameter combinations for testing.

[0003] Existing fault injection methods have the problems of low fault injection accuracy and low fault injection attack efficiency. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a fault injection method, a fault injection device, an electronic device, a fault injection system, a machine-readable storage medium and a computer program product to solve the problems of low fault injection accuracy and low fault injection attack efficiency in existing fault injection methods.

[0005] In order to achieve the above object, an embodiment of the present invention provides a fault injection method, including:

[0006] Obtain the energy curve of the chip under test when it is working;

[0007] Performing signal processing on the energy curve to filter out a time interval in which the chip under test performs calculations in the energy curve;

[0008] Based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, calculate the key time point in the execution operation time interval;

[0009] Obtain a functional area distribution map of the chip layout to be tested;

[0010] Determine a fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map;

[0011] A fault injection scan is performed based on the fault injection scan method, and a key physical location point is determined based on the scan result.

[0012] Optionally, the performing signal processing on the energy curve to filter out a time interval for executing calculations of the chip under test in the energy curve includes:

[0013] Performing noise reduction processing on the energy curve;

[0014] The amplitude points in the energy curve after the noise reduction process that are greater than or equal to the set energy threshold are screened out to screen out the execution operation time interval of the chip under test in the energy curve.

[0015] Optionally, the performing noise reduction processing on the energy curve includes:

[0016] The energy curve is subjected to any one of filtering, moving average processing and Fourier transform noise reduction processing.

[0017] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0018] Calculating a first Pearson correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Pearson correlation coefficient within the execution operation time interval as an input data time point;

[0019] Calculating a second Pearson correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point;

[0020] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0021] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0022] Calculating a first Spearman correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Spearman correlation coefficient within the execution operation time interval as an input data time point;

[0023] Calculating a second Spearman correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point;

[0024] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0025] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0026] When the fault protection type of the object to be injected with fault in the functional area distribution map is no fault protection, the fault injection scanning mode is determined to be point-by-point fault injection.

[0027] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0028] When the fault protection type of the object to be injected with fault in the functional area distribution map is spatial randomization protection, the fault injection scanning mode is determined to be random point fault injection.

[0029] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0030] In the case where the fault protection type of the object to be injected into the functional area distribution map is a distributed sensor detection circuit, the fault injection scanning mode is determined to be an arbitrary shape fault injection.

[0031] On the other hand, an embodiment of the present invention further provides a fault injection device, including:

[0032] The first acquisition module is used to acquire the energy curve of the chip under test when it is working;

[0033] A signal processing module, used for performing signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve;

[0034] A correlation analysis module, used to calculate the key time point in the execution operation time interval based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve;

[0035] The second acquisition module is used to obtain a functional area distribution map of the chip layout to be tested;

[0036] A scanning mode determination module, used to determine a fault injection scanning mode based on the fault protection type of the object to be injected into the functional area distribution map;

[0037] The location point determination module is used to perform a fault injection scan based on the fault injection scanning method and determine a key physical location point based on the scanning result.

[0038] Optionally, the performing signal processing on the energy curve to filter out a time interval for executing calculations of the chip under test in the energy curve includes:

[0039] Performing noise reduction processing on the energy curve;

[0040] The amplitude points in the energy curve after the noise reduction process that are greater than or equal to the set energy threshold are screened out to screen out the execution operation time interval of the chip under test in the energy curve.

[0041] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0042] Calculating a first Pearson correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Pearson correlation coefficient within the execution operation time interval as an input data time point;

[0043] Calculating a second Pearson correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point;

[0044] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0045] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0046] Calculating a first Spearman correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Spearman correlation coefficient within the execution operation time interval as an input data time point;

[0047] Calculating a second Spearman correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point;

[0048] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0049] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0050] When the fault protection type of the object to be injected with fault in the functional area distribution map is no fault protection, the fault injection scanning mode is determined to be point-by-point fault injection.

[0051] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0052] When the fault protection type of the object to be injected with fault in the functional area distribution map is spatial randomization protection, the fault injection scanning mode is determined to be random point fault injection.

[0053] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0054] In the case where the fault protection type of the object to be injected into the functional area distribution map is a distributed sensor detection circuit, the fault injection scanning mode is determined to be an arbitrary shape fault injection.

[0055] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned fault injection method when executing the program.

[0056] On the other hand, the present invention also provides a fault injection system, comprising the above-mentioned electronic device, a signal acquisition device for collecting the energy curve of the chip to be tested when it is working, and an image imaging device for identifying the functional areas of the chip layout to be tested to form a functional area distribution map; the signal acquisition device is also used to send the energy curve to the electronic device, and the image imaging device is also used to send the functional area distribution map to the electronic device.

[0057] On the other hand, the present invention further provides a machine-readable storage medium having a computer program stored thereon, and the computer program implements the above-mentioned fault injection method when executed by a processor.

[0058] On the other hand, the present invention further provides a computer program product, comprising a computer program, wherein the computer program implements the above fault injection method when executed by a processor.

[0059] Through the above technical scheme, the embodiment of the present invention determines the key time point for fault injection in the energy curve of the chip to be tested through signal processing and correlation analysis in the time domain; in the spatial domain, the fault injection scanning method is determined by the fault protection type of the object to be injected in the functional area distribution diagram, and the key physical location point of the fault injection is determined through the fault injection scanning method. The embodiment of the present invention adopts a fault injection method based on the dual domains of time and space, and locates the key time point and the key physical location point from the two dimensions of the time domain and the space domain, thereby improving the accuracy of fault injection and the efficiency of fault injection attack.

[0060] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0062] Figure 1 This is one of the flow charts of the fault injection method provided by the present invention;

[0063] Figure 2 This is the second flow chart of the fault injection method provided by the present invention;

[0064] Figure 3 It is a schematic diagram of locating the key time points in the time interval of the chip to be tested performing calculations provided by the present invention;

[0065] Figure 4 is a schematic diagram of point-by-point fault injection provided by the present invention;

[0066] Figure 5 is a schematic diagram of random point fault injection provided by the present invention;

[0067] Figure 6 is a schematic diagram of arbitrary shape fault injection provided by the present invention;

[0068] Figure 7 This is the third flow chart of the fault injection method provided by the present invention;

[0069] Figure 8 It is a structural schematic diagram of the fault injection device provided by the present invention;

[0070] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0071] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0072] Method Embodiment

[0073] Please refer to Figure 1 , an embodiment of the present invention provides a fault injection method, comprising:

[0074] Step 100: Obtain an energy curve of the chip under test when it is working.

[0075] The operator who implements the fault injection can send instructions through the host computer to put the chip to be tested and the cryptographic device in normal working state, and use the signal acquisition device (such as an oscilloscope, etc.) to collect the energy curve of the leakage of the chip to be tested. The electronic device connected to the signal acquisition device obtains the energy curve of the chip to be tested when it is working. Among them, the energy curve can be a curve reflecting the relationship between the working voltage amplitude and time of the chip to be tested, or it can be a curve reflecting the relationship between the working current amplitude and time of the chip to be tested. The embodiment of the present invention is described by taking the energy curve reflecting the relationship between the working voltage amplitude and time of the chip to be tested as an example.

[0076] Please note that, please refer to Figure 2 , fault injection generally includes four parts: fault injection environment construction, fault injection location, fault injection implementation, and fault injection result statistical analysis. In order to solve the above-mentioned problems of low fault injection accuracy and low fault injection attack efficiency, the present invention proposes a fault injection method based on time and space dual domains for fault injection location and fault injection implementation process, and performs fault injection location from the time domain and space domain respectively, thereby improving the fault injection accuracy and improving the fault injection attack efficiency. The following describes the fault injection method from the time and space domain and the space domain.

[0077] Step 200: performing signal processing on the energy curve to filter out a time interval in which the chip under test performs calculations in the energy curve.

[0078] In order to make the curve characteristics of the energy curve more obvious and eliminate the interference of noise, the electronic device can perform noise reduction processing on the energy curve to remove the interference of noise in the energy curve, so as to screen out the execution operation time interval of the chip under test in the energy curve. Since the amplitude of the energy curve when the chip under test performs the operation is different from the amplitude when the chip under test does not perform the operation, the execution operation time interval of the chip under test in the energy curve can be screened out based on the difference between the amplitude when the chip under test performs the operation and the amplitude when the chip under test does not perform the operation.

[0079] Step 300: Calculate the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve.

[0080] Since the input data of the chip to be tested is correlated with the energy curve, that is, the amplitude of the energy curve is related to the data volume of the input data of the chip to be tested. If the input data of the chip to be tested is different, the amplitude of the energy curve of the chip to be tested at the same time will also be different. Therefore, by calculating the correlation between the input data of the chip to be tested and the amplitude in the energy curve in the execution operation time interval (for example, 0-200 microseconds), the time with the strongest correlation between the two is found, which is the time point of input data on the energy curve of the chip to be tested. Similarly, since the output data of the chip to be tested is correlated with the energy curve, that is, the amplitude of the energy curve is related to the data volume of the output data of the chip to be tested. If the output data of the chip to be tested is different, the amplitude of the energy curve of the chip to be tested at the same time will also be different. Therefore, by calculating the correlation between the output data of the chip to be tested and the amplitude in the energy curve in the execution operation time interval (for example, 0-200 microseconds), the time with the strongest correlation between the two is found, which is the time point of output data on the energy curve of the chip to be tested. Then, please refer to Figure 3 The time point between the time point of inputting data on the energy curve of the chip under test and the time point of outputting data on the energy curve of the chip under test is the key time point in the time interval of the chip under test to perform calculations. Fault injection should be performed at this key time point to accurately control the fault injection time, thereby improving the accuracy of fault injection. The embodiment of the present invention finds the key time point for fault injection in the time domain dimension through a signal processing method and a data correlation statistical method.

[0081] Step 400: Obtain a functional area distribution map of the chip layout to be tested.

[0082] For example, the embodiment of the present invention can use imaging equipment, such as a microscope, a near-infrared imager, etc., to identify the distribution of the main functional areas on the layout of the chip to be tested, such as the layout positions of digital logic circuits, analog circuits, memory decoding circuits, interface circuits, etc., and obtain a functional area distribution map. The electronic device obtains the functional area distribution map of the layout of the chip to be tested from the imaging equipment.

[0083] Step 500: Determine a fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map.

[0084] The electronic device can select the physical location area corresponding to the fault injection in the functional area distribution map according to the object to be injected, such as the cryptographic operation digital circuit, data storage unit, analog detection circuit, etc. The embodiment of the present invention selects the appropriate fault injection scanning method for different fault protection types. The traditional fault injection attack adopts the point-by-point fault injection method, please refer to Figure 4 As shown. If there is a fault protection detection circuit in the chip layout, when the scanning fault is injected into the fault protection detection circuit, it will cause the fault protection detection circuit to respond, thereby generating an alarm or reset operation. At this time, you can choose the following according to the situation: Figure 5 Random point fault injection as shown, or Figure 6 The scanning method of arbitrary shape fault injection shown. The embodiment of the present invention determines the fault injection scanning method based on the fault protection type of the object to be fault injected in the functional area distribution map, and can effectively avoid different fault protection types through different fault injection scanning methods (such as point-by-point fault injection, random point fault injection, and arbitrary point fault injection), thereby improving the fault injection efficiency and the success rate of fault injection.

[0085] Step 600: Perform a fault injection scan based on the fault injection scanning method, and determine a key physical location point based on the scanning result.

[0086] On the basis of determining the fault injection scanning method, the electronic device can perform a fault injection scan based on the fault injection scanning method, and determine the key physical location point based on the scanning result. For example, when the fault injection scanning method is point-by-point fault injection, after scanning the point-by-point fault injection once, according to the output result, it is known which position has a fault error, and this position is the key physical location point. Therefore, the present invention adopts a fault injection method based on the dual domains of time and space, and locates the key time point and the key physical location point from the two dimensions of the time domain and the space domain respectively, so that the fault injection position is more accurate.

[0087] The embodiment of the present invention determines the key time point for fault injection in the energy curve of the chip to be tested through signal processing and correlation analysis in the time domain; in the space domain, the fault injection scanning method is determined by the fault protection type of the object to be injected in the functional area distribution diagram, and the key physical location point of the fault injection is determined through the fault injection scanning method. The embodiment of the present invention adopts a fault injection method based on the dual domains of time and space, and locates the key time point and the key physical location point from the two dimensions of the time domain and the space domain, thereby improving the accuracy of fault injection and the efficiency of fault injection attack.

[0088] In other aspects of the embodiments of the present invention, step 200, performing signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve, includes: performing noise reduction processing on the energy curve; filtering out amplitude points in the energy curve after noise reduction processing that are greater than or equal to the set energy threshold, to filter out the execution operation time interval of the chip under test in the energy curve.

[0089] Specifically, in one embodiment, the energy curve is subjected to noise reduction processing, including: filtering, moving average processing, and any one of Fourier transform noise reduction processing on the energy curve. The filtering may adopt a limiting filtering method, a median filtering method, an arithmetic mean filtering method, and the like.

[0090] By using any one of the noise reduction processes such as filtering, moving average and Fourier transform to perform noise reduction on the energy curve, the signal-to-noise ratio of the energy curve is improved, so as to more accurately and qualitatively determine the execution time interval of the operation. Since the amplitude of the energy curve will be higher than the amplitude when the operation is not performed when the chip to be tested is performing the operation, the execution time interval of the operation of the chip to be tested in the energy curve can be preliminarily and qualitatively determined by setting the energy threshold. For example, in the energy curve of 0-500 microseconds, the amplitude of 0-200 microseconds is higher than or equal to the set energy threshold, then 0-200 microseconds is determined as the execution time interval of the operation of the chip to be tested in the energy curve. Therefore, the embodiment of the present invention qualitatively determines the time interval for the chip to be tested to perform the operation by comparing the signal processing method of noise reduction with the threshold of setting the energy threshold.

[0091] In other aspects of the embodiments of the present invention, step 300, based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve, calculate the key time point in the execution operation time interval, including: calculating the first Pearson correlation coefficient between the input data of the chip to be tested and the energy curve within the execution operation time interval, and determining the peak point time of the first Pearson correlation coefficient within the execution operation time interval as the input data time point; calculating the second Pearson correlation coefficient between the output data of the chip to be tested and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point; determining the time point between the input data time point and the output data time point as the key time point in the execution operation time interval.

[0092] In the embodiment of the present invention, the first Pearson correlation coefficient between the data volume of the input data of the chip to be tested and the amplitude of the energy curve at each moment in the execution operation time interval (for example, 0-200 microseconds) is calculated by the Pearson correlation calculation method, and the peak point time (for example, 0 microseconds) of the first Pearson correlation coefficient in the execution operation time interval is determined as the time point at which the input data of the chip to be tested and the amplitude of the energy curve have the strongest correlation and the closest correlation, that is, the input data time point of the chip to be tested. Similarly, the second Pearson correlation coefficient between the data volume of the output data of the chip to be tested and the amplitude of the energy curve at each moment in the execution operation time interval (for example, 0-200 microseconds) is calculated by the Pearson correlation calculation method, and the peak point time (for example, 140 microseconds) of the second Pearson correlation coefficient in the execution operation time interval is determined as the time point at which the output data of the chip to be tested and the amplitude of the energy curve have the strongest correlation and the closest correlation, that is, the output data time point of the chip to be tested. Then the time point between the input data time point and the output data time point of the chip to be tested is the key time point in the time interval for the chip to be tested to perform operations. That is, the time point between 0-140 microseconds is the key time point in the time interval for the chip to be tested to perform operations. The Pearson correlation coefficient is obtained by taking the quotient of the covariance and standard deviation between the two variables, that is, the quotient of the covariance and standard deviation between the data volume of the input data of the chip to be tested and the amplitude of the energy curve within 0-200 microseconds. The specific calculation formula of the Pearson correlation coefficient is common knowledge and will not be repeated here.

[0093] The embodiment of the present invention uses the Pearson correlation calculation method to calculate the time point between the input data time point and the output data time point of the chip under test as the key time point in the time interval of the chip under test executing the operation, thereby achieving quantitative judgment of the time point of executing the operation, thereby accurately locating the key time point of fault injection.

[0094] In other aspects of the embodiments of the present invention, step 300, based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve, calculate the key time point in the execution operation time interval, including: calculating the first Spearman correlation coefficient between the input data of the chip to be tested and the energy curve within the execution operation time interval, and determining the peak point time of the first Spearman correlation coefficient within the execution operation time interval as the input data time point; calculating the second Spearman correlation coefficient between the output data of the chip to be tested and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point; determining the time point between the input data time point and the output data time point as the key time point in the execution operation time interval.

[0095] In the embodiment of the present invention, the first Spearman correlation coefficient between the data volume of the input data of the chip to be tested and the amplitude of the energy curve at each moment in the execution operation time interval (for example, 0-200 microseconds) is calculated by the Spearman correlation correlation calculation method, and the peak point time (for example, 0 microseconds) of the first Spearman correlation coefficient in the execution operation time interval is determined as the time point at which the input data of the chip to be tested and the amplitude of the energy curve have the strongest correlation and the closest correlation, that is, the input data time point of the chip to be tested. Similarly, the second Spearman correlation coefficient between the data volume of the output data of the chip to be tested and the amplitude of the energy curve at each moment in the execution operation time interval (for example, 0-200 microseconds) is calculated by the Spearman correlation calculation method, and the peak point time (for example, 140 microseconds) of the second Spearman correlation coefficient in the execution operation time interval is determined as the time point at which the output data of the chip to be tested and the amplitude of the energy curve have the strongest correlation and the closest correlation, that is, the output data time point of the chip to be tested. Then the time point between the input data time point and the output data time point of the chip under test is the key time point in the time interval for the chip under test to perform the operation. That is, the time point between 0-140 microseconds is the key time point in the time interval for the chip under test to perform the operation. The calculation formula of the Spearman correlation coefficient is common knowledge and will not be repeated here.

[0096] The embodiment of the present invention uses the Spearman phase calculation method to calculate the time point between the input data time point and the output data time point of the chip under test as the key time point in the time interval of the chip under test to execute the operation, thereby achieving quantitative judgment of the time point of executing the operation, thereby accurately locating the key time point of fault injection.

[0097] In other aspects of the embodiments of the present invention, determining the fault injection scanning mode based on the fault protection type of the object to be fault injected in the functional area distribution map includes: when the fault protection type of the object to be fault injected in the functional area distribution map is no fault protection, determining the fault injection scanning mode to be point-by-point fault injection.

[0098] When the chip to be tested is a chip without fault protection, there is no need to worry that when the fault is injected into a certain position, it will trigger the detection circuit to respond, thereby generating an alarm or reset operation. Therefore, when the fault protection type of the object to be injected is no fault protection, the electronic device determines the fault injection scanning mode as point-by-point fault injection. Please refer to Figure 4 ,Point-by-point fault injection performs fault injection point by point in the physical location area of ​​the object to be injected with faults. Figure 4 The sequence numbers in the figure indicate the order of fault injection.

[0099] By determining that the fault injection scanning mode is point-by-point fault injection when the fault protection type of the object to be injected is no fault protection, a fault injection scanning mode suitable for the fault protection type of the object to be injected is effectively selected, thereby improving the success rate of fault injection.

[0100] In other aspects of the embodiments of the present invention, the fault injection scanning mode is determined based on the fault protection type of the object to be injected into the functional area distribution map, including: when the fault protection type of the object to be injected into the functional area distribution map is spatial randomization protection, determining the fault injection scanning mode to be random point fault injection.

[0101] When the chip under test is a chip using spatial randomization protection, the electronic device determines that the fault injection scanning method is random point fault injection. Figure 5 ,Random point fault injection performs fault injection at random points in the physical location area of ​​the object to be fault injected. Figure 5 The sequence numbers in the figure indicate the order of fault injection.

[0102] By determining that the fault injection scanning mode is random point fault injection when the fault protection type of the object to be injected is without spatial randomization protection, a fault injection scanning mode suitable for the fault protection type of the object to be injected is effectively selected, thereby improving the success rate of fault injection.

[0103] In other aspects of the embodiments of the present invention, the fault injection scanning mode is determined based on the fault protection type of the object to be fault injected in the functional area distribution map, including: when the fault protection type of the object to be fault injected in the functional area distribution map is a distributed sensor detection circuit, determining the fault injection scanning mode to be arbitrary shape fault injection.

[0104] When the chip under test adopts a fault protection type of a distributed sensor detection circuit (such as an optical sensor detection circuit, etc.), the electronic device determines that the fault injection scanning mode is an arbitrary shape fault injection. Please refer to Figure 6 ,in Figure 6 A represents the shape of any fault injection, B represents the detection circuit coverage, and C represents the detection circuit coverage. If the fault injection is implemented point by point scanning, the detection circuit will respond at positions B and C. However, if the Figure 6 The arbitrary shape scanning method of A can bypass the fault protection detection circuit and successfully implement fault injection.

[0105] By determining the fault injection scanning mode as arbitrary shape fault injection when the fault protection type of the object to be injected is that there is no distributed sensor detection circuit, a fault injection scanning mode adapted to the fault protection type of the object to be injected is effectively selected, thereby improving the success rate of fault injection.

[0106] Finally, please refer to Figure 7 , the fault injection method of the embodiment of the present invention is explained through an embodiment.

[0107] First, the electronic device sends a command and uses the signal acquisition device to collect the energy curve leaked when the chip under test is working; then, signal processing and data correlation analysis are performed on the energy curve to locate the key time point of fault injection; then, the image imaging tool is used to identify the distribution of the main functional areas of the chip under test layout; then, based on the object to be injected (attack object), the physical location area of ​​the chip under test for fault injection is selected; then, according to different fault protection types, the appropriate fault injection scanning method is selected; finally, the key physical location point of fault injection is determined.

[0108] When locating fault injection in the time domain, the embodiment of the present invention performs signal processing and data correlation statistical analysis on the energy curve to achieve qualitative and quantitative judgment of the critical time interval for fault injection; when implementing fault injection in the spatial domain, different fault injection scanning methods are used to achieve point-by-point fault injection, random point fault injection, and arbitrary point fault injection, so as to accurately judge the key physical location points of the fault injection site. The embodiment of the present invention improves the accuracy of fault injection, the efficiency of fault injection attack, and the success rate of fault injection.

[0109] Device Embodiment

[0110] Please refer to Figure 8 On the other hand, an embodiment of the present invention further provides a fault injection device, comprising:

[0111] The first acquisition module 801 is used to acquire the energy curve of the chip under test when it is working;

[0112] The signal processing module 802 is used to perform signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve;

[0113] A correlation analysis module 803, configured to calculate a key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve;

[0114] The second acquisition module 804 is used to obtain a functional area distribution map of the chip layout to be tested;

[0115] A scanning mode determination module 805, configured to determine a fault injection scanning mode based on the fault protection type of the object to be injected with faults in the functional area distribution map;

[0116] The location point determination module 806 is used to perform a fault injection scan based on the fault injection scan mode, and determine a key physical location point based on the scan result.

[0117] Optionally, the performing signal processing on the energy curve to filter out a time interval for executing calculations of the chip under test in the energy curve includes:

[0118] Performing noise reduction processing on the energy curve;

[0119] The amplitude points in the energy curve after the noise reduction process that are greater than or equal to the set energy threshold are screened out to screen out the execution operation time interval of the chip under test in the energy curve.

[0120] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0121] Calculating a first Pearson correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Pearson correlation coefficient within the execution operation time interval as an input data time point;

[0122] Calculating a second Pearson correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point;

[0123] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0124] Optionally, the calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, includes:

[0125] Calculating a first Spearman correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Spearman correlation coefficient within the execution operation time interval as an input data time point;

[0126] Calculating a second Spearman correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point;

[0127] A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

[0128] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0129] When the fault protection type of the object to be injected with fault in the functional area distribution map is no fault protection, the fault injection scanning mode is determined to be point-by-point fault injection.

[0130] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0131] When the fault protection type of the object to be injected with fault in the functional area distribution map is spatial randomization protection, the fault injection scanning mode is determined to be random point fault injection.

[0132] Optionally, the determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes:

[0133] In the case where the fault protection type of the object to be injected into the functional area distribution map is a distributed sensor detection circuit, the fault injection scanning mode is determined to be an arbitrary shape fault injection.

[0134] The fault injection device includes a processor and a memory. The first acquisition module, signal processing module, correlation analysis module, second acquisition module, scanning mode determination module and position point determination module are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.

[0135] The processor includes a kernel, which calls the corresponding program unit from the memory. There can be one or more kernels.

[0136] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0137] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the fault injection method, which includes: obtaining the energy curve of the chip under test when it is working; performing signal processing on the energy curve to screen out the execution operation time interval of the chip under test in the energy curve; calculating the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve; obtaining the functional area distribution map of the chip under test layout; determining the fault injection scanning mode based on the fault protection type of the object to be injected in the functional area distribution map; performing fault injection scanning based on the fault injection scanning mode, and determining the key physical location points based on the scanning results.

[0138] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0139] On the other hand, the present invention also provides a fault injection system, comprising the above-mentioned electronic device, a signal acquisition device (not shown) for collecting the energy curve of the chip to be tested when it is working, and an image imaging device (not shown) for identifying the functional areas of the chip layout to be tested to form a functional area distribution map; the signal acquisition device is also used to send the energy curve to the electronic device, and the image imaging device is also used to send the functional area distribution map to the electronic device.

[0140] Among them, the signal acquisition equipment can use an oscilloscope to collect the energy curve of the leakage of the chip under test, and the image imaging equipment can use a microscope, near-infrared imager, etc. to identify the distribution of major functional areas on the layout of the chip under test, such as the layout positions of digital logic circuits, analog circuits, memory decoding circuits, interface circuits, etc.

[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a machine-readable storage medium. When the computer program is executed by a processor, the computer can execute a fault injection method, which includes: obtaining an energy curve when the chip to be tested is working; performing signal processing on the energy curve to screen out an execution operation time interval of the chip to be tested in the energy curve; calculating a key time point in the execution operation time interval based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve; obtaining a functional area distribution map of the chip to be tested layout; determining a fault injection scanning method based on the fault protection type of the object to be fault injected in the functional area distribution map; performing a fault injection scan based on the fault injection scanning method, and determining key physical location points based on the scanning results.

[0142] On the other hand, the present invention also provides a machine-readable storage medium having a computer program stored thereon, which is implemented by a processor to execute a fault injection method, the method comprising: obtaining an energy curve of the chip to be tested when it is working; performing signal processing on the energy curve to screen out an execution operation time interval of the chip to be tested in the energy curve; calculating a key time point in the execution operation time interval based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve; obtaining a functional area distribution map of the chip to be tested layout; determining a fault injection scanning method based on the fault protection type of the object to be fault injected in the functional area distribution map; performing a fault injection scan based on the fault injection scanning method, and determining key physical location points based on the scanning results.

[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fault injection method, characterized in that: include: Obtain the energy curve of the chip under test when it is working; Performing signal processing on the energy curve to filter out a time interval in which the chip under test performs calculations in the energy curve; Based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, calculate the key time point in the execution operation time interval; Obtain a functional area distribution map of the chip layout to be tested; Determine a fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map; A fault injection scan is performed based on the fault injection scan method, and a key physical location point is determined based on the scan result.

2. The fault injection method according to claim 1, characterized in that: The performing signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve includes: Performing noise reduction processing on the energy curve; The amplitude points in the energy curve after the noise reduction process that are greater than or equal to the set energy threshold are screened out to screen out the execution operation time interval of the chip under test in the energy curve.

3. The fault injection method according to claim 2, characterized in that: The performing noise reduction processing on the energy curve comprises: The energy curve is subjected to any one of filtering, moving average processing and Fourier transform noise reduction processing.

4. The fault injection method according to claim 1, characterized in that: The calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, comprises: Calculating a first Pearson correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Pearson correlation coefficient within the execution operation time interval as an input data time point; Calculating a second Pearson correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point; A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

5. The fault injection method according to claim 1, characterized in that: The calculating of the key time point in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, comprises: Calculating a first Spearman correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Spearman correlation coefficient within the execution operation time interval as an input data time point; Calculating a second Spearman correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point; A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

6. The fault injection method according to claim 1, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: When the fault protection type of the object to be injected with fault in the functional area distribution map is no fault protection, the fault injection scanning mode is determined to be point-by-point fault injection.

7. The fault injection method according to claim 1, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: When the fault protection type of the object to be injected with fault in the functional area distribution map is spatial randomization protection, the fault injection scanning mode is determined to be random point fault injection.

8. The fault injection method according to claim 1, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: In the case where the fault protection type of the object to be injected into the functional area distribution map is a distributed sensor detection circuit, the fault injection scanning mode is determined to be an arbitrary shape fault injection.

9. A fault injection device, characterized in that: include: The first acquisition module is used to acquire the energy curve of the chip under test when it is working; A signal processing module, used for performing signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve; A correlation analysis module, used to calculate the key time point in the execution operation time interval based on the correlation between the input data of the chip to be tested and the energy curve, and the correlation between the output data of the chip to be tested and the energy curve; The second acquisition module is used to obtain a functional area distribution map of the chip layout to be tested; A scanning mode determination module, used to determine a fault injection scanning mode based on the fault protection type of the object to be injected into the functional area distribution map; The location point determination module is used to perform a fault injection scan based on the fault injection scanning method and determine a key physical location point based on the scanning result.

10. The fault injection device according to claim 9, characterized in that: The performing signal processing on the energy curve to filter out the execution operation time interval of the chip under test in the energy curve includes: Performing noise reduction processing on the energy curve; The amplitude points in the energy curve after the noise reduction process that are greater than or equal to the set energy threshold are screened out to screen out the execution operation time interval of the chip under test in the energy curve.

11. The fault injection device according to claim 9, characterized in that: The calculating of the key time points in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, comprises: Calculating a first Pearson correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Pearson correlation coefficient within the execution operation time interval as an input data time point; Calculating a second Pearson correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Pearson correlation coefficient within the execution operation time interval as the output data time point; A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

12. The fault injection device according to claim 9, characterized in that: The calculating of the key time points in the execution operation time interval based on the correlation between the input data of the chip under test and the energy curve, and the correlation between the output data of the chip under test and the energy curve, comprises: Calculating a first Spearman correlation coefficient between the input data of the chip under test and the energy curve within the execution operation time interval, and determining a peak point time of the first Spearman correlation coefficient within the execution operation time interval as an input data time point; Calculating a second Spearman correlation coefficient between the output data of the chip under test and the energy curve within the execution operation time interval, and determining the peak point time of the second Spearman correlation coefficient within the execution operation time interval as the output data time point; A time point between the input data time point and the output data time point is determined as a key time point in the execution operation time interval.

13. The fault injection device according to claim 9, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: When the fault protection type of the object to be injected with fault in the functional area distribution map is no fault protection, the fault injection scanning mode is determined to be point-by-point fault injection.

14. The fault injection device according to claim 9, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: When the fault protection type of the object to be injected with fault in the functional area distribution map is spatial randomization protection, the fault injection scanning mode is determined to be random point fault injection.

15. The fault injection device according to claim 9, characterized in that: The determining of the fault injection scanning mode based on the fault protection type of the object to be injected with fault in the functional area distribution map includes: In the case where the fault protection type of the object to be injected into the functional area distribution map is a distributed sensor detection circuit, the fault injection scanning mode is determined to be an arbitrary shape fault injection.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the fault injection method according to any one of claims 1 to 8 is implemented.

17. A fault injection system, characterized in that: It comprises the electronic device as claimed in claim 16, a signal acquisition device for acquiring an energy curve of a chip to be tested when it is working, and an image imaging device for identifying functional areas of a layout of the chip to be tested to form a functional area distribution map; the signal acquisition device is also used to send the energy curve to the electronic device, and the image imaging device is also used to send the functional area distribution map to the electronic device.

18. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the fault injection method according to any one of claims 1 to 8 is implemented.

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the fault injection method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method and device for analyzing attack on smart card chip

    CN105095750A

  • Fault injection analysis method and system based on chip layout

    CN107818271A

  • Method and apparatus for fault injection test

    KR1020180134677A

  • Fault injection attack system

    US20220129545A1