Password side channel analysis method for bit slice structure mask multiplexing
By applying a genetic algorithm in the bit slice structure combined with first-order mask multiplexing, the key recovery problem of cryptographic algorithms that are not suitable for bit slice technology in the prior art is solved, and an efficient key recovery effect is achieved.
Patent Information
- Application Number
- CN202510282480.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-06
AI Technical Summary
The existing side channel analysis method based on genetic algorithms is not suitable for cryptographic algorithms that use bit slice technology, especially those lightweight cryptographic algorithms that use first-order masks to multiplex bytes and logical operations.
A cryptographic channel analysis method for bit slice structure mask multiplexing is proposed. A genetic algorithm is used to combine the second-order leakage generated by first-order mask multiplexing to construct the corresponding formula of the intermediate value of the cryptographic algorithm and the leakage waveform, and key recovery is carried out through the genetic algorithm.
Under the byte multiplexing first-order mask protection scheme implemented by logical operations, the key can be recovered efficiently, the experimental success rate is higher than that of the second-order CPA, and the key recovery accuracy rate under Gaussian noise conditions reaches more than 60%.
Smart Images

Figure CN120110659A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cryptographic side channel analysis method for bit slice structure mask multiplexing, and in particular to a bit slice technology lightweight cryptographic algorithm using first-order mask multiplexing and a genetic algorithm side channel analysis method, belonging to the field of information security cryptographic technology. Background Art
[0002] With the development of IoT applications, IoT devices are deployed in large numbers in actual production and life scenarios. As IoT devices are challenged by limited computing resources, lightweight cryptographic algorithms are designed to solve problems in this field. At the same time, the nonlinear operations of cryptographic algorithms often require the storage of pre-calculated lookup tables in the device memory to accelerate implementation. To solve the problem of insufficient memory resources, logical operations are used to implement the nonlinear layer of cryptographic algorithms to reduce the occupancy of memory resources.
[0003] In 1996, Kocher et al. proposed the side channel analysis technology, which uses the energy side information leaked by the device to build a corresponding relationship with the intermediate value bits of the cryptographic algorithm to recover the key of the cryptographic algorithm being executed. Brier et al. improved the key recovery method based on differential energy analysis and combined the Hamming weight model, constructed the correlation relationship between the Hamming weight model of the intermediate value and the leaked energy side information, and proposed the Correlation Power Analysis (CPA), which improved the key recovery efficiency.
[0004] In 2006, Herbst et al. proposed a first-order masking scheme to protect the intermediate value side information during the execution of the cryptographic algorithm to counter the correlation energy analysis method. In the masking scheme, in order to balance the additional computing cost and security, Herbst et al. designed a masking scheme in the form of first-order mask byte reuse for each byte of the Advanced Encryption Standard (AES). This classic scheme has also been used as a design template by later generations and is the most commonly used protection method for the implementation of cryptographic products.
[0005] The National Institute of Standards and Technology of the United States announced that the cryptographic algorithm ASCON has been established as a lightweight encryption algorithm standard. ASCON uses a bit slicing technology different from AES to perform nonlinear operations. In order to reduce memory resource usage, IoT devices using this algorithm often use logical operations for nonlinear calculations rather than the traditional pre-calculated lookup table implementation method.
[0006] As an artificial intelligence method, heuristic algorithm can significantly reduce the complexity of search space. Genetic algorithm is a heuristic search algorithm. Inspired by the idea of "evolution" in the biological world, it simulates the evolution process of species to find the optimal solution to the problem, and has a good effect in performing key recovery search. In 2015, Zhang et al. proposed a correlation energy analysis method based on genetic algorithm to analyze the parallel implementation of DES (Data Encryption Standard) algorithm, and recovered the complete key with less energy waveform than traditional CPA, which significantly improved the analysis efficiency.
[0007] Current cryptographic algorithms all incorporate protection countermeasures during the design of physical implementations. Bit slicing technology is currently the mainstream technology for lightweight cryptographic algorithms and is widely used. However, the existing genetic algorithm-based side channel analysis is not applicable to any protection countermeasures or any cryptographic algorithm that uses bit slicing technology. Summary of the invention
[0008] The purpose of the present invention is to propose a side channel analysis method based on a genetic algorithm for a cryptographic algorithm that uses bit slicing technology. Under the premise that the first-order mask is multiplexed by byte and the non-linear layer is implemented using logical operations, the method can break the protection of the first-order mask and efficiently recover the key.
[0009] The present invention is implemented by adopting the following technical solutions.
[0010] A cryptographic side channel analysis method for bit slice structure mask multiplexing, comprising the following steps:
[0011] Step 1: For the first-order mask protection scheme implemented by logical operations, determine the second-order leakage caused by mask multiplexing in the case of parallel implementation, and construct the corresponding formula between the intermediate value of the cryptographic algorithm and the leakage waveform for the second-order leakage;
[0012] Step 2: For the generated second-order leakage, extract the byte multiplexing bits and construct a calculation formula for their deviation from the typical value;
[0013] Step 3: Construct a genetic algorithm fitness calculation formula for the algorithm intermediate value offset;
[0014] Step 4: Use genetic algorithm combined with the formulas in steps 2 and 3 to recover the key.
[0015] Beneficial Effects
[0016] 1. The present invention targets the energy traces generated by the byte-reuse first-order mask implemented by logical operations, and can use a genetic algorithm to break through the mask protection and realize efficient key recovery; under the experimental conditions of realizing a 64-bit serial storage Hamming weight simulation wave with 3000 plaintext parallel logical operations with a Gaussian noise standard deviation of 1, 100 experiments were conducted, and the experimental success rate of successful complete key recovery was 59%. For experiments in which the key could not be completely recovered, the correct rate of key recovery reached more than 60% when the iteration limit was reached.
[0017] 2. Compared with the second-order CPA, the present invention has a higher complete key recovery success rate than the second-order CPA under the same number of waveforms and the same noise standard deviation. The second-order CPA complete key recovery success rate is only 31%. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of the method of the present invention;
[0019] Figure 2 It is a logical operation schematic diagram of an embodiment of the method of the present invention;
[0020] Figure 3 Schematic diagram of mask multiplexing in an embodiment of the method of the present invention;
[0021] Figure 4 It is a specific bit extraction method of a specific byte in an embodiment of the method of the present invention;
[0022] Figure 5 Schematic diagram of calculating the fitness of a specific bit extracted in an embodiment of the method of the present invention; DETAILED DESCRIPTION
[0023] The detailed steps of the method of the present invention are described below in conjunction with the accompanying drawings and embodiments.
[0024] Example
[0025] Taking the ASCON algorithm as an example, the energy consumption generated by the first round of nonlinear layer register flipping in the initialization phase of its operation is simulated, and the method of the present invention is used to recover the key on the simulated energy trace. The nonlinear layer of the ASCON algorithm is implemented in a logical operation mode, and the first-order Boolean mask is multiplexed in byte form in each 64-bit wide register to reduce the computational overhead in the overall encryption process. The simulated energy consumption is taken as an example of the Hamming weight model of the five 64-bit wide registers of the ASCON algorithm and the Gaussian noise standard deviation of 1.
[0026] like Figure 1 As shown, a cryptographic algorithm side channel analysis method based on a genetic algorithm comprises the following steps:
[0027] Step 1: For the first-order mask protection scheme implemented by logical operations, determine the second-order leakage caused by mask multiplexing in the case of parallel implementation, and construct the corresponding formula between the intermediate value of the cryptographic algorithm and the leakage waveform for the second-order leakage;
[0028] Specifically, the first-order mask protection scheme adopts a byte-by-byte multiplexing protection scheme within each register, such as Figure 2 , Figure 3 As shown, each 64-bit wide register uses byte multiplexing for Boolean masking. Logical operation implementation refers to the parallel implementation of the cryptographic algorithm nonlinear layer using logical operations. After implementation, the Boolean mask is changed compared to the nonlinear layer, but the byte multiplexing form is not affected. Second-order leakage refers to the correlation between the bits of each register byte and byte due to mask multiplexing and the intermediate value without mask protection;
[0029] Step 2: For the generated second-order leakage, extract the byte multiplexing bits and construct a calculation formula for their deviation from the typical value;
[0030] Specifically, if Figure 4 As shown, the extraction method calculates the 8 bits of each byte separately, and extracts the corresponding bit of each byte, such as the first bit of each byte; since the first-order mask is implemented in the form of byte multiplexing, there are only two possibilities for the mask of the same bit of each byte, "1" and "0", and the "1" mask is used to perform an XOR operation with the algorithm intermediate value, that is, the algorithm intermediate value is inverted, and the "0" mask is used to perform an XOR operation with the algorithm intermediate value, that is, the algorithm intermediate value is kept unchanged. In these two cases, the Hamming distance between the algorithm intermediate value and the typical value of the Hamming weight of the corresponding bit number is the same, that is, the offset from the typical value is the same, so the influence of the first-order mask can be ignored; the typical value of the Hamming weight of the corresponding bit number refers to, for example, the typical value of the Hamming weight of 8 bits is 4, and the typical value is the maximum probability of the Hamming weight distribution of the corresponding bit number;
[0031] Step 3: Construct the genetic algorithm fitness calculation formula for the algorithm intermediate value offset: Where HW(y i ) refers to taking out the specific i-th bit of each byte and calculating the Hamming weight, HW(y i * ) refers to the typical value of the corresponding Hamming weight; T refers to the leakage position of the register of the target device in the energy trace, Refers to the average value of the leakage position of multiple energy traces; since the nonlinear layer of the cryptographic algorithm adopts bit slicing technology, there is no logical operation relationship between the value of the i-th bit and the remaining bits, so the offsets of all specific bits can be accumulated. The accumulation of the offsets is correlated with the leakage waveform, and this correlation coefficient is used as the fitness in the genetic algorithm;
[0032] Specifically, if Figure 5 As shown, after extracting the specific bits in step 3, the Hamming weights are accumulated and the correlation coefficients are calculated with the energy consumption simulated by the corresponding registers, and the logarithms of the five correlation coefficients are accumulated as the fitness of the individual sorting in the genetic algorithm.
[0033] Step 4: Use genetic algorithm combined with the formulas in steps 2 and 3 to recover the key;
[0034] Specifically, step 4 includes the following steps:
[0035] Step 4.1: The random number generator randomly generates the initial key, that is, the individuals of the population, and the randomly generated individuals are used as the initial population for evolution;
[0036] Specifically, an individual refers to a complete guessed key; the number of individuals in the initial population is set to 50;
[0037] Step 4.2: Calculate the fitness of individuals in the population;
[0038] Step 4.3: Perform selection, crossover and mutation operations on the individuals in the population to obtain the next generation population;
[0039] Specifically, selection refers to selecting the top 70% of individuals in the population in terms of fitness as parents; the fitness calculation formula refers to step 3;
[0040] Specifically, crossover refers to randomly selecting specific bits of specific bytes of different registers on an individual, exchanging all specific bits of the two guessed keys after the crossover point, and the crossover rate is set to 0.3; specific bytes refer to selecting the same byte of all registers; specific bits refer to the same bit in the same byte;
[0041] Specifically, mutation refers to traversing the specific bits of the specific bytes of the guessed key represented by the individual, selecting the candidate individual with the highest fitness as the mutation result, and setting the mutation rate to 0.1; in this example, the mutation position is each bit of each byte, that is, 64 candidate mutation positions; traversal refers to generating candidate individuals with all possible values of the specific bit position under the premise that the other bits remain the same, calculating their fitness and sorting them;
[0042] Step 4.4: Repeat steps 4.2 to 4.3 until the iteration limit is reached or the correct key is evolved;
[0043] Specifically, the upper limit of iteration is set to 31 generations in this example.
[0044] In this embodiment, 3000 randomly generated simulated energy waveforms are analyzed, wherein the simulated wave uses the Hamming weight of a 64-bit wide register to simulate the energy consumption of the register under the condition that the Gaussian noise standard deviation is 1.0. In 100 experiments, the success rate of complete key recovery is 59%. For experiments in which the key cannot be completely recovered, the correct rate of recovering the key reaches more than 60% when the iteration limit is reached. Under the conditions of the same Gaussian noise standard deviation and the same number of plaintext items, the success rate of complete key recovery of the second-order CPA is only 31%.
Claims
1. A cryptographic side channel analysis method for bit slice structure mask multiplexing, characterized in that: The following steps are involved: Step 1: For the first-order mask protection scheme implemented by logical operations, determine the second-order leakage caused by mask multiplexing in the case of parallel implementation, and construct the corresponding formula between the intermediate value of the cryptographic algorithm and the leakage waveform for the second-order leakage; Among them, the first-order mask protection scheme adopts a byte-by-byte multiplexing protection scheme within each register, and the logic operation implementation refers to the parallel implementation of the non-linear layer of the cryptographic algorithm using logic operations. Second-order leakage refers to the correlation between each register byte and byte bit due to mask multiplexing and the intermediate value without mask protection; Step 2: For the generated second-order leakage, extract the byte multiplexing bits and construct a calculation formula for their deviation from the typical value; The extraction method is to calculate the 8 bits of each byte separately, and extract the corresponding bit of each byte, such as the first bit of each byte; since the first-order mask is implemented in the form of byte multiplexing, there are only two possibilities for the mask of the same bit of each byte, "1" and "0", and the "1" mask is used to perform an XOR operation with the algorithm intermediate value, that is, the algorithm intermediate value is inverted, and the "0" mask is used to perform an XOR operation with the algorithm intermediate value, that is, the algorithm intermediate value is kept unchanged. In these two cases, the Hamming distance between the algorithm intermediate value and the typical value of the Hamming weight of the corresponding bit number is the same, that is, the offset from the typical value is the same, so the influence of the first-order mask can be ignored; the typical value of the Hamming weight of the corresponding bit number refers to, for example, the typical value of the Hamming weight of 8 bits is 4, and the typical value is the maximum probability of the Hamming weight distribution of the corresponding bit number; Step 3: Construct the genetic algorithm fitness calculation formula for the algorithm intermediate value offset: Where HW(y i ) refers to taking out the specific i-th bit of each byte and calculating the Hamming weight, HW(y i * ) refers to the typical value of the corresponding Hamming weight; T refers to the leakage position of the register of the target device in the energy trace, Refers to the average value of the leakage position of multiple energy traces; since the nonlinear layer of the cryptographic algorithm adopts bit slicing technology, there is no logical operation relationship between the value of the i-th bit and the remaining bits, so the offsets of all specific bits can be accumulated. The accumulation of the offsets is correlated with the leakage waveform, and this correlation coefficient is used as the fitness in the genetic algorithm; Step 4: Use genetic algorithm combined with the formulas in steps 2 and 3 to recover the key.
2. The heuristic side channel analysis method for lightweight cryptographic algorithms using logical operations to implement bit slicing technology as described in claim 1, characterized in that: Step 4 includes the following steps: Step 4.1: The random number generator randomly generates the initial key, that is, the individuals of the population, and the randomly generated individuals are used as the initial population for evolution; Here, individual refers to a complete guess key; Step 4.2: Calculate the fitness of individuals in the population; Step 4.3: Perform selection, crossover and mutation operations on the individuals in the population to obtain the next generation population; Among them, selection refers to selecting the top 70% of individuals in the population as parents; the fitness calculation formula refers to step 3; Among them, crossover refers to randomly selecting specific bits of specific bytes of different registers on an individual, and exchanging all specific bits of the two guessed keys after the crossover point; specific bytes refer to selecting the same byte of all registers; specific bits refer to the same bit in the same byte; Among them, mutation refers to traversing the specific bits of the specific bytes of the guessed key represented by the individual, and selecting the candidate individual with the highest fitness as the mutation result; traversal refers to generating candidate individuals with all possible values of the specific bit under the premise that the other bits remain the same, calculating their fitness and sorting them; Step 4.3: Repeat steps 4.2 to 4.2 until the iteration limit is reached or the correct key is evolved.
