Collision attack post-processing method and system based on genetic algorithm
By introducing genetic algorithms in traditional collision attacks, optimizing key candidate evaluation and selection, the problem of traditional methods being inefficient in large-scale data sets or low-quality data is solved, and more efficient and accurate key positioning capabilities are achieved.
Patent Information
- Application Number
- CN202411428537.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-14
AI Technical Summary
Traditional collision attacks are inefficient when processing large-scale data sets or low-quality data, and are difficult to effectively apply in modern encryption technologies, especially in encryption technologies such as AES and RSA.
The collision attack post-processing method based on genetic algorithm is adopted, and the potential key collision value is optimized and screened by using genetic algorithm to improve the efficiency and accuracy of side channel attacks.
It significantly improves the efficiency and accuracy of collision attacks, and can quickly and accurately locate the correct keys in complex encryption environments, improving the application effect of traditional collision attacks.
Smart Images

Figure CN119449262A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cryptanalysis, and in particular to a collision attack post-processing method and system based on a genetic algorithm. Background Art
[0002] Collision attack is a common analytical method in side channel analysis and shows unique effectiveness against modern cryptographic systems with high security requirements.
[0003] The core principle of a collision attack is to compare the outputs of two or more encryption operations and look for any identical results or patterns that may reveal the key or partial key information used in the encryption process. Specifically, in a side-channel attack, analysts use physical information such as power consumption traces to monitor the physical behavior of the device when executing the encryption algorithm. By statistically analyzing the data in the encryption operation and the corresponding physical signs, the attacker can identify the interaction between individual bytes or multiple bytes in the key and infer the key itself.
[0004] Although collision attacks have shown their effectiveness in both theory and practice, they have significant limitations when dealing with large-scale data sets or low-quality data. Traditional collision attacks usually require a large amount of data and high-precision measurements, which may be difficult to achieve in practice. In addition, when faced with modern encryption technologies such as AES and RSA, which are designed with strong anti-collision properties, traditional methods are often inefficient, time-consuming, and easily affected by noise and environmental changes, which limits their scope and effectiveness in actual security assessments. Summary of the invention
[0005] The purpose of the present invention is to provide a collision attack post-processing method and system based on a genetic algorithm, which significantly improves the efficiency and accuracy of the collision attack by optimizing the key candidate evaluation and selection strategy during the attack process.
[0006] The core idea of the present invention is to improve the efficiency and accuracy of side channel attacks by combining genetic algorithms with collision attack technology. Specifically, the present invention uses a genetic algorithm to optimize and screen potential key collision values generated during a collision attack. First, by encrypting random plaintext and collecting power consumption traces, these data are used to perform an enhanced collision attack to generate a preliminary key byte collision ranking. Then, a genetic algorithm is used to sort and optimize these collision values, and through selection, crossover and mutation operations, the optimal collision chain is continuously evolved to quickly and accurately locate the correct key in a large amount of data, significantly improving the application effect of traditional collision attacks in complex encryption environments.
[0007] The technical solution of the method of the present invention is a collision attack post-processing method based on a genetic algorithm, which specifically includes the following steps:
[0008] Step 1: Obtain multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts;
[0009] Step 2: Perform a correlation enhanced collision attack on the random plaintext and the power consumption trace to obtain the probability ranking of the collision values of the key bytes between each pair;
[0010] Step 3: Calculate the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculate the sum of the squares of the differences between the energy traces of each pair of key bytes;
[0011] Step 4: Based on the sum of the squares of the energy trace differences between the two key bytes Theoretical distribution of,confirm collision value between two key bytes;
[0012] Step 5: Rearrange the collision values of the key bytes in pairs, move the values marked as collision in step 4 forward, and move the values marked as non-collision backward;
[0013] Step 6: Input the initial population into the genetic algorithm framework for evolution, and perform selection, crossover and mutation operations in each evolution;
[0014] Step 7: When the evolutionary generation reaches the threshold or the correct collision chain is found, the genetic algorithm ends and the individual with the highest current fitness is output as the result;
[0015] Preferably, each group of random plaintexts in step 1 is defined as follows:
[0016]
[0017] Among them, P i Indicates the i-th group of random plaintext in the data set. One group of random plaintext contains N1 bytes.
[0018] Each group of power consumption traces corresponding to each group of random plaintexts in step 1 is composed of multiple power consumption information;
[0019] The number of midpoints of each group of power consumption traces corresponding to each group of random plaintexts in step 1 is consistent with the number N of S-boxes used in the encryption algorithm, and each data represents the first round execution process of the S-box;
[0020] Each group of power consumption traces corresponding to each group of random plaintext in step 1 is defined as:
[0021] Each group of power consumption traces corresponding to the i-th group of random plaintext is specifically defined as follows:
[0022]
[0023] in, It represents the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the corresponding plaintext byte value is p j ;
[0024] Since there is only one key for encrypting each set of random plaintext, it can be expressed as The number of plaintext and key bytes N1 is determined by the corresponding encryption algorithm;
[0025] Preferably, the step 2 performs a correlation enhanced collision attack on the random plaintext and the power consumption trace, specifically as follows:
[0026]
[0027] That is, if the plaintext two-byte XOR value is equal to the corresponding key two-byte XOR value, the pairwise XOR value of the key bytes is the collision between the two key bytes, then the pairwise XOR value of the plaintext bytes is obtained, that is, the probability ranking of the pairwise key byte collision value;
[0028] Preferably, the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts is calculated in step 3, and is defined as follows:
[0029]
[0030] in, It indicates the total number of energy traces corresponding to the j-th plaintext byte value m, represents the mean value of all energy traces corresponding to the j-th plaintext byte value m, Indicates the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the plaintext byte value corresponding to the power consumption information is m;
[0031] The sum of the squares of the differences in energy traces between the key bytes in step 3 is as follows:
[0032]
[0033] in, Indicates that when the i-th key byte value collides with the j-th key byte value, their XOR value is δ i,j When , the sum of the squares of the differences in the corresponding energy traces is, Indicates that the collision XOR value of the i-th key byte value and the j-th key byte value is δ i,j The number of energy traces. Indicates that there are 2 8 A finite field of elements, each element can be regarded as an 8-bit binary number, that is, 0-255. i,j Indicates the XOR of the i-th plaintext byte value and the j-th plaintext byte value, and the value is between 0 and 255. is the exclusive OR operator;
[0034] Preferably, the step 4 is as follows:
[0035] In the correct key, let the collision between the i-th key byte value and the j-th key byte value be δ i,j * , perform multiple samplings with replacement for each group of power consumption traces corresponding to each group of random plaintexts obtained in step 1, and calculate the collision δ between the i-th key byte value and the j-th key byte value of multiple correct keys according to the calculation method in step 3 i,j * Next in It means that the value of the j-th plaintext byte is The mean of all corresponding energy traces.
[0036] In theory, Where Q represents the number of samples drawn, σ N By calculating the sample The variance of is obtained. The theoretical distribution of It obeys the chi-square distribution with 256 degrees of freedom, that is,
[0037] First, calculate the 95% left confidence interval of the chi-square distribution, then randomly sample the same number of energy trace samples as before with replacement, and calculate the i,j The value is 0-255 corresponding to And perform hypothesis testing based on the confidence interval. If δ i,j =a, If it falls in the rejection region, it is considered that the probability that the XOR value of the i-th key byte value and the j-th key byte value is a is very small; if Falling into the acceptance domain, the corresponding collision value δ i,j Mark as a collision.
[0038] Preferably, the step 5 is as follows:
[0039] Combined with the probability ranking of the pairwise key byte collision values in the related enhanced collision attack described in step 2 and the result of the hypothesis test described in step 4, the pairwise key byte collision values are rearranged, that is, based on the probability ranking of the pairwise key byte collision values, the values marked as collision in step 4 are moved forward, and the values marked as non-collision are moved backward;
[0040] The genetic algorithm population size is set to n pop , the population initialization operation is to select the top n collision rankings after rearrangement pop collision chains;
[0041] Preferably, the fitness in step 7 is defined as follows:
[0042] The number of collisions in the current individual is determined by the marking result of the collision XOR value through the hypothesis test in step 4, that is, for the collision value in a collision chain, it is determined whether the collision value falls within the rejection domain. If it does not fall within the rejection domain, it is considered that a collision has occurred, and the number of collisions is accumulated as the fitness of the individual.
[0043] The present invention provides a collision attack post-processing system based on a genetic algorithm, which specifically includes:
[0044] A power consumption acquisition module for each group of random plaintexts is used to acquire multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts;
[0045] A possibility ranking calculation module is used to perform correlation enhanced collision attacks on random plaintext and power consumption traces to obtain the possibility ranking of collision values of key bytes between two of them;
[0046] The energy trace difference square calculation module calculates the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculates the sum of the difference squares of the energy traces between any two key bytes;
[0047] A collision value confirmation module, used for confirming the collision value between two key bytes according to the theoretical distribution of the sum of squares of the difference of energy traces between two key bytes;
[0048] A collision value moving module is used to rearrange the collision values of key bytes in pairs, move the values marked as collisions in step 4 forward, and move the values marked as non-collision backward;
[0049] The genetic algorithm initialization module is used to input the initial population into the genetic algorithm framework for evolution. Each evolution performs selection, crossover and mutation operations.
[0050] The iterative output module is used to end the genetic algorithm when the evolutionary generation reaches a threshold or the correct collision chain is found, and output the individual with the highest current fitness as the result.
[0051] The advantages of the present invention are high attack efficiency. The post-processing process of the collision attack is optimized by a genetic algorithm, which significantly improves the evaluation and selection speed of key candidates and reduces the attack time. The adaptive evolution, selection, crossover and mutation operations of the genetic algorithm framework enable the algorithm to adaptively find the optimal solution and improve the ability to handle complex scenarios. The system is strong. The present invention provides a systematic genetic algorithm processing framework that integrates random plaintext generation, power consumption analysis, collision value rearrangement and key candidate search, which is convenient for practical application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 : Flow chart of the method of an embodiment of the present invention.
[0053] Figure 2 : A schematic diagram of the selection operation of an embodiment of the present invention.
[0054] Figure 3 : A schematic diagram of the crossover operation of an embodiment of the present invention.
[0055] Figure 4 : Schematic diagram of the variation operation of an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 are within the scope of protection of the present invention.
[0057] In specific implementation, the method proposed in the technical solution of the present invention can be implemented by technical personnel in this field using computer software technology to realize automatic operation process. System devices for implementing the method, such as computer-readable storage media storing the corresponding computer program of the technical solution of the present invention and computer equipment running the corresponding computer program, should also be within the scope of protection of the present invention.
[0058] The following is combined with Figure 1-4 The specific implementation of the present invention is a collision attack post-processing method and system based on genetic algorithm, which is as follows:
[0059] The specific implementation of the method of the present invention is a collision attack post-processing method based on a genetic algorithm, such as Figure 1 As shown, specifically including:
[0060] Step 1: Obtain multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts;
[0061] Each group of random plaintext in step 1 is defined as follows:
[0062]
[0063] Among them, P i Represents the i-th group of random plaintext in the data set. One group of random plaintext contains N1 bytes. Here we take the AES-128 algorithm as an example, where N1 = 16;
[0064] Each group of power consumption traces corresponding to each group of random plaintexts in step 1 is composed of multiple power consumption information;
[0065] The number of midpoints of each power consumption trace corresponding to each group of random plaintext in step 1 is consistent with the number N of S-boxes used in the encryption algorithm. Each data represents the first round of execution of the S-box. Here we take the AES-128 algorithm as an example, N=16;
[0066] Each group of power consumption traces corresponding to each group of random plaintext in step 1 is defined as:
[0067] Each group of power consumption traces corresponding to the i-th group of random plaintext is specifically defined as follows:
[0068]
[0069] in, It represents the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the corresponding plaintext byte value is p j , where p j The value is an integer between 0 and 255;
[0070] Since there is only one key for encrypting each set of random plaintext, it can be expressed as The number of plaintext and key bytes N1 is determined by the corresponding encryption algorithm. Here we take the AES-128 algorithm as an example, N1 = 16;
[0071] Step 2: Perform a correlation enhanced collision attack on the random plaintext and the power consumption trace to obtain the probability ranking of the collision values of the key bytes between each pair;
[0072] The random plaintext and power consumption trace are subjected to a correlation enhanced collision attack as described in step 2, as follows:
[0073]
[0074] That is, if the plaintext two-byte XOR value is equal to the corresponding key two-byte XOR value, the pairwise XOR value of the key bytes is the collision between the two key bytes, then the pairwise XOR value of the plaintext bytes is obtained, that is, the probability ranking of the pairwise key byte collision value;
[0075] Step 3: Calculate the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculate the sum of the squares of the differences between the energy traces of each pair of key bytes;
[0076] Step 3 calculates the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, which is defined as follows:
[0077]
[0078] in, It indicates the total number of energy traces corresponding to the j-th plaintext byte value m, represents the mean value of all energy traces corresponding to the j-th plaintext byte value m, Indicates the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the plaintext byte value corresponding to the power consumption information is m;
[0079] The sum of the squares of the differences in energy traces between the key bytes in step 3 is as follows:
[0080]
[0081] in, Indicates that when the i-th key byte value collides with the j-th key byte value, their XOR value is δ i,j When , the sum of the squares of the differences in the corresponding energy traces is, Indicates that the collision XOR value of the i-th key byte value and the j-th key byte value is δ i,j The number of energy traces. Indicates that there are 2 8 A finite field of elements, each element can be regarded as an 8-bit binary number, that is, 0-255. i,j Indicates the XOR of the i-th plaintext byte value and the j-th plaintext byte value, and the value is between 0 and 255. is the exclusive OR operator;
[0082] Step 4: Based on the sum of the squares of the energy trace differences between the two key bytes Theoretical distribution of,confirm collision value between two key bytes;
[0083] The step 4 is specifically as follows:
[0084] In the correct key, let the collision between the i-th key byte value and the j-th key byte value be δ i,j * , perform multiple samplings with replacement for each group of power consumption traces corresponding to each group of random plaintexts obtained in step 1, and calculate the collision δ between the i-th key byte value and the j-th key byte value of multiple correct keys according to the calculation method in step 3 i,j * Next in It means that the value of the j-th plaintext byte is The mean of all corresponding energy traces.
[0085] In theory, Where Q represents the number of samples drawn, σ N By calculating the sample The variance of is obtained. The theoretical distribution of It obeys the chi-square distribution with 256 degrees of freedom, that is,
[0086] First, calculate the 95% left confidence interval of the chi-square distribution, then randomly sample the same number of energy trace samples as before with replacement, and calculate the i,j The value is 0-255 corresponding to And perform hypothesis testing based on the confidence interval. If δ i,j =a, If it falls in the rejection region, it is considered that the probability that the XOR value of the i-th key byte value and the j-th key byte value is a is very small; if Falling into the acceptance domain, the corresponding collision value δ i,j Mark as a collision.
[0087] Step 5: Rearrange the collision values of the key bytes in pairs, move the values marked as collision in step 4 forward, and move the values marked as non-collision backward;
[0088] Described step 5 is specifically as follows:
[0089] Combined with the probability ranking of the pairwise key byte collision values in the related enhanced collision attack described in step 2 and the result of the hypothesis test described in step 4, the pairwise key byte collision values are rearranged, that is, based on the probability ranking of the pairwise key byte collision values, the values marked as collision in step 4 are moved forward, and the values marked as non-collision are moved backward;
[0090] The genetic algorithm population size is set to n pop , in this case n pop =50, the initialization population operation is to select the top n collision rankings after rearrangement pop collision chains;
[0091] Step 6: Input the initial population into the genetic algorithm framework for evolution. Each evolution implements selection, crossover and mutation operations. The selection, crossover and mutation processes are as follows: Figure 2 , 3 , as shown in 4;
[0092] Step 7: When the evolutionary generation reaches the threshold or the correct collision chain is found, the genetic algorithm ends and the individual with the highest current fitness is output as the result;
[0093] The fitness described in step 7 is defined as follows:
[0094] The number of collisions in the current individual is determined by the marking result of the collision XOR value through the hypothesis test in step 4, that is, for the collision value in a collision chain, it is determined whether the collision value falls within the rejection domain. If it does not fall within the rejection domain, it is considered that a collision has occurred, and the number of collisions is accumulated as the fitness of the individual.
[0095] The specific implementation of the system of the present invention is a collision attack post-processing system based on a genetic algorithm, which specifically includes:
[0096] A power consumption acquisition module for each group of random plaintexts is used to acquire multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts;
[0097] A possibility ranking calculation module is used to perform correlation enhanced collision attacks on random plaintext and power consumption traces to obtain the possibility ranking of collision values of key bytes between two of them;
[0098] The energy trace difference square calculation module calculates the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculates the sum of the difference squares of the energy traces between any two key bytes;
[0099] A collision value confirmation module, used for confirming the collision value between two key bytes according to the theoretical distribution of the sum of squares of the difference of energy traces between two key bytes;
[0100] A collision value moving module is used to rearrange the collision values of key bytes in pairs, move the values marked as collisions in step 4 forward, and move the values marked as non-collision backward;
[0101] The genetic algorithm initialization module is used to input the initial population into the genetic algorithm framework for evolution. Each evolution performs selection, crossover and mutation operations.
[0102] The iterative output module is used to end the genetic algorithm when the evolutionary generation reaches a threshold or the correct collision chain is found, and output the individual with the highest current fitness as the result.
[0103] The table shows the results of running the genetic algorithm framework proposed in the present invention on different data sets, and the table shows the time required for 100 generations of evolution and the success rate of recovering the correct key:
[0104] Table 1: Comparison of genetic algorithm experimental results
[0105]
[0106] It can be seen from the experimental results that the framework proposed by the present invention runs fast, generally evolving 100 generations within 1 second, and has a high key recovery success rate of over 90%.
[0107] It should be understood that parts not elaborated in detail in this specification belong to the prior art.
[0108] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.
Claims
1. A collision attack post-processing method based on genetic algorithm, characterized in that: The following steps are involved: Step 1: Obtain multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts; Step 2: Perform a correlation enhanced collision attack on the random plaintext and the power consumption trace to obtain the probability ranking of the collision values of the key bytes between each pair; Step 3: Calculate the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculate the sum of the squares of the differences between the energy traces of each pair of key bytes; Step 4: Based on the sum of the squares of the energy trace differences between the two key bytes Theoretical distribution of,confirm collision value between two key bytes; Step 5: Rearrange the collision values of key bytes in pairs, move the values marked as collision in step 4 forward, and move the values marked as non-collision backward; Step 6: Input the initial population into the genetic algorithm framework for evolution, and perform selection, crossover and mutation operations in each evolution; Step 7: When the evolutionary generation reaches the threshold or the correct collision chain is found, the genetic algorithm ends and the individual with the highest current fitness is output as the result.
2. The collision attack post-processing method based on genetic algorithm according to claim 1 is characterized in that: Each group of random plaintext in step 1 is defined as follows: Among them, P i Indicates the i-th group of random plaintext in the data set. One group of random plaintext contains N1 bytes. Each group of power consumption traces corresponding to each group of random plaintexts in step 1 is composed of multiple power consumption information; The number of midpoints of each group of power consumption traces corresponding to each group of random plaintexts in step 1 is consistent with the number N of S-boxes used in the encryption algorithm, and each data represents the first round execution process of the S-box; Each group of power consumption traces corresponding to each group of random plaintext in step 1 is defined as: Each group of power consumption traces corresponding to the i-th group of random plaintext is specifically defined as follows: in, It represents the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the corresponding plaintext byte value is p j ; Since there is only one key for encrypting each set of random plaintext, it can be expressed as The number of plaintext and key bytes N1 is determined by the corresponding encryption algorithm.
3. The collision attack post-processing method based on genetic algorithm according to claim 2 is characterized in that: The random plaintext and power consumption trace are subjected to a correlation enhanced collision attack as described in step 2, as follows: That is, the XOR value of two bytes of plaintext is equal to the XOR value of the corresponding two bytes of the key, and the XOR value of each pair of key bytes is the collision between the two key bytes. Then the XOR value of each pair of plaintext bytes is obtained, which is the possibility ranking of the collision value of each pair of key bytes.
4. The post-processing method for collision attack based on genetic algorithm according to claim 3 is characterized in that: Step 3 calculates the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, which is defined as follows: in, It indicates the total number of energy traces corresponding to the j-th plaintext byte value m, represents the mean value of all energy traces corresponding to the j-th plaintext byte value m, Indicates the jth power consumption information in each group of power consumption traces corresponding to the i-th group of random plaintext, and the plaintext byte value corresponding to the power consumption information is m; The sum of the squares of the differences in energy traces between the key bytes in step 3 is as follows: in, Indicates that when the i-th key byte value collides with the j-th key byte value, their XOR value is δ i,j When , the sum of the squares of the differences in the corresponding energy traces is, Indicates that the collision XOR value of the i-th key byte value and the j-th key byte value is δ i,j The number of energy traces; Indicates that there are 2 8 The finite field of elements, each element can be regarded as an 8-bit binary number, that is, 0-255; i,j Indicates the XOR of the i-th plaintext byte value and the j-th plaintext byte value, and the value is between 0 and 255. Is the exclusive OR operator.
5. The post-processing method for collision attack based on genetic algorithm according to claim 4 is characterized in that: The step 4 is specifically as follows: In the correct key, let the collision between the i-th key byte value and the j-th key byte value be For each group of power consumption traces corresponding to each group of random plaintexts obtained in step 1, multiple samplings are performed with replacement, and according to the calculation method in step 3, the collision δ between the i-th key byte value and the j-th key byte value of multiple correct keys is calculated. i,j * Next in It means that the value of the j-th plaintext byte is The mean of all corresponding energy traces; In theory, Where Q represents the number of samples drawn, σ N By calculating the sample The variance of The theoretical distribution of It obeys the chi-square distribution with 256 degrees of freedom, that is, First, calculate the 95% left confidence interval of the chi-square distribution, then randomly sample the same number of energy trace samples as before with replacement, and calculate the i,j The value is 0-255 corresponding to And perform hypothesis testing based on the confidence interval. If δ i,j =a, If it falls in the rejection region, it is considered that the probability that the XOR value of the i-th key byte value and the j-th key byte value is a is very small; if Falling into the acceptance domain, the corresponding collision value δ i,j Mark as a collision.
6. The post-processing method for collision attack based on genetic algorithm according to claim 5, characterized in that: Described step 5 is specifically as follows: Combined with the probability ranking of the pairwise key byte collision values in the related enhanced collision attack described in step 2 and the result of the hypothesis test described in step 4, the pairwise key byte collision values are rearranged, that is, based on the probability ranking of the pairwise key byte collision values, the values marked as collision in step 4 are moved forward, and the values marked as non-collision are moved backward; The genetic algorithm population size is set to n pop , the population initialization operation is to select the top n collision rankings after rearrangement pop Collision chain.
7. The post-processing method for collision attack based on genetic algorithm according to claim 6 is characterized in that: The fitness described in step 7 is defined as follows: The number of collisions in the current individual is determined by the marking result of the collision XOR value through the hypothesis test in step 4, that is, for the collision value in a collision chain, it is determined whether the collision value falls within the rejection domain. If it does not fall within the rejection domain, it is considered that a collision has occurred, and the number of collisions is accumulated as the fitness of the individual.
8. A collision attack post-processing system based on genetic algorithm, characterized in that: include: A power consumption acquisition module for each group of random plaintexts is used to acquire multiple groups of random plaintexts, and encrypt each group of random plaintexts through a cryptographic algorithm to obtain each group of power consumption traces of each group of random plaintexts; A possibility ranking calculation module is used to perform correlation enhanced collision attacks on random plaintext and power consumption traces to obtain the possibility ranking of collision values of key bytes between two of them; The energy trace difference square calculation module calculates the average value of the energy trace of each group of power consumption traces corresponding to each group of random plaintexts, and calculates the sum of the difference squares of the energy traces between any two key bytes; A collision value confirmation module, used for confirming the collision value between two key bytes according to the theoretical distribution of the sum of squares of the difference of energy traces between two key bytes; A collision value moving module is used to rearrange the collision values of key bytes in pairs, move the values marked as collisions in step 4 forward, and move the values marked as non-collision backward; The genetic algorithm initialization module is used to input the initial population into the genetic algorithm framework for evolution. Each evolution performs selection, crossover and mutation operations. The iterative output module is used to end the genetic algorithm when the evolutionary generation reaches a threshold or the correct collision chain is found, and output the individual with the highest current fitness as the result.
Citation Information
Patent Citations
Correlation enhanced collision energy attack method based on genetic algorithm
CN114389789A
Power consumption side channel analysis method and system based on cryptographic algorithm collision attack
CN118631419A
Secure hash operations in a trusted execution environment
EP3506561A1