Differential fault analysis method and device, electronic equipment and storage medium
By using the ciphertext differential and differential propagation trajectory analysis method in the SIMON algorithm, the intermediate state and round key of the SIMON algorithm are restored, and the problem of equipment damage caused by multiple failure injections in the prior art is solved, and efficient recovery of the SIMON algorithm key is achieved.
Patent Information
- Application Number
- CN202411886966.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-19
AI Technical Summary
In the prior art, when conducting differential fault attacks on the SIMON algorithm, multiple fault injections are required, resulting in the risk of equipment damage.
The SIMON algorithm performs T-wheel encryption operation on the plain text to obtain the correct ciphertext and the wrong ciphertext. The fault injection location information of random single-bit faults is determined using ciphertext difference, and the intermediate state information of the differential propagation trajectory and its corresponding round key are analyzed. Finally, the master key is determined through the key expansion characteristics.
Reduces the number of fault injections, reduces the risk of equipment damage, and improves the recovery efficiency of SIMON algorithm keys.
Smart Images

Figure CN119921938A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Internet technology, and in particular relates to a differential fault analysis method, device, electronic device and storage medium. Background Art
[0002] Nowadays, the Internet of Things is very popular in the current environment and is used in many industries such as smart medical care, smart home, and automobiles. Block ciphers are widely used in information transmission of IoT devices as an effective measure to ensure data security. Due to the limited resources of IoT devices, lightweight block ciphers such as the SIMON algorithm are widely used to ensure data security.
[0003] However, these devices are vulnerable to fault attacks, where attackers can efficiently recover the key by injecting faults and analyzing the output differences. Differential fault attacks combined with differential analysis can obtain the complete key with only a few fault injections, posing a threat to lightweight cryptography. Therefore, differential fault attacks on lightweight block cipher algorithms to evaluate their security can help designers find algorithm defects and further improve cryptographic algorithms, which is of great help to the design and development of cryptography. Therefore, it is necessary to perform differential fault attacks on the proposed lightweight block cipher.
[0004] Currently, in the technical research on differential fault attacks on SIMON under different fault models, multiple fault injections are required, resulting in the risk of equipment damage. Summary of the invention
[0005] The embodiments of the present application provide a differential fault analysis method, apparatus, device and storage medium, which can solve the problem of multiple fault injections currently causing the risk of equipment damage.
[0006] In a first aspect, an embodiment of the present application provides a differential fault analysis method, the method comprising:
[0007] The SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the correct ciphertext, and the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the incorrect ciphertext after injecting a random single-bit fault in the (T-5) round; T is a positive integer greater than 5; the fault injection position information of the random single-bit fault is determined according to the ciphertext difference between the correct ciphertext and the incorrect ciphertext; according to the fault injection position information, the random single-bit fault is injected at different fault injection positions in the (T-5) round to obtain the differential propagation trajectory, and the differential propagation trajectory is analyzed to obtain the intermediate state information of the (T-5) round and its corresponding round key; according to the round key corresponding to the intermediate state information of the (T-5) round, the round keys of the last 4 rounds of encryption operations are gradually restored; through the key expansion characteristic of the SIMON algorithm, the master key is determined according to the restored round keys of the last 4 rounds of encryption operations.
[0008] In a second aspect, an embodiment of the present application provides a differential fault analysis device, the differential fault analysis device comprising:
[0009] The encryption module is used to perform T rounds of encryption operations on the plaintext through the SIMON algorithm to obtain a correct ciphertext, and to inject a random single-bit fault in the (T-5)th round of T rounds of encryption operations on the plaintext through the SIMON algorithm to obtain an erroneous ciphertext; T is a positive integer greater than 5;
[0010] A determination module, used to determine fault injection position information of a random single-bit fault according to a ciphertext difference between a correct ciphertext and an erroneous ciphertext;
[0011] An analysis module is used to inject a random single-bit fault at different fault injection positions in the (T-5)th round according to the fault injection position information to obtain a differential propagation trajectory, and analyze the differential propagation trajectory to obtain the intermediate state information of the (T-5)th round and its corresponding round key;
[0012] A recovery module is used to gradually recover the round keys of the last four rounds of encryption operations according to the round keys corresponding to the intermediate state information of the (T-5)th round;
[0013] The determination module is also used to determine the master key according to the recovered round keys of the last four rounds of encryption operations through the key expansion characteristic of the SIMON algorithm.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method in the first aspect or any possible implementation of the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0016] In the embodiment of the present application, the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the correct ciphertext, and the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the wrong ciphertext after injecting a random single-bit fault in the (T-5) round; T is a positive integer greater than 5; the fault injection position information of the random single-bit fault is determined according to the ciphertext difference between the correct ciphertext and the wrong ciphertext; by comparing the correct ciphertext and the wrong ciphertext, the influence of the fault injection on the encryption result can be observed, and the influence of the fault injection on the ciphertext can be analyzed, so as to determine the specific location of the fault injection. After determining the fault injection location, the propagation path of the fault in the encryption process can be further analyzed. According to the fault injection location information, a random single-bit fault is injected at different fault injection locations in the (T-5) round to obtain a differential propagation trajectory, and the differential propagation trajectory is analyzed to obtain the intermediate state information of the (T-5) round and its corresponding round key; by observing the differential propagation trajectory of the fault in the encryption process, and analyzing the differential propagation trajectory to infer the intermediate state information of the (T-5) round and its corresponding round key, a basis is provided for further key recovery. According to the round key corresponding to the intermediate state information of the (T-5)th round, the round keys of the last four rounds of encryption operations are gradually restored; through the key expansion characteristics of the SIMON algorithm, the master key is determined according to the round keys of the last four rounds of encryption operations that have been restored. In this way, the number of fault injections can be reduced and the key recovery of the SIMON algorithm can be completed. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 is a flow chart of a differential fault analysis method provided in an embodiment of the present application;
[0019] Figure 2 is a flow chart of another differential fault analysis method provided in an embodiment of the present application;
[0020] Figure 3 is a differential propagation trajectory table provided in an embodiment of the present application;
[0021] Figure 4 This is an ambiguous situation of fault location judgment provided by the embodiment of the present application;
[0022] Figure 5 This is a comparison table of theoretical analysis and experimental results of the number of fault injections provided in an embodiment of the present application;
[0023] Figure 6This is a comparison table of attack methods for SIMON32 / 64 under a random single-bit model provided in an embodiment of the present application;
[0024] Figure 7 This is a comparison table of attack methods for SIMON48 / 96 under a random single-bit model provided in an embodiment of the present application;
[0025] Figure 8 This is a comparison table of attack methods for SIMON64 / 128 under a random single-bit model provided in an embodiment of the present application;
[0026] Fig. 9 It is a structural schematic diagram of a differential fault analysis device provided in an embodiment of the present application;
[0027] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0029] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0030] The following is a brief introduction to the technical terms involved in this application.
[0031] The cipher,has excellent performance in both hardware and software environments.,It is a balanced Feistel lightweight block cipher with ARX structure,,whose round structure consists of bitwise AND, cyclic shift and bitwise XOR operations.,The SIMON algorithm with bit block length, bit key length is denoted as SIMON,,where 16, 24, 32, 48 or 64, and m = 2, 3 or 4.,Based on different values of n, m and the number of encryption rounds.
[0032] Differential Fault Attack (DFA): The attacker introduces a fault during the encryption process, causing the intermediate state of the algorithm to change. The attacker then uses the idea of differential analysis to analyze the relationship between the correct ciphertext and the faulty ciphertext, obtains partial or complete information about the intermediate state, and recovers the value of the round key, and then obtains the complete master key through the key expansion algorithm.
[0033] Fault Attack: refers to the process of inducing error information to cause a malfunction in the cryptographic device during the encryption process, and then using the fault information output by the device when an error occurs to obtain the cryptographic key information.
[0034] Fault injection: refers to the process of inducing the device to generate erroneous information, which is usually completed by placing the cryptographic device in an abnormal working environment. Fault injection methods include controlling the temperature to high or ultra-low temperature, creating a strong electromagnetic environment or placing it in a strong light environment, laser injection, changing the power supply or clock frequency, etc.
[0035] Single-bit fault: refers to the fault width that is a single bit. Generally, the fault width of a fault model can be single-bit fault, multi-bit fault, single-byte fault, multi-byte fault, etc.
[0036] The differential fault analysis method provided in the embodiment of the present application can be applied to at least the following application scenarios, which are described below.
[0037] Nowadays, the Internet of Things is very popular in the current environment and is used in many industries such as smart medical care, smart home, and automobiles. As an effective measure to ensure data security, block ciphers are widely used for information transmission of IoT devices. However, the memory, resources, and power of the IoT are extremely limited, so lightweight block ciphers came into being.
[0038] Lightweight block ciphers use less computation and protect data with low resources and low computational cost, and are suitable for a variety of devices with limited resources. Since most of the devices such as wireless sensors in the Internet of Things are based on electronic technology and have relatively simple interfaces, they are more susceptible to interference from external conditions during actual system operation, and inevitably leak information such as energy, electromagnetics, and power consumption. Attackers can use this information to conduct side channel attacks on the system.
[0039] At present, side channel attacks mainly include timing attacks, energy analysis, fault attacks, etc. Compared with timing, power consumption, electromagnetic and other attack methods, the data complexity of fault attacks is relatively low, and it may only take a few fault injection analyses to recover the complete key of the block cipher.
[0040] With the continuous development of cryptanalysis, fault attacks are combined with the classic attack method - differential analysis, which introduces faults in different execution steps of the encryption algorithm and analyzes the impact of the faults on the output to obtain information about the key. If the attacker has mastered the internal structure of the encryption algorithm, differential fault attacks can be used to obtain information about the key more accurately and efficiently.
[0041] Compared with the classic differential analysis method, the differential fault attack may ideally only require a few fault encryptions to obtain the complete key of the algorithm, greatly reducing the complexity of the analysis. This poses a great threat to the security of lightweight block cipher algorithms, so it is essential to consider resistance to differential fault attacks when designing algorithms.
[0042] Then, conducting differential fault attacks on lightweight block cipher algorithms to evaluate their security can help designers find algorithm defects and further improve cryptographic algorithms, which is of great help to the design and development of cryptography. Therefore, it is necessary to conduct differential fault attacks on the proposed lightweight block cipher.
[0043] The SIMON cryptographic algorithm is a family of highly optimized lightweight block ciphers proposed by the National Security Agency of the United States in 2013. It has excellent performance in both hardware and software environments. The researchers mainly carried out differential fault attacks on SIMON under different fault models. The models are mainly divided into three types: random single-bit fault model, random byte fault model and random multi-bit fault model.
[0044] Under the random single-bit fault model, for the SIMON algorithm with a block length of n, n / 2 fault injections are required to recover the round key of the last round, and to recover the complete master key of the algorithm, faults need to be injected in 4 rounds respectively.
[0045] Finally, through experimental simulation, the researchers gave an average of 101.72 fault injections required to recover the master key of SIMON32 / 64, 174.37 fault injections required to recover the master key of SIMON48 / 96, and 252.58 fault injections required to recover the master key of SIMON64 / 128. The final experimental results show that injecting faults in 2 rounds of the key expansion algorithm can recover the complete master key, and an average of 50.32 fault injections can recover the master key of SIMON32 / 64, an average of 85.86 fault injections can recover the master key of SIMON48 / 96, and an average of 124.72 fault injections can recover the master key of SIMON64 / 128.
[0046] Considering that the injection of faults in actual application environments may irreversibly damage the device, the key to differential fault attacks is to try to reduce the rounds and times of fault injection. Under the random single-bit fault model, the main idea of researchers is to use the round function of the cryptographic algorithm to list the truth table of the ciphertext differential and the intermediate state bits, and determine the round key based on the actual value of the ciphertext differential. This technical solution requires injecting faults in at least two rounds of the cipher to recover the master key, and the higher the number of injected faults, the higher the complexity of the attack, and there is a high possibility of device damage, which ultimately affects the efficiency of the entire solution.
[0047] The master key is the core of the encryption algorithm, which determines the generation of all round keys in the encryption process. Once an attacker obtains the master key, they can fully control the encryption process, including encrypting and decrypting arbitrary data. Possessing the master key means that the attacker can decrypt all data encrypted with the key, thereby obtaining sensitive information. Recovering the master key is a sign of verifying whether the differential fault attack is successful. Only by successfully recovering the master key can the effectiveness of the attack be proved and the security of the algorithm can be further evaluated. By recovering the master key, the attacker can further analyze the weaknesses of the algorithm, propose improvement suggestions, or verify the effectiveness of other attack methods.
[0048] Recovering the master key can reduce the rounds and times required for the attack. Once the master key is recovered, the attacker can use it to generate all round keys, thereby simplifying the subsequent attack process. Recovering the master key can simplify the attack process, reduce unnecessary operations and calculations, and improve attack efficiency.
[0049] Recovering the master key is an important means of comprehensively evaluating the security of an algorithm. By recovering the master key, the vulnerability of the algorithm to physical attacks can be revealed, and suggestions for improvement can be made. By recovering the master key, designers can understand the performance of the algorithm in the face of differential fault attacks, thereby improving the algorithm design and increasing the ability to resist such attacks.
[0050] In practical applications, protecting sensitive data is crucial. Recovering the master key means that an attacker can decrypt all data encrypted with that key, thereby obtaining sensitive information. By recovering the master key, the security of the device in the face of physical attacks can be evaluated, thereby improving the overall security of the device.
[0051] Recovering the master key is of great significance in differential fault attacks. It is not only a sign of a successful attack, but also helps attackers fully control the encryption process, improve attack efficiency, evaluate algorithm security, and protect sensitive data in practical applications. Therefore, in differential fault attacks, recovering the master key is a core goal and has great value for evaluating and improving cryptographic algorithms.
[0052] Figure 1 It is a flow chart of a differential fault analysis method provided in an embodiment of the present application.
[0053] like Figure 1 As shown, the differential fault analysis method may include steps 110 to 150, and the method is applied to a differential fault analysis device, as shown below:
[0054] Step 110, performing T rounds of encryption operations on the plaintext using the SIMON algorithm to obtain a correct ciphertext, and injecting a random single-bit fault in the (T-5)th round of T rounds of encryption operations on the plaintext using the SIMON algorithm to obtain an erroneous ciphertext; T is a positive integer greater than 5;
[0055] SIMON algorithm: SIMON is a symmetric key block cipher designed by the National Security Agency (NSA) of the United States. It is a lightweight encryption algorithm suitable for resource-constrained environments such as embedded systems. SIMON algorithm encrypts plaintext through multiple rounds of encryption operations, each of which involves a mixing operation of the round key and the plaintext.
[0056] Plaintext: In the encryption process, the original data that is not encrypted is called plaintext. Ciphertext: The data processed by the encryption algorithm is called ciphertext.
[0057] Single-bit fault: A single-bit (0 or 1) error intentionally introduced during the encryption process. This fault is often used in cryptanalysis to observe changes in the behavior of encryption algorithms.
[0058] Fault injection: Deliberate introduction of errors or faults into the encryption process, often used in cryptanalysis to observe changes in the behavior of the encryption algorithm.
[0059] In the (T-5)th round of the SIMON algorithm, a random single-bit fault is injected to observe the propagation and impact of the fault in the algorithm. A single-bit fault is introduced by randomly selecting a bit at a certain position in the (T-5)th round to flip (0 to 1 or 1 to 0). By injecting a fault, the propagation path and impact of the fault in the algorithm can be observed, thereby inferring the intermediate state and round key of the algorithm.
[0060] The SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the correct ciphertext. Then, a random single-bit fault is injected in the (T-5)th round, and T rounds of encryption operations are performed again to obtain the incorrect ciphertext. By comparing the correct ciphertext and the incorrect ciphertext, the impact of fault injection on the encryption result can be observed.
[0061] Step 120, determining fault injection position information of a random single-bit fault according to a ciphertext difference between a correct ciphertext and an erroneous ciphertext;
[0062] Fault injection location information: the specific location where the fault is injected during the encryption process.
[0063] By calculating the difference between the correct ciphertext and the incorrect ciphertext, the propagation properties of the single-bit fault are analyzed, the specific location of the fault injection is determined, and the intermediate state of the algorithm is restored.
[0064] Analyze fault propagation: Determine the specific location of fault injection by analyzing the propagation path of a single-bit fault in the algorithm.
[0065] Recover intermediate states: Combine ciphertext differentials and fault propagation paths to recover the intermediate states of the algorithm.
[0066] By analyzing fault propagation and ciphertext differentials, the specific location of fault injection can be determined and the intermediate state of the algorithm can be restored, providing a basis for further recovery of round keys.
[0067] Based on the ciphertext difference between the correct ciphertext and the incorrect ciphertext, the impact of fault injection on the ciphertext is analyzed to determine the specific location of the fault injection. After determining the fault injection location, the propagation path of the fault in the encryption process can be further analyzed.
[0068] Step 130, according to the fault injection position information, inject a random single-bit fault at different fault injection positions in the (T-5)th round to obtain a differential propagation trajectory, and analyze the differential propagation trajectory to obtain the intermediate state information of the (T-5)th round and its corresponding round key;
[0069] Intermediate state information: During the encryption process, the intermediate result after each round of encryption operation is called intermediate state information.
[0070] Round key: A subkey used in each round of encryption operation, generated from the master key through a key expansion algorithm.
[0071] Inject random single-bit faults at different positions in the (T-5)th round, observe the propagation trajectory of the fault in the encryption process, and analyze these trajectories to infer the intermediate state information of the (T-5)th round and its corresponding round key. By analyzing the differential propagation trajectory, the intermediate state information and round key of the (T-5)th round can be obtained, providing a basis for further key recovery.
[0072] Step 140, gradually recovering the round keys of the last four rounds of encryption operations according to the round keys corresponding to the intermediate state information of the (T-5)th round;
[0073] Inject a fault at a certain position in the last 4 rounds and observe the propagation and impact of the fault. Recover the round keys of the last 4 rounds by analyzing the fault propagation and ciphertext differential. By recovering the round keys of the last 4 rounds, the master key can be further inferred.
[0074] According to the intermediate state information of the (T-5)th round and the corresponding round key, the round keys of the last four rounds of encryption operations are gradually reversed. After successfully recovering the round keys of the last four rounds, the master key can be further derived.
[0075] Step 150, using the key expansion characteristic of the SIMON algorithm, the master key is determined based on the recovered round keys of the last four rounds of encryption operations.
[0076] Master key: The original key used to generate round keys in the encryption algorithm. Using the key expansion feature of the SIMON algorithm, the master key is reversely derived based on the last 4 round keys that have been recovered. Finally, the master key is determined to complete the key recovery of the SIMON algorithm.
[0077] Through fault injection and differential analysis techniques, the intermediate state information and round keys of the SIMON algorithm are gradually derived, and the master key is finally recovered. This method has important application value in cryptanalysis, especially when fighting against lightweight encryption algorithms.
[0078] In a possible embodiment, step 120 may specifically include the following steps:
[0079] Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and calculate the input difference of the second-to-last round and the partial bit information of the input differences of other rounds;
[0080] The fault injection position information of the random single-bit fault is determined based on the ciphertext difference, the input difference of the second-to-last round, and partial bit information of the input differences of other rounds.
[0081] Propagation characteristics: The characteristics of how a fault propagates from one bit to other bits during the encryption process. This involves the logic and operations within the encryption algorithm. Input differential: The difference between the input data of a specific round and the normal input data during the encryption process. Ciphertext differential: The difference between the correct ciphertext and the incorrect ciphertext.
[0082] By analyzing the propagation path of a single-bit fault in five consecutive rounds of encryption operations, we can understand how the fault affects the input and output of each round. This analysis helps to determine the specific impact of the fault on the encryption process. Through this analysis, we can calculate the input difference of the second-to-last round and the partial bit information of the input difference of other rounds.
[0083] According to the fault propagation characteristics, the input difference of the second-to-last round is calculated, that is, the difference between the input data of the second-to-last round and the normal input data. At the same time, some bit information of the input difference of other rounds is calculated. These differential information provides key data for the subsequent determination of the fault injection location.
[0084] By combining the ciphertext differential, the input differential of the second-to-last round, and some bit information of the input differential of other rounds, the relationship between these differential information is analyzed to determine the specific location of the fault injection. Through this analysis, the location of the fault injection can be accurately determined, providing a basis for further differential propagation trajectory analysis and key recovery.
[0085] By analyzing the propagation characteristics of a single-bit fault in five consecutive rounds, the input differential of the second-to-last round and partial bit information of the input differentials of other rounds are calculated, and combined with the ciphertext differential, the specific location of the fault injection is finally determined, which can effectively deduce the internal state and key of the encryption algorithm.
[0086] The propagation characteristics of a single-bit fault in five consecutive rounds are analyzed, and the input difference of the second-to-last round is calculated, including:
[0087] Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and determine some bits of the input difference of the penultimate round based on the relationship between the low-order bits of the ciphertext difference and the output difference of the penultimate round;
[0088] By using the propagation mode of the intermediate differences during the fault propagation process, the input differences to the second-to-last round are gradually derived.
[0089] By analyzing the propagation path of a single-bit fault in five consecutive rounds of encryption operations, we can understand how the fault affects the input and output of each round. This analysis helps determine the specific impact of the fault on the encryption process. The input differential of the second-to-last round and partial bit information of the input differential of other rounds can be calculated.
[0090] There is a certain relationship between the low-order bits of the ciphertext differential and the output differential of the second-to-last round. By analyzing this relationship, some bits of the input differential of the second-to-last round can be determined. Some bit information of the input differential of the second-to-last round can be preliminarily determined, providing a basis for further differential propagation trajectory analysis.
[0091] During the fault propagation process, there is a specific propagation pattern between the intermediate differences of each round (i.e., the input difference and output difference of each round). By analyzing these propagation patterns, the input difference of the second-to-last round can be gradually derived. Through this step-by-step derivation, the input difference of the second-to-last round can be accurately calculated, providing key data for further key recovery.
[0092] By analyzing the propagation characteristics of a single-bit fault in five consecutive rounds, combined with the relationship between the low-order bits of the ciphertext differential and the output differential of the second-to-last round, some bits of the input differential of the second-to-last round are preliminarily determined. Then, the propagation mode of the intermediate differential during the fault propagation process is used to gradually derive the input differential of the second-to-last round. This method has important application value in cryptanalysis, especially when fighting against lightweight encryption algorithms, and can effectively derive the internal state and key of the encryption algorithm.
[0093] In a possible embodiment, the method further includes:
[0094] Analyze the propagation characteristics of single-bit faults in five consecutive rounds and determine that the low-order bits of the ciphertext difference correspond to some bits of the output difference of the second-to-last round; the ciphertext difference is the difference between the correct ciphertext and the incorrect ciphertext;
[0095] In the penultimate round of encryption operation, the output differential of encryption operation is reversely propagated to the input differential by utilizing the XOR operation characteristic and cyclic shift characteristic of SIMON algorithm, so as to determine at least part of the bits of the input differential of the penultimate round.
[0096] By analyzing the propagation path of a single-bit fault in five consecutive rounds of encryption operations, we can understand how the fault affects the input and output of each round. In particular, there is a certain relationship between the low-order bits of the ciphertext differential and the output differential of the second-to-last round. By analyzing this relationship, we can determine some bits of the output differential of the second-to-last round. We can preliminarily determine some bit information of the output differential of the second-to-last round, providing a basis for further differential propagation trajectory analysis.
[0097] In the second-to-last round of encryption operations, the output differential can be reversely propagated to the input differential by utilizing the XOR operation characteristics and cyclic shift characteristics of the SIMON algorithm. Specifically, by reversely applying the operations of the SIMON algorithm (such as XOR and cyclic shift), the input differential can be derived from the output differential. Through this reverse propagation, at least some bits of the input differential of the second-to-last round can be accurately calculated, providing key data for further key recovery.
[0098] The SIMON algorithm relies heavily on bitwise operations (such as AND, XOR, circular shift, etc.) to achieve encryption. The characteristics of these operations make differential fault analysis (DFA) possible, because fault injection can affect the results of these operations. SIMON's key expansion algorithm generates round keys, which are used in each round of the encryption process.
[0099] The random single-bit fault model is chosen because the bitwise operation characteristics of SIMON make single-bit faults significantly affect the encryption process. After the single-bit fault is injected, the changes in the ciphertext can be observed, and the difference in the intermediate state can be inferred.
[0100] We choose to inject the fault in the (T-5)th round of the T-round algorithm. This means injecting the fault in the fifth to last round so that we can observe the propagation properties of the fault in the last five rounds. By analyzing the propagation properties of the single-bit fault in five consecutive rounds, we can infer some values of the input differential in these five rounds.
[0101] After the fault is injected in the (T-5)th round, it will propagate to the subsequent rounds through SIMON's round function. Due to the bitwise operation characteristics of SIMON, the fault will propagate in a predictable way, affecting the intermediate states of the subsequent rounds. By analyzing the propagation of the fault in the last 5 rounds, we can infer some values of the input differentials of these 5 rounds. These differential values can help further analyze the ciphertext differentials.
[0102] After the fault is injected, the ciphertext will change. By comparing the normal ciphertext and the ciphertext after the fault is injected, the ciphertext difference can be obtained. Combined with the previously inferred input differential part value, the ciphertext difference can be further analyzed to infer the round keys of the last 4 rounds. By analyzing the combination of the ciphertext differential and the input differential, the round keys of the last 4 rounds can be directly inferred. This is because SIMON's key expansion algorithm and round function structure make these round keys directly recoverable through differential analysis.
[0103] By injecting a random single-bit fault in the (T-5) round, analyzing the propagation properties of the fault in the last 5 rounds, and combining the ciphertext difference, the round keys of the last 4 rounds can be directly inferred. This attack strategy takes advantage of the bitwise operation characteristics of the SIMON algorithm and the key expansion algorithm.
[0104] By analyzing the propagation characteristics of a single-bit fault in five consecutive rounds, it is determined that the low-order bits of the ciphertext differential correspond to some bits of the output differential in the second-to-last round. Then, in the second-to-last round of the encryption operation, the XOR operation characteristics and cyclic shift characteristics of the SIMON algorithm are used to reversely propagate the output differential of the encryption operation to the input differential to determine at least some bits of the input differential in the second-to-last round. This method has important application value in cryptanalysis and can effectively derive the internal state and key of the encryption algorithm.
[0105] In a possible embodiment, the method further includes:
[0106] According to the propagation properties of ciphertext differences and single-bit faults in the SIMON algorithm, the input differences of the last three rounds are calculated;
[0107] According to the input differences of the last three rounds, the injection location information of the single-bit fault is determined, and a differential propagation trajectory table is established;
[0108] According to the differential propagation trajectory table, the intermediate state information of the last three rounds and their corresponding round keys are gradually derived.
[0109] By analyzing the propagation properties of ciphertext differentials and single-bit faults in the SIMON algorithm, the input differentials of the last three rounds can be derived. Specifically, the propagation path and impact of faults in the encryption process can be determined through differential analysis. Through this analysis, the input differentials of the last three rounds can be calculated, providing a basis for further fault injection location analysis and the establishment of differential propagation trajectory tables.
[0110] According to the input differential of the last three rounds, the injection location information of the single-bit fault can be determined. By analyzing the relationship between the input differential and the output differential, a differential propagation trajectory table can be established to record the propagation path and impact of the fault in each round. Through this analysis, the location of the fault injection can be accurately determined, and a differential propagation trajectory table can be established to provide key data for further derivation of intermediate state information and round keys.
[0111] According to the differential propagation trajectory table, the intermediate state information of the last three rounds and their corresponding round keys can be gradually derived. Specifically, by analyzing the input differential and output differential of each round, the intermediate state information and round keys of each round can be reversely derived. Through this step-by-step derivation, the intermediate state information and round keys of the last three rounds can be accurately calculated, providing key data for further key recovery.
[0112] Alternatively, if Figure 2 As shown, the steps to recover the last round key include:
[0113] Step 101: Randomly select a plaintext P, use the SIMON algorithm to perform T rounds of encryption under the action of the master key, and obtain the correct ciphertext C = L T ||R T .
[0114] Step 102: Use the same plaintext P and key K to encrypt again. When the algorithm runs to the (T-5)th round, input L to the left. T-5 Induce a random single-bit failure and continue to encrypt for 5 rounds to obtain an incorrect ciphertext
[0115] Step 103: According to the ciphertext difference ΔC=C⊕C * The input difference Δ of the last three rounds is calculated by using the single-bit fault propagation property. T ,Δ T-1 and Δ T-2 According to Δ T-2 The specific value of determines the fault injection location q and establishes the differential propagation trajectory table.
[0116] Step 104: Using the information in the trajectory table, Δ T-1 and Δ T-2 Get (T-2) wheel left input L T-2 Two bits of
[0117] Step 105: Combine Δ in the trajectory table T-3 and Δ T-2 The value of and Two bits in.
[0118] Step 106: Get L T-2 After the partial bit information is T-1 =L T-2 ⊕F(R T )⊕L T Recover the last round key K T-1 Repeat steps S2 to S5 until the complete round key K is recovered. T-1 .
[0119] Optionally, in step 103, Δ T-2 The calculation method is as follows:
[0120] Δ T-2 =[(Δ T-1 <<<1)&(Δ T-1 <<<8)]⊕[(Δ T-1 <<<8)&(L T-1 <<<1)]
[0121] ⊕[(Δ T-1 <<<1)&(L T-1 <<<8)]⊕(Δ T-1 <<<2)⊕Δ T
[0122] The above formula is obtained by using the bitwise operation characteristics of the SIMON algorithm round function. This formula can be used to directly calculate the penultimate round input difference Δ based on the correct and incorrect ciphertext pairs. T-2 , and directly and quickly recover the key without the need to use the previous method of enumerating truth tables to recover the key, which greatly reduces the complexity of the attack. The specific method of obtaining the above formula is as follows:
[0123] The n-bit input on the left side of the i-th round is recorded as The n-bit input on the right is denoted by The effect of the round function F on a single bit is denoted as f, that is, for any j = 0, 1, ..., n, the following formula holds:
[0124]
[0125] The error value of the left input in round i after fault injection is recorded as The error value of the right-hand input is recorded as After one round of encryption, the left input difference of the i+1th round The jth bit of can be expressed as:
[0126]
[0127] Using the bitwise AND operation &, the distributive law of the bitwise XOR operation ⊕ is:
[0128]
[0129] Therefore
[0130]
[0131] When i=T, the (T-2)th round input difference Δ T-2 The j-th bit expression of is:
[0132]
[0133] According to the bitwise operation characteristics of the round function, the (T-2) round input difference Δ is summarized from the above formula T-2 The calculation formula is, that is, for the T-round SIMON algorithm, given Δ T-1 , Δ T and (T-1) wheel left input L T-1 In the case of (T-2) round input difference Δ T-2 is ΔT-2 =[(Δ T-1 <<<1)&(Δ T-1 <<<8)]⊕[(Δ T-1 <<<8)&(L T-1 <<<1)]⊕[(Δ T-1 <<<1)&(L T-1 <<<8)]⊕(Δ T-1 <<<2)⊕Δ T .
[0134] Optionally, the method for determining the fault location in step S103 is as follows: according to the fault propagation law, Δ T-2 There is a fixed pattern in which one position is 1 and the high positions are followed by consecutive 0s. T-2 The actual value is matched with the fixed pattern. After the match, the first "1" in the low order is located at the (q+6) position, thereby determining that the specific position of the fault injection is q.
[0135] Optionally, the basis for establishing the differential propagation trajectory table from the position q in step S103 is as follows:
[0136]
[0137] Among them, δ is the impact of a bit change on the next round of differentials; n is the packet length; q is the fault injection position; i is the number of changes in 1 round; j is the fault displacement; t is assumed in round t; represents the input difference of the q position of round t; the above formula is used to represent the input difference of each round;
[0138]
[0139] The above formula can be used to list the values of the input differential obtained from each round of erroneous encryption after fault injection. The key can be directly recovered based on the value, without the need to recover other keys by injecting faults in new rounds, greatly reducing the complexity of the attack.
[0140] Optionally, the method for restoring the intermediate state in step S105 is as follows:
[0141] like and but
[0142] like and but
[0143] like and but
[0144] like and but
[0145] Combined with the trajectory table Δ T-3 and Δ T-2 When the above conditions are met, at least and Two bits in.
[0146] Optionally, the process of analyzing and obtaining the initial key includes:
[0147] Step 201: Use S106 to restore K T-1 Decrypt the last round and get L T-1 ||R T-1 and Analyze using the method claimed in claim 6, repeat steps S103 to S106, and recover the round key K T-2 Continue this process to recover the other two round keys K T-3 and K T-4 .
[0148] Step 202: Use the four recovered round keys to recover the complete master key according to SIMON's key expansion algorithm.
[0149] Optionally, injecting a random single-bit fault once in the 27th round of the SIMON32 / 64 algorithm can recover an average of 5.38 bits of the last round of the key; injecting a random single-bit fault once in the 31st round of the SIMON48 / 96 algorithm can recover an average of 5.83 bits of the last round of the key; and injecting a random single-bit fault once in the 39th round of the SIMON64 / 128 algorithm can recover an average of 5.81 bits of the last round of the key.
[0150] Optionally, the ambiguity in judging the fault location will result in the inability to recover the correct key. The specific situation is as follows: the input difference is matched with the fixed pattern in order from low to high. Due to the uncertain value in the fault propagation trajectory, the pattern matching is successful but the first 1 in the low position is not caused by the fault injection. In this case, the correct key cannot be recovered. By analyzing all the ambiguous situations, the probabilities of ambiguity in fault location judgment for SIMON32 / 64, SIMON48 / 96 and SIMON64 / 128 are calculated to be 3 / 8, 29 / 128 and 11 / 128 respectively.
[0151] Optionally, in the case where there may be ambiguity in determining the fault location and the correct key cannot be recovered, analysis shows that SIMON32 / 64, SIMON48 / 96 and SIMON64 / 128 cryptographic algorithms require an average of 4.76, 5.32 and 6.03 fault injections, respectively, to recover the complete last round of round keys.
[0152] Optionally, after recovering the last round of round keys, the same method can be used to recover the last four rounds of round keys, and the master key can be recovered in combination with the key expansion algorithm.
[0153] In the embodiment of the present application, the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the correct ciphertext, and the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the wrong ciphertext after injecting a random single-bit fault in the (T-5) round; T is a positive integer greater than 5; the fault injection position information of the random single-bit fault is determined according to the ciphertext difference between the correct ciphertext and the wrong ciphertext; by comparing the correct ciphertext and the wrong ciphertext, the influence of the fault injection on the encryption result can be observed, and the influence of the fault injection on the ciphertext can be analyzed, so as to determine the specific location of the fault injection. After determining the fault injection location, the propagation path of the fault in the encryption process can be further analyzed. According to the fault injection location information, a random single-bit fault is injected at different fault injection locations in the (T-5) round to obtain a differential propagation trajectory, and the differential propagation trajectory is analyzed to obtain the intermediate state information of the (T-5) round and its corresponding round key; by observing the differential propagation trajectory of the fault in the encryption process, and analyzing the differential propagation trajectory to infer the intermediate state information of the (T-5) round and its corresponding round key, a basis is provided for further key recovery. According to the round key corresponding to the intermediate state information of the (T-5)th round, the round keys of the last four rounds of encryption operations are gradually restored; through the key expansion characteristics of the SIMON algorithm, the master key is determined according to the round keys of the last four rounds of encryption operations that have been restored. In this way, the key recovery of the SIMON algorithm is completed.
[0154] For example, in order to recover the last round key, we choose to inject a fault into the left input of the 27th round. By analyzing the relationship between the difference in the 30th round and the fault propagation, theoretically, one fault injection can recover the last round key K of 5.25 bits. 31 , at least 4.76 erroneous ciphertexts are needed to recover the complete last round key. In order to obtain the round keys for the other three rounds, it is necessary to continue injecting faults in the 27th round, and calculate the 29th round difference based on the recovered round key to recover the penultimate round key K 30 . Similarly, continue to recover the round key K 29 and K 28 , thereby recovering the master key.
[0155] In a possible embodiment, the detailed steps of recovering the round key of the last round are as follows:
[0156] Step 301: Encrypt the same plaintext P. When encrypting to the 27th round, inject a random single-bit fault into the left input to obtain the wrong ciphertext
[0157] calculate Δ 30 =[(Δ 31 <<<1)&(Δ 31 <<<8)]⊕[(Δ 31 <<<8)&(L 31 <<<1)]⊕[(Δ 31 <<<1)&(L 31 <<<8)]⊕(Δ 31 <<<2)⊕Δ 32 .
[0158] Step 302: According to Δ T-2 The value of determines the location of fault injection. Taking the single-bit fault injection into the least significant bit as an example, it can be determined by Δ 30 Matching with the pattern "000***0*01" is obtained. According to the fault injection position and the following formula, Figure 3 Table of 5 rounds of fault propagation differential trajectories shown.
[0159]
[0160] according to Figure 3 The value of each round of input difference is taken by using the input difference Δ 31 and Δ 30 Calculate the two bits of the left input in the 30th round and
[0161] Step 303: According to If the specific value of and but
[0162] like and but
[0163] like and but
[0164] like and but At least two bits can be obtained.
[0165] Step 304: L obtained according to steps S102 and S103 30 , by K 31 =L 30 ⊕F(R 32 )⊕L 32 The last round key K can be recovered 31 By injecting faults at different positions of the left input of the algorithm in round 27, the complete last round key K can be recovered according to the above method. 31 .
[0166] Step 305: Decrypt the ciphertext using the round key of the last round, and continue to derive the round keys used for lower rounds in the same way to recover the round keys used for encryption in the lower rounds. After recovering the round keys of the last four rounds of the algorithm, the complete master key of the SIMON algorithm can be recovered according to the key expansion algorithm.
[0167] The complexity of the differential fault attack on the SIMON cryptographic algorithm mainly depends on the number of bits that can be recovered after a fault injection. Then, the number of fault injections required to recover a complete round of keys can be solved according to the packet length. In a specific embodiment, after a fault injection, step S102 confirms that the fault injection position q = 0, and uses q and the input differential Δ 31 , Δ 30 The value of can restore the intermediate state L 30 2 bits and Therefore, after one fault injection, an average of 2 / 16 bits of the round key can be recovered by using step S102.
[0168] Assumption Δ 29 Some bits of are known, and according to step S103, only when the triple or When the value condition (1, 0, 0) is met, L can be restored 30 , and then recover the corresponding round key bits.
[0169] The value of j ranges from 0 to n-1. We traverse all possible values of j and compare the values of the triples that meet the conditions with Δ 30 The values of the corresponding positions in the fixed pattern "000***0*01" are compared one by one. If there is no contradiction, the intermediate state bit of the corresponding position can be restored.
[0170] Δ 30 In the fixed mode, the probability of “*” taking 0 and 1 is equal. By calculating the probability of the value that satisfies the condition, the instance can be recovered on average after a fault injection (1 / 2 3 ×5+1 / 2 2×4+1)×2=5.25 bits of key. Therefore, by injecting a random single-bit fault once in the 27th round of the specific embodiment, on average 2 / 16+5.25≈5.38 bits of the last round of keys can be recovered.
[0171] Since the embodiment of the present application needs to determine the recoverable key bits according to the location of the fault injection, it is necessary to consider the ambiguity in determining the fault location. 30 Instead of matching the fixed pattern "000***0*01" in order from low to high, the value of "*" is uncertain, so the pattern matches successfully but the first 1 in the low bit is not the correct fault injection position.
[0172] Since the probability of "*" taking 0 and 1 is equal, by analyzing the possible values of "*" in the input difference, the form of the input difference when the pattern matching is successful is obtained, and the probability of the fault location judgment ambiguity is calculated using the value of "*", which is given as follows: Figure 4 The three versions of the specific embodiments of the present invention show the situation of the fault location ambiguity and the corresponding probability when this situation occurs. According to the above situation, the probability of the fault location ambiguity in the specific embodiment is calculated to be 4×1 / 2 5 +2×1 / 2 4 +1 / 2 3 =3 / 8.
[0173] Therefore, in this specific embodiment, it takes an average of 16 / [(1-3 / 8)×5.38]=4.76 fault injections to completely recover the round key of the last round.
[0174] To verify the correctness of the theoretical analysis, a controlled differential fault attack process that does not repeatedly inject faults at the same location is simulated, and the attack process of recovering the round key of the last round and the complete master key of the algorithm is simulated. A complete experiment is considered to be the recovery of the complete round key or master key after injecting a fault, and the number of fault injections required to recover the key is recorded in each experiment.
[0175] Figure 5 The experimental results are compared with those of the theoretical analysis. It can be seen that when the control fault injection position and some differential bits are known, the experimental results are close to the theoretical calculation results, which verifies the correctness of the theoretical analysis.
[0176] The embodiments of the present application study the characteristics of the AND operation in the SIMON round function, analyze the propagation properties of 5 consecutive rounds of single-bit faults, study the bitwise operation characteristics, obtain the calculation formula for the second-to-last round input differential, and provide a method for determining the fault injection position and the intermediate state bit. On this basis, a new differential fault attack method for the SIMON algorithm is proposed.
[0177] In the embodiment of the present application, the fault injection location is determined according to the key expansion algorithm. After the fault is injected, the properties of the round function and the operation are fully studied, the fault propagation properties are analyzed, and then the intermediate state bits are directly calculated using the known differential to recover the key. Since the location of the fault injection cannot be controlled in an actual attack, a new simulation experiment is set up. It is assumed that the attacker cannot control the specific location of the fault injection. At this time, the fault may be injected at the same location multiple times until a complete round of keys or master keys are recovered. And during the attack, according to the actual Δ T-3 The specific value of the recovery key, so the number of failures in the actual attack will be higher than the theoretical analysis results.
[0178] Figures 6 to 8 The average number of fault injections required to recover the last round key and the master key in 10,000 experiments using three versions of the SIMON algorithm is given. The number of fault injections required to recover the last round key and the complete master key under a random single-bit fault model is compared with that of existing methods. The number of fault injection rounds required to recover the master key is also compared.
[0179] In practical applications, by controlling the spatial and temporal precision of laser injection, fault injection can be controlled to a single bit of the cryptographic state, causing a single-bit fault, thereby performing relevant cryptographic analysis. However, the injection of faults may irreversibly damage the device, so trying to reduce the location and number of fault injections is the key to differential fault attacks.
[0180] Depend on Figures 6 to 8 It can be seen that under the random single-bit fault model, compared with the existing differential fault attack method for the SIMON cryptographic algorithm, the differential fault attack method proposed in the embodiment of the present application only needs to inject a fault in one round to recover the master key, which is easy to implement and reduces the degree of damage to the encryption device.
[0181] Moreover, whether it is the round key of the last round of the recovery algorithm or the master key of the recovery algorithm, the number of fault injections required by the embodiment of the present application is the least, that is, the data complexity required for the attack is the smallest. Therefore, the differential fault attack method of the embodiment of the present application is more effective for the SIMON algorithm.
[0182] The new differential fault attack on the SIMON cryptographic algorithm in the embodiment of the present application is effective in terms of lower attack complexity and fewer fault injection rounds. It also makes full use of the characteristics of the AND operation in the round function of the algorithm, directly obtains the input difference of the penultimate round based on the ciphertext difference, and quickly recovers the master key in combination with the fault propagation property. It is very necessary for algorithm designers to improve the ability of the SIMON algorithm to resist differential fault attacks under the random single-bit fault model.
[0183] Based on the above Figure 1 The differential fault analysis method shown in the embodiment of the present application also provides a differential fault analysis device, such as Fig. 9 As shown, the differential fault analysis device 900 may include:
[0184] The encryption module 910 is used to perform T rounds of encryption operations on the plaintext through the SIMON algorithm to obtain a correct ciphertext, and to perform T rounds of encryption operations on the plaintext through the SIMON algorithm and inject a random single-bit fault in the (T-5)th round to obtain an erroneous ciphertext; T is a positive integer greater than 5;
[0185] A determination module 920, configured to determine fault injection position information of a random single-bit fault according to a ciphertext difference between a correct ciphertext and an erroneous ciphertext;
[0186] An analysis module 930 is used to inject a random single-bit fault at different fault injection positions in the (T-5)th round according to the fault injection position information to obtain a differential propagation trajectory, and analyze the differential propagation trajectory to obtain the intermediate state information of the (T-5)th round and its corresponding round key;
[0187] A recovery module 940 is used to gradually recover the round keys of the last four rounds of encryption operations according to the round keys corresponding to the intermediate state information of the (T-5)th round;
[0188] The determination module 950 is further configured to determine the master key according to the recovered round keys of the last four rounds of encryption operations by using the key expansion characteristic of the SIMON algorithm.
[0189] In a possible embodiment, the determination module 920 is specifically configured to:
[0190] Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and calculate the input difference of the second-to-last round and the partial bit information of the input differences of other rounds;
[0191] The fault injection position information of the random single-bit fault is determined based on the ciphertext difference, the input difference of the second-to-last round, and partial bit information of the input differences of other rounds.
[0192] In a possible embodiment, the determination module 920 is specifically configured to:
[0193] Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and determine some bits of the input difference of the penultimate round based on the relationship between the low-order bits of the ciphertext difference and the output difference of the penultimate round;
[0194] By using the propagation mode of the intermediate differences during the fault propagation process, the input differences to the second-to-last round are gradually derived.
[0195] In a possible embodiment, the analysis module 930 is further used to analyze the propagation characteristics of the single-bit fault in five consecutive rounds, and determine that the low-order bits of the ciphertext difference correspond to some bits of the output difference of the second-to-last round; the ciphertext difference is the difference between the correct ciphertext and the incorrect ciphertext;
[0196] The determination module 950 is further used to reversely propagate the output differential of the encryption operation to the input differential in the second to last round of the encryption operation by utilizing the XOR operation characteristics and cyclic shift characteristics of the SIMON algorithm to determine at least some bits of the second to last round input differential.
[0197] In a possible embodiment, the differential fault analysis device 900 may further include:
[0198] A calculation module, used to calculate the input differences of the last three rounds according to the ciphertext differences and the propagation properties of single-bit faults in the SIMON algorithm;
[0199] The determination module 950 is further used to determine the injection position information of the single-bit fault according to the input differences of the last three rounds, and to establish a differential propagation trajectory table;
[0200] The derivation module is used to gradually derive the intermediate state information of the last three rounds and their corresponding round keys according to the differential propagation trajectory table.
[0201] In the embodiment of the present application, the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the correct ciphertext, and the SIMON algorithm is used to perform T rounds of encryption operations on the plaintext to obtain the wrong ciphertext after injecting a random single-bit fault in the (T-5) round; T is a positive integer greater than 5; the fault injection position information of the random single-bit fault is determined according to the ciphertext difference between the correct ciphertext and the wrong ciphertext; by comparing the correct ciphertext and the wrong ciphertext, the influence of the fault injection on the encryption result can be observed, and the influence of the fault injection on the ciphertext can be analyzed, so as to determine the specific location of the fault injection. After determining the fault injection location, the propagation path of the fault in the encryption process can be further analyzed. According to the fault injection location information, a random single-bit fault is injected at different fault injection locations in the (T-5) round to obtain a differential propagation trajectory, and the differential propagation trajectory is analyzed to obtain the intermediate state information of the (T-5) round and its corresponding round key; by observing the differential propagation trajectory of the fault in the encryption process, and analyzing the differential propagation trajectory to infer the intermediate state information of the (T-5) round and its corresponding round key, a basis is provided for further key recovery. According to the round key corresponding to the intermediate state information of the (T-5)th round, the round keys of the last four rounds of encryption operations are gradually restored; through the key expansion characteristics of the SIMON algorithm, the master key is determined according to the round keys of the last four rounds of encryption operations that have been restored. In this way, the key recovery of the SIMON algorithm is completed.
[0202] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0203] The electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.
[0204] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0205] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1002 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory. In a specific embodiment, the memory 1002 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0206] The processor 1001 implements any one of the differential fault analysis methods in the embodiments shown in the figure by reading and executing the computer program instructions stored in the memory 1002 .
[0207] In one example, the electronic device may further include a communication interface 10010 and a bus 1010. Fig.10 As shown, the processor 1001, the memory 1002, and the communication interface 10010 are connected via a bus 1010 and communicate with each other.
[0208] The communication interface 10010 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0209] Bus 1010 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1010 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0210] The electronic device can execute the differential fault analysis method in the embodiment of the present application, thereby realizing the combination Figure 1 Describe the differential fault analysis method.
[0211] In addition, in combination with the differential fault analysis method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the Figure 1 Differential fault analysis method.
[0212] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0213] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0214] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0215] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A differential fault analysis method, characterized in that: The method comprises: The correct ciphertext is obtained by performing T rounds of encryption operation on the plaintext through the SIMON algorithm, and the incorrect ciphertext is obtained after injecting a random single-bit fault in the (T-5)th round of T rounds of encryption operation on the plaintext through the SIMON algorithm; T is a positive integer greater than 5; Determine the fault injection position information of the random single-bit fault according to the ciphertext difference between the correct ciphertext and the incorrect ciphertext; According to the fault injection position information, random single-bit faults are injected at different fault injection positions in the (T-5)th round to obtain differential propagation trajectories, and the differential propagation trajectories are analyzed to obtain the intermediate state information of the (T-5)th round and its corresponding round key; According to the round key corresponding to the intermediate state information of the (T-5)th round, gradually recover the round keys of the last 4 rounds of encryption operations; Through the key expansion feature of the SIMON algorithm, the master key is determined based on the recovered round keys of the last four rounds of encryption operations.
2. The method according to claim 1, characterized in that The determining of the fault injection position information of the random single-bit fault according to the ciphertext difference between the correct ciphertext and the erroneous ciphertext includes: Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and calculate the input difference of the second-to-last round and the partial bit information of the input differences of other rounds; The fault injection position information of the random single-bit fault is determined based on the ciphertext difference, the input difference of the second-to-last round, and partial bit information of the input differences of other rounds.
3. The method according to claim 2, characterized in that The analyzing the propagation characteristics of the single-bit fault in five consecutive rounds and calculating the input difference of the second to last round include: Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and determine some bits of the input difference of the penultimate round based on the relationship between the low-order bits of the ciphertext difference and the output difference of the penultimate round; By using the propagation mode of the intermediate differences during the fault propagation process, the input differences to the second-to-last round are gradually derived.
4. The method according to claim 1, characterized in that: The method further comprises: Analyze the propagation characteristics of single-bit faults in five consecutive rounds and determine that the low-order bits of the ciphertext difference correspond to some bits of the output difference of the second-to-last round; the ciphertext difference is the difference between the correct ciphertext and the incorrect ciphertext; In the penultimate round of encryption operation, the output differential of encryption operation is reversely propagated to the input differential by utilizing the XOR operation characteristic and cyclic shift characteristic of SIMON algorithm, so as to determine at least part of the bits of the input differential of the penultimate round.
5. The method according to claim 1, characterized in that The method further comprises: According to the propagation properties of ciphertext differences and single-bit faults in the SIMON algorithm, the input differences of the last three rounds are calculated; According to the input differences of the last three rounds, the injection location information of the single-bit fault is determined, and a differential propagation trajectory table is established; According to the differential propagation trajectory table, the intermediate state information of the last three rounds and their corresponding round keys are gradually derived.
6. A differential fault analysis device, characterized in that: The differential fault analysis device comprises: The encryption module is used to perform T rounds of encryption operations on the plaintext through the SIMON algorithm to obtain a correct ciphertext, and to inject a random single-bit fault in the (T-5)th round of T rounds of encryption operations on the plaintext through the SIMON algorithm to obtain an erroneous ciphertext; T is a positive integer greater than 5; A determination module, used to determine fault injection position information of a random single-bit fault according to a ciphertext difference between a correct ciphertext and an erroneous ciphertext; An analysis module is used to inject a random single-bit fault at different fault injection positions in the (T-5)th round according to the fault injection position information to obtain a differential propagation trajectory, and analyze the differential propagation trajectory to obtain the intermediate state information of the (T-5)th round and its corresponding round key; A recovery module is used to gradually recover the round keys of the last four rounds of encryption operations according to the round keys corresponding to the intermediate state information of the (T-5)th round; The determination module is also used to determine the master key according to the recovered round keys of the last four rounds of encryption operations through the key expansion characteristic of the SIMON algorithm.
7. The device according to claim 6, characterized in that The determination module is specifically used for: Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and calculate the input difference of the second-to-last round and the partial bit information of the input differences of other rounds; The fault injection position information of the random single-bit fault is determined based on the ciphertext difference, the input difference of the second-to-last round, and partial bit information of the input differences of other rounds.
8. The device according to claim 7, characterized in that The determination module is specifically used for: Analyze the propagation characteristics of single-bit faults in five consecutive rounds, and determine some bits of the input difference of the penultimate round based on the relationship between the low-order bits of the ciphertext difference and the output difference of the penultimate round; By using the propagation mode of the intermediate differences during the fault propagation process, the input differences to the second-to-last round are gradually derived.
9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the differential fault analysis method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the differential fault analysis method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Novel fault attack method for SKINNY-N-N algorithm
CN117811725A
System, method and computer readable medium for software protection via composable process-level virtual machines
US20180268130A1
Cited By
Lightweight authentication encryption algorithm differential fault attack method
CN120301578A