A high time precision electromagnetic fault injection method and device for cryptographic chips
By setting the peak and rise time of the electromagnetic pulse signal in the electromagnetic fault injection device, combined with the period adjustment of continuous fault injection, the problem of insufficient time accuracy in the prior art is solved, and the accuracy of fault injection and differential fault analysis are significantly improved. Efficiency improves the attack success rate.
Patent Information
- Application Number
- CN202411244330.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The existing electromagnetic fault injection method causes attack failure when the time accuracy is insufficient, and fails to effectively control the fault injection time, affecting the accuracy of differential fault analysis and the success rate of fault injection.
The electromagnetic fault injection device is adopted, including a three-axis displacement platform in the XYZ direction, an electromagnetic pulse generator and an electromagnetic probe. The fault injection time is accurately controlled by setting the peak time and rise time of the electromagnetic pulse signal, and the injection cycle is adjusted during continuous fault injection. Combining rise, fall time and delay time, improve the accuracy of fault injection.
It improves the time accuracy of fault injection and the efficiency of differential fault analysis, significantly improving the success rate of effective fault injection and the effect of key cracking.
Smart Images

Figure CN118777844B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuit security and electromagnetic fault injection, and in particular to a high-time-precision electromagnetic fault injection method and device for a cryptographic chip. Background Art
[0002] Electromagnetic Fault Injection (EMFI) attacks chips by generating transient electromagnetic fields on electromagnetic probes. Transient electromagnetic pulses will generate transient induced voltages and currents on the attacked chip, thereby introducing interference signals to the attacked chip, changing the voltage and logic value of the chip's internal logic gates, and causing faults when the chip is working. Compared with other fault injection methods, electromagnetic fault injection does not require contact with the chip or removal of the chip package, and can accurately attack local areas of the chip through spatial positioning. Therefore, electromagnetic fault injection has received widespread attention in recent years.
[0003] After implementing fault injection, attackers can use the injected faults to extract key information of the circuit through differential fault analysis (DFA). DFA gradually derives the key used by the encryption algorithm by comparing the correct ciphertext with the incorrect ciphertext (i.e., the ciphertext obtained from the incorrect encryption). The accuracy of DFA is related to the accuracy of fault injection. Fault injection is time-sensitive. If the fault is not induced at the appropriate time in the algorithm, or affects the wrong bit, the entire attack process fails. Therefore, time accuracy is a key factor in conducting any fault attack.
[0004] In order to improve the efficiency of electromagnetic fault injection and the accuracy of DFA, existing methods mainly focus on reducing the encryption process and the construction of fault models. However, when using the transient electromagnetic pulse-based fault injection method, the existing methods only consider the pulse peak moment as the time of fault injection, and have not yet considered the impact of signal rise time on electromagnetic faults. The transient electromagnetic pulse-based fault injection method is to apply a transient voltage pulse signal to both ends of the coil to generate a transient electromagnetic field, thereby introducing transient induced voltage and current in the target chip. When the time accuracy of fault injection is insufficient, the electromagnetic fault injection attack will fail. There is currently no effective method to address the above problems.
[0005] Therefore, there is an urgent need for a high-time-precision electromagnetic fault injection method and device for cryptographic chips, which can more accurately control the time of fault injection, improve the analysis efficiency and effect of differential fault analysis, and increase the success rate of effective fault injection. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a high-time-precision electromagnetic fault injection method and device for cryptographic chips, which can more accurately control the time of fault injection, improve the analysis efficiency and effect of differential fault analysis, and improve the success rate of effective fault injection.
[0007] The present invention provides a high-time-precision electromagnetic fault injection method for a cryptographic chip, which is implemented based on an electromagnetic fault injection device. The electromagnetic fault injection device includes a host computer, an XYZ-direction three-axis displacement platform, an electromagnetic pulse generator, and an electromagnetic probe, and includes the following steps:
[0008] Place the password chip to be attacked on the three-axis displacement platform in the XYZ direction;
[0009] The parameters of the electromagnetic fault injection device are set by the host computer; wherein the parameters include the intensity and frequency of the electromagnetic pulse signal generated by the electromagnetic pulse generator, the stepping speed and the moving step length of the three-axis displacement platform in the XYZ direction;
[0010] Initialize the password chip to be attacked through the host computer; the initialization includes powering on and inputting plain text;
[0011] Determine the fault injection time of the electromagnetic fault injection device according to the peak time and rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator;
[0012] Controlling the electromagnetic fault injection device to inject faults into the target position of the password chip to be attacked during the fault injection time; wherein the fault injection into the password chip to be attacked includes single fault injection and continuous fault injection;
[0013] After the electromagnetic fault injection device completes a fault injection, it is determined whether the fault injection is a valid fault injection; if the fault injection is a valid fault injection, the valid error ciphertext output by the password chip to be attacked under the fault injection is recorded, otherwise it is not recorded;
[0014] Initialize the password chip to be attacked, reset the electromagnetic fault injection device, and change the input plain text of the password chip to be attacked;
[0015] Return to the step of setting the parameters of the electromagnetic fault injection device through the host computer and re-execute until the preset fault injection times are reached;
[0016] According to the valid error ciphertext output by the cryptographic chip to be attacked under different plaintexts, the key information of the cryptographic chip to be attacked is cracked through the differential fault analysis method.
[0017] Furthermore, placing the password chip to be attacked on a three-axis displacement platform in the XYZ direction includes:
[0018] When the password chip to be attacked is a smart card chip, the smart card chip is placed with the back side facing upward on the XYZ three-axis displacement platform of the electromagnetic fault injection device;
[0019] When the password chip to be attacked is an embedded chip, the embedded chip is placed with the front side facing upward on the XYZ three-axis displacement platform of the electromagnetic fault injection device.
[0020] Further, determining the fault injection time of the electromagnetic fault injection device according to the peak time and the rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator includes:
[0021] determining the strength of the electromagnetic pulse signal generated by the electromagnetic pulse generator;
[0022] The peak time of the electromagnetic pulse signal is determined according to the moment when the trigger signal is pulled high in the last round of encryption operation of the password chip to be attacked, and the rise time of the electromagnetic pulse signal is determined according to the strength of the electromagnetic pulse signal;
[0023] The fault injection time of the electromagnetic fault injection device is determined according to the difference between the peak time and the rise time of the electromagnetic pulse signal.
[0024] Furthermore, when the fault injection of the cryptographic chip to be attacked is continuous fault injection, after determining the fault injection time of the electromagnetic fault injection device according to the peak time and the rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator, it also includes:
[0025] Determining the fall time of the electromagnetic pulse signal according to the strength of the electromagnetic pulse signal;
[0026] The injection period of continuous fault injection is determined according to the rising time, falling time and preset delay time of the electromagnetic pulse signal; the injection period is the sum of the rising time, falling time and preset delay time of the electromagnetic pulse signal.
[0027] Furthermore, after the host computer initializes the password chip to be attacked, it also includes:
[0028] Get the correct ciphertext output by the cryptographic chip to be attacked.
[0029] Further, after the electromagnetic fault injection device completes a fault injection, determining whether the fault injection is a valid fault injection includes:
[0030] When the erroneous ciphertext output by the cryptographic chip to be attacked under this fault injection is only caused by the inversion of the target bit, the fault injection is judged to be a valid fault injection.
[0031] Furthermore, according to the valid error ciphertext output by the cipher chip to be attacked under different plaintexts, the key information of the cipher chip to be attacked is cracked by the differential fault analysis method, including:
[0032] Calculate the difference set based on the correct ciphertext output by the attacking cipher chip under a certain plaintext and the valid error ciphertext output by the cipher chip to be attacked under the plaintext;
[0033] Repeat the above steps to obtain all the difference sets of attacking the cryptographic chip under different plaintexts;
[0034] Compute the intersection based on all differences;
[0035] The key information of the cryptographic chip to be attacked is determined according to the intersection.
[0036] Furthermore, at the fault injection time, the electromagnetic fault injection device is controlled to perform fault injection on the target position of the cryptographic chip to be attacked, wherein the method for determining the target position includes:
[0037] Conduct electromagnetic sensitivity test on the password chip to be attacked to obtain the electromagnetic sensitivity of each position on the password chip to be attacked;
[0038] The position corresponding to the maximum electromagnetic sensitivity is selected as the target position of the cryptographic chip to be attacked.
[0039] The present invention also provides a high time precision electromagnetic fault injection device for a cryptographic chip, which is used to execute any one of the above-mentioned high time precision electromagnetic fault injection methods for a cryptographic chip, and the electromagnetic fault injection device comprises:
[0040] The host computer is used to control and operate each device in the electromagnetic fault injection device and realize communication with the cryptographic chip to be attacked through the serial port;
[0041] An electromagnetic pulse generator, connected to the host computer, is used to generate a pulse signal;
[0042] The electromagnetic probe is connected to the electromagnetic pulse generator and the password chip to be attacked, and is used to generate a high-voltage transient electromagnetic field, thereby generating a transient induced voltage and current in the password chip to be attacked;
[0043] The three-axis displacement platform in the XYZ direction is connected to the host computer and is used to accurately adjust the relative position of the electromagnetic probe and the password chip to be attacked.
[0044] Furthermore, the electromagnetic fault injection device also includes:
[0045] The oscilloscope is connected to the host computer and the cryptographic chip to be attacked, and is used to detect the electromagnetic signal of the cryptographic chip to be attacked, monitor the fault injection time point, and detect the waveform fluctuation of the cryptographic chip to be attacked, so as to preliminarily determine whether the fault injection is successfully completed.
[0046] The embodiments of the present invention have the following technical effects:
[0047] The present invention takes into account that the electromagnetic pulse signal has a rise time and cannot reach the peak value immediately. Only when the electromagnetic pulse signal reaches the peak value will the attack on the password chip to be attacked be carried out, and when the injection intensity of the electromagnetic pulse is different, the rise slope and rise time of the electromagnetic pulse signal are also different. Therefore, the present invention adjusts the fault injection time according to the peak time and rise time of the electromagnetic pulse signal, thereby improving the accuracy of controlling the injection time, improving the analysis efficiency and effect of differential fault analysis, and improving the success rate of effective fault injection; in addition, when performing continuous fault injection, the present invention also takes into account the existence of a rise time and a fall time of the electromagnetic pulse signal, and jointly adjusts the injection period according to the rise time, the fall time and the delay time, thereby further improving the accuracy of controlling the injection time, the analysis efficiency and effect of the differential fault analysis, and the success rate of effective fault injection. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 It is a flow chart of a high time precision electromagnetic fault injection method for a cryptographic chip provided by an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of an electromagnetic pulse signal waveform of a single fault injection provided by an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of an electromagnetic pulse signal waveform of a continuous fault injection provided by an embodiment of the present invention;
[0052] Figure 4 is a schematic diagram of an electromagnetic pulse signal waveform of a single fault injection under different electromagnetic pulse signal intensities provided by an embodiment of the present invention;
[0053] Figure 5 It is a structural schematic diagram of a high time-precision electromagnetic fault injection device for a cryptographic chip provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0055] The present invention proposes a high-time-precision electromagnetic fault injection method for a cryptographic chip, which is implemented based on an electromagnetic fault injection device. The electromagnetic fault injection device includes a host computer, an XYZ three-axis displacement platform, an electromagnetic pulse generator, and an electromagnetic probe. Figure 1 is a flow chart of a high time precision electromagnetic fault injection method for a cryptographic chip provided by an embodiment of the present invention, see Figure 1 , specifically including:
[0056] S1. Place the password chip to be attacked on a three-axis displacement platform in the XYZ direction.
[0057] Specifically, since the contact pads inside the smart card chip effectively shield a large part of the magnetic flux, when the password chip to be attacked is a smart card chip, the smart card chip is placed with its back facing up on the XYZ three-axis displacement platform of the electromagnetic fault injection device.
[0058] Since the electromagnetic field can easily pass through the plastic package or epoxy resin package outside the embedded chip, when the cryptographic chip to be attacked is an embedded chip, the embedded chip is placed with its front side facing upward on the XYZ three-axis displacement platform of the electromagnetic fault injection device.
[0059] S2. Set the parameters of the electromagnetic fault injection device through the host computer.
[0060] Specifically, the parameters include the intensity and frequency of the electromagnetic pulse signal generated by the electromagnetic pulse generator, the stepping speed and moving step length of the XYZ direction three-axis displacement platform, etc. The intensity of the electromagnetic pulse signal is the intensity of the fault injection. The stepping speed and moving step length of the XYZ direction three-axis displacement platform are set according to the size of the password chip to be attacked. The larger the size of the password chip to be attacked, the slower the stepping speed of the XYZ direction three-axis displacement platform and the smaller the moving step length.
[0061] S3. Initialize the password chip to be attacked through the host computer.
[0062] Specifically, initialization includes powering on and inputting plain text.
[0063] Furthermore, the correct ciphertext output by the cryptographic chip to be attacked is obtained, that is, the ciphertext output by the cryptographic chip to be attacked when no fault is injected; the input plaintext can be encrypted into the output ciphertext using the encryption algorithm.
[0064] S4. Determine the fault injection time of the electromagnetic fault injection device according to the peak time and rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator.
[0065] Specifically, the intensity of the electromagnetic pulse signal generated by the electromagnetic pulse generator is determined.
[0066] Figure 2 is a schematic diagram of an electromagnetic pulse signal waveform of a single fault injection provided by an embodiment of the present invention, see Figure 2 , determine the peak time t of the electromagnetic pulse signal according to the moment when the trigger signal is pulled high in the last round of encryption operation of the password chip to be attacked 1 , the rise time Δt of the electromagnetic pulse signal is determined according to the strength of the electromagnetic pulse signal.
[0067] The fault injection time (t 1 -Δt).
[0068] Furthermore, Figure 4 is a schematic diagram of an electromagnetic pulse signal waveform of a single fault injection under different electromagnetic pulse signal intensities provided by an embodiment of the present invention, see Figure 4 ,When the strength of the electromagnetic pulse signal generated by the ,electromagnetic pulse generator is different, the peak time of the electromagnetic pulse signal, the slope of the ,electromagnetic pulse signal and the rise time of the electromagnetic pulse signal will ,change. Therefore, it is necessary to adjust the fault injection time in real time ,according to the strength of the electromagnetic pulse signal.
[0069] Furthermore, the fault injection into the cryptographic chip to be attacked includes single fault injection and continuous fault injection.
[0070] Furthermore, Figure 3 is a schematic diagram of an electromagnetic pulse signal waveform for continuous fault injection provided by an embodiment of the present invention, see Figure 3 When the fault injection of the cryptographic chip to be attacked is continuous fault injection, after step S4, it also includes:
[0071] Determine the fall time Δt of the electromagnetic pulse signal according to the strength of the electromagnetic pulse signal 2 .
[0072] According to the rise time Δt of the electromagnetic pulse signal 1 , Fall time Δt 2 and preset delay time t p Determine the injection period T of continuous fault injection. Among them, the preset delay time t p It can be set according to the actual situation. When continuous fault injection occurs, the preset delay time t pIt is necessary to initialize the password chip to be attacked.
[0073] The injection period is the sum of the rise time, fall time and preset delay time of the electromagnetic pulse signal.
[0074] S5. At the fault injection time, control the electromagnetic fault injection device to inject faults into the target position of the cryptographic chip to be attacked.
[0075] Specifically, the method for determining the target position includes:
[0076] An electromagnetic sensitivity test is performed on the password chip to be attacked to obtain the electromagnetic sensitivity of each position on the password chip to be attacked.
[0077] The position corresponding to the maximum electromagnetic sensitivity is selected as the target position of the cryptographic chip to be attacked.
[0078] Specifically, since electromagnetic injection has a localized effect, the results obtained by fault injection at different locations are also different. In order to interfere with the normal operation of the password chip to be attacked to a greater extent, a strong magnetic field needs to be generated as much as possible in the vulnerable area of the password chip to be attacked. Among them, the vulnerable area is the area with high electromagnetic sensitivity. The effect of electromagnetic fault injection in the vulnerable area is better. For example, the vulnerable area can be an interconnection line, a storage unit, a clock circuit, etc.
[0079] Furthermore, the principle of injecting faults into the target position of the password chip to be attacked by the electromagnetic fault injection device is as follows:
[0080] Turn on the electromagnetic pulse generator and use the coil to generate a changing electromagnetic field. Assume that the number of coil turns is N, the surface area of the coil is S, the current flowing through the coil is I, the magnetic field induction intensity generated by the coil is B, and the angle between the coil surface and the magnetic field line is , then the magnetic flux of the coil It is expressed as:
[0081] ;
[0082] Assume that the magnetic permeability of the medium in the coil is , the radius of the coil is r, the distance from the center of the coil to the point on the axis is z, then the magnetic induction intensity at the center of the coil can be expressed as:
[0083] ;
[0084] When the coil is close to the target chip, according to the law of electromagnetic induction, the induced electromotive force generated in the target chip can be expressed as:
[0085] ;
[0086] Will Substituting and B into the above formula, we can get:
[0087] ;
[0088] That is, electromagnetic fault injection causes the password chip to be attacked to generate induced electromotive force, thereby changing the logical value. The induced electromotive force is the electromotive force obtained by electromagnetic induction on the password chip circuit. The generation of induced electromotive force is the physical principle of electromagnetic fault injection method to achieve single-bit flip. This principle shows that the magnitude of the electromotive force is independent of the fault injection time. When other conditions are determined, changing the fault injection time will not affect the induced electromotive force, and thus will not affect the change of the logical value, that is, the fault injection effect.
[0089] S6. After the electromagnetic fault injection device completes a fault injection, determine whether the fault injection is a valid fault injection.
[0090] Specifically, when the erroneous ciphertext output by the cryptographic chip to be attacked under this fault injection is only caused by the inversion of the target bit, it is determined that this fault injection is a valid fault injection.
[0091] The target bit is a single bit. For example, the erroneous ciphertext output by the cryptographic chip to be attacked may also be caused by multi-bit inversion, non-target bit inversion, bit skipping, or a combination of multiple faults.
[0092] If the fault injection is a valid fault injection, the valid error ciphertext output by the cryptographic chip to be attacked under the fault injection is recorded; otherwise, it is not recorded.
[0093] S7. Initialize the password chip to be attacked, reset the electromagnetic fault injection device, and change the input plain text of the password chip to be attacked.
[0094] Exemplarily, when changing the input plaintext of the cryptographic chip to be attacked, the plaintexts may be input one by one in a traversal manner from small to large.
[0095] S8. Return to S2 and execute again until the preset number of fault injections is reached.
[0096] Specifically, when re-executing the step of setting the parameters of the electromagnetic fault injection device through the host computer, for the same cryptographic chip to be attacked, the stepping speed and moving step length of the three-axis displacement platform in the XYZ direction do not need to be changed, and the intensity and frequency of the electromagnetic pulse signal generated by the electromagnetic pulse generator can be changed according to actual conditions. When the intensity of the electromagnetic pulse signal generated by the electromagnetic pulse generator changes, the fault injection time needs to be adaptively adjusted.
[0097] S9. According to the valid error ciphertext output by the cipher chip to be attacked under different plaintexts, the key information of the cipher chip to be attacked is cracked by using the differential fault analysis method.
[0098] Specifically, a difference set is calculated based on the correct ciphertext output by the attacking cipher chip under a certain plaintext and the valid error ciphertext output by the to-be-attacked cipher chip under the plaintext.
[0099] Repeat the above steps to obtain all the difference sets of attacking the cryptographic chip under different plaintexts.
[0100] Compute the intersection from all differences.
[0101] The key information of the cryptographic chip to be attacked is determined according to the intersection.
[0102] Furthermore, by calculating the proportion of the number of effective fault injections m to the total number of all fault injections M, the success rate ISR(f) of effective fault injections for the cryptographic chip to be attacked is obtained:
[0103] ISR(f)=m / M;
[0104] The higher the ISR(f), the more effective the fault injection is. The total number of fault injections used to crack the key information of the cryptographic chip to be attacked and the success rate of effective fault injections can be used to evaluate the cryptographic chip to be attacked. That is, the more the total number of fault injections used to crack the key information of the cryptographic chip to be attacked and the lower the success rate of effective fault injections, the higher the security of the cryptographic chip to be attacked; otherwise, the lower the security of the cryptographic chip to be attacked.
[0105] The present invention takes into account that the electromagnetic pulse signal has a rise time and cannot reach the peak value immediately. Only when the electromagnetic pulse signal reaches the peak value will the attack on the password chip to be attacked be carried out, and when the injection intensity of the electromagnetic pulse is different, the rise slope and rise time of the electromagnetic pulse signal are also different. Therefore, the present invention adjusts the fault injection time according to the peak time and rise time of the electromagnetic pulse signal, thereby improving the accuracy of controlling the injection time, improving the analysis efficiency and effect of differential fault analysis, and improving the success rate of effective fault injection; in addition, when performing continuous fault injection, the present invention also takes into account the rise time and fall time of the electromagnetic pulse signal, and adjusts the injection period according to the rise time, fall time and delay time, thereby further improving the accuracy of controlling the injection time, the analysis efficiency and effect of differential fault analysis, and the success rate of effective fault injection.
[0106] Figure 5is a schematic diagram of the structure of a high time precision electromagnetic fault injection device for a cryptographic chip provided by an embodiment of the present invention. The system is used to execute a high time precision electromagnetic fault injection method for a cryptographic chip described in the above embodiment, such as Figure 5 As shown, the electromagnetic fault injection device includes:
[0107] A host computer is used to control and operate various devices in the electromagnetic fault injection device, and to communicate with the cryptographic chip to be attacked through a serial port; illustratively, the host computer can be a computer;
[0108] An electromagnetic pulse generator, connected to the host computer, is used to generate a pulse signal;
[0109] The electromagnetic probe is connected to the electromagnetic pulse generator and the password chip to be attacked, and is used to generate a high-voltage transient electromagnetic field, thereby generating a transient induced voltage and current in the password chip to be attacked;
[0110] The three-axis displacement platform in the XYZ direction is connected to the host computer and is used to accurately adjust the relative position of the electromagnetic probe and the password chip to be attacked.
[0111] Furthermore, the electromagnetic fault injection device also includes:
[0112] The oscilloscope is connected to the host computer and the cryptographic chip to be attacked, and is used to detect the electromagnetic signal of the cryptographic chip to be attacked, monitor the fault injection time point, and detect the waveform fluctuation of the cryptographic chip to be attacked, so as to preliminarily determine whether the fault injection is successfully completed.
[0113] It should be noted that the terms used in the present invention are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present specification, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0114] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0115] 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 replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A high-time-precision electromagnetic fault injection method for a cryptographic chip, implemented based on an electromagnetic fault injection device, the electromagnetic fault injection device comprising a host computer, an XYZ-direction three-axis displacement platform, an electromagnetic pulse generator and an electromagnetic probe, characterized in that: The steps include: Place the password chip to be attacked on the XYZ three-axis displacement platform; The parameters of the electromagnetic fault injection device are set by the host computer; wherein the parameters include the intensity and frequency of the electromagnetic pulse signal generated by the electromagnetic pulse generator, the stepping speed and moving step length of the three-axis displacement platform in the XYZ direction; Initializing the cryptographic chip to be attacked by the host computer; wherein the initialization includes powering on and inputting plain text; Determining the fault injection time of the electromagnetic fault injection device according to the peak time and rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator; Controlling the electromagnetic fault injection device to perform fault injection on the target position of the cryptographic chip to be attacked during the fault injection time; wherein the fault injection on the cryptographic chip to be attacked includes single fault injection and continuous fault injection; After the electromagnetic fault injection device completes a fault injection, it is determined whether the fault injection is a valid fault injection; if the fault injection is a valid fault injection, the valid error ciphertext output by the cryptographic chip to be attacked under the fault injection is recorded, otherwise it is not recorded; Initializing the password chip to be attacked, resetting the electromagnetic fault injection device, and changing the input plaintext of the password chip to be attacked; Return to the step of setting the parameters of the electromagnetic fault injection device through the host computer and re-execute until the preset fault injection times are reached; According to the valid error ciphertext output by the cryptographic chip to be attacked under different plaintexts, the key information of the cryptographic chip to be attacked is cracked by using the differential fault analysis method.
2. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 1, characterized in that: Placing the password chip to be attacked on the XYZ direction three-axis displacement platform includes: When the password chip to be attacked is a smart card chip, the smart card chip is placed with its back facing upward on the XYZ three-axis displacement platform of the electromagnetic fault injection device; When the password chip to be attacked is an embedded chip, the embedded chip is placed with its front side facing upward on a three-axis displacement platform in the XYZ direction of the electromagnetic fault injection device.
3. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 1, characterized in that: Determining the fault injection time of the electromagnetic fault injection device according to the peak time and rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator comprises: determining the strength of the electromagnetic pulse signal generated by the electromagnetic pulse generator; Determine the peak time of the electromagnetic pulse signal according to the moment when the trigger signal is pulled high in the last round of encryption operation of the password chip to be attacked, and determine the rise time of the electromagnetic pulse signal according to the strength of the electromagnetic pulse signal; The fault injection time of the electromagnetic fault injection device is determined according to the difference between the peak time and the rise time of the electromagnetic pulse signal.
4. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 3, characterized in that: When the fault injection of the cryptographic chip to be attacked is continuous fault injection, after determining the fault injection time of the electromagnetic fault injection device according to the peak time and rise time of the electromagnetic pulse signal generated by the electromagnetic pulse generator, the method further includes: Determining the falling time of the electromagnetic pulse signal according to the strength of the electromagnetic pulse signal; The injection period of continuous fault injection is determined according to the rising time, falling time and preset delay time of the electromagnetic pulse signal; the injection period is the sum of the rising time, falling time and preset delay time of the electromagnetic pulse signal.
5. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 1, characterized in that: After the host computer initializes the password chip to be attacked, the method further includes: The correct ciphertext output by the cryptographic chip to be attacked is obtained.
6. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 5, characterized in that: After the electromagnetic fault injection device completes a fault injection, determining whether the fault injection is a valid fault injection includes: When the erroneous ciphertext output by the cryptographic chip to be attacked under this fault injection is only caused by the inversion of the target bit, it is determined that this fault injection is a valid fault injection.
7. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 6, characterized in that: According to the valid error ciphertext output by the cryptographic chip to be attacked under different plaintext conditions, the key information of the cryptographic chip to be attacked is cracked by the differential fault analysis method, including: Calculate a difference set according to the correct ciphertext output by the attacking cipher chip under a certain plaintext and the valid error ciphertext output by the cipher chip to be attacked under the plaintext; Repeat the above steps to obtain all difference sets of the attacking cryptographic chip under different plaintexts; Compute the intersection based on all differences; The key information of the cryptographic chip to be attacked is determined according to the intersection.
8. A high time precision electromagnetic fault injection method for a cryptographic chip according to claim 1, characterized in that: At the fault injection time, the electromagnetic fault injection device is controlled to perform fault injection on the target position of the cryptographic chip to be attacked, wherein the method for determining the target position includes: Performing an electromagnetic sensitivity test on the password chip to be attacked to obtain the electromagnetic sensitivity of each position on the password chip to be attacked; The position corresponding to the maximum electromagnetic sensitivity is selected as the target position of the cryptographic chip to be attacked.
9. A high time precision electromagnetic fault injection device for a cryptographic chip, used to implement a high time precision electromagnetic fault injection method for a cryptographic chip as described in any one of claims 1 to 8, characterized in that: The electromagnetic fault injection device comprises: The host computer is used to control and operate each device in the electromagnetic fault injection device and realize communication with the cryptographic chip to be attacked through the serial port; An electromagnetic pulse generator, connected to the host computer, for generating a pulse signal; An electromagnetic probe, connected to the electromagnetic pulse generator and the password chip to be attacked, for generating a high-voltage transient electromagnetic field, thereby generating a transient induced voltage and current in the password chip to be attacked; The three-axis displacement platform in the XYZ direction is connected to the host computer and is used for accurately adjusting the relative position between the electromagnetic probe and the password chip to be attacked.
10. A high time precision electromagnetic fault injection device for a cryptographic chip according to claim 9, characterized in that: The electromagnetic fault injection device also includes: The oscilloscope is connected to the host computer and the cryptographic chip to be attacked, and is used to detect the electromagnetic signal of the cryptographic chip to be attacked, monitor the fault injection time point, and detect the waveform fluctuation of the cryptographic chip to be attacked, so as to preliminarily determine whether the fault injection is successfully completed.