A side channel analysis method for sparse polynomial multiplication in LAC scheme
By collecting and analyzing power consumption information in the LAC scheme, combining Hanming weight model and CPA/DPA analysis, the problem of low channel analysis efficiency and success rate on the sparse polynomial multiplication side is solved, and efficient key information acquisition is achieved, which improves the Analytical efficiency.
Patent Information
- Application Number
- CN202210159148.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-02-21
AI Technical Summary
The prior art has low efficiency and success rate of side channel analysis of sparse polynomial multiplication in the post-quantum cryptographic algorithm LAC scheme, making it difficult to effectively resist the attacks of quantum computers.
A side channel analysis method for sparse polynomial multiplication in the LAC scheme is proposed. By randomly generating ciphertexts, collecting power consumption information, coarse positioning and sharding of leakage points, combining Hanming weight model and CPA/DPA analysis, it reduces guess space. Improve analysis efficiency.
It realizes efficient and fast energy trace information analysis, can accurately obtain the secret key information of the cryptographic algorithm, and the packet-side channel analysis technology is easy to implement, significantly improving the analysis efficiency.
Smart Images

Figure CN114614966B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cyberspace security in the field of computers, and specifically is a side channel analysis method of sparse polynomial multiplication in a LAC scheme. Background Art
[0002] Since it was proposed in 1999, side-channel analysis (SCA) has become one of the serious threats to the security of cryptographic devices. Side-channel analysis recovers key information or encrypted information in cryptographic devices by using physical information such as power consumption, electromagnetics, and time leaked by cryptographic chips during operation.
[0003] In cryptographic devices, cryptographic algorithms are the core tools for protecting encrypted information. However, with the introduction of Shor's algorithm, the mathematical problems (discrete logarithm calculation problems and large integer decomposition problems) based on traditional public key cryptographic algorithms such as ECC and RSA will be broken. Therefore, after the advent of quantum computers, traditional public key cryptography will be seriously threatened. In order to achieve data security in the quantum era, post-quantum cryptography (PQC) has also been called for and has become the hottest research hotspot at present. Based on the selected mathematical problems, post-quantum cryptography can theoretically resist not only classical computer attacks but also quantum computer attacks. At present, post-quantum cryptography is mainly divided into the following categories: lattice-based PQC (abbreviated as "lattice cryptography"), coding-based PQC, multivariate-based PQC, and supersingular homology-based PQC. Among all types of post-quantum cryptography, the number of lattice-based PQC is the largest in the current NIST post-quantum cryptography standardization campaign, and the performance is also good. Therefore, lattice cryptography is the most promising standard for the next generation of public key cryptographic algorithms (that is, the most promising standard for post-quantum cryptographic algorithms).
[0004] LAC is a post-quantum cryptography based on Ring-LWE (that is, based on the ring fault-tolerant learning problem). It was independently designed by Lu Xianhui's team at the Chinese Academy of Sciences and was shortlisted for the second round of evaluation of the NIST post-quantum cryptography standardization campaign. The LAC scheme uses a smaller modulus, which gives the LAC scheme good performance.
[0005] In the LAC scheme, sparse polynomial multiplication is one of its most important core subroutines and one of the modules with the largest amount of computation in the algorithm. The coefficients of the key polynomial in the LAC scheme obey the central binomial distribution and the value range is {-1,0,1}. However, in the LAC scheme, in order to improve the performance and security of polynomial multiplication, its key polynomial adopts coordinate representation. The first part of the key polynomial is the coordinate with a value of 1, and the second part represents the coordinate with a value of -1. The value of 0 does not need to be saved in the key polynomial. Therefore, the sparse polynomial multiplication of LAC is a constant-time sparse polynomial multiplication, and it is also a variant of the ordinary sparse polynomial multiplication. This variant cancels the judgment of which value of the coefficient is {-1,0,1} in the original sparse polynomial multiplication, which not only improves the computational performance, but also enables the sparse polynomial multiplication in the LAC to be implemented in constant time.
[0006] In 2018, Aysu A, Tobah Y et al. proposed the application of horizontal differential power analysis (HDPA) in two lattice cryptographic schemes (Frodo and Newhope) in the paper Horizontal side-channel vulnerabilities of post-quantum key exchange protocols published in the 2018 IEEE International Symposium on Hardware Oriented Security and Trust (HOST). However, although this scheme can analyze the key parameters of the Kyber and Newhope lattice ciphers, the analysis success rate of this analysis method is low and the efficiency is also very low. Summary of the invention
[0007] Purpose of the invention: In view of the defects of the prior art, in order to effectively solve the technical problems of the side channel technology of the post-quantum cryptographic algorithm and achieve the technical effect of improving the efficiency and success rate of side channel analysis, a high-efficiency side channel analysis method for sparse polynomial multiplication in LAC is creatively proposed.
[0008] Technical solution: The present invention is implemented by the following technical solution. A side channel analysis method of sparse polynomial multiplication in a LAC scheme comprises the following steps:
[0009] 1. Generate ciphertext randomly and perform decryption operation of LAC algorithm. Regardless of whether the decryption is successful, collect power consumption information on the cryptographic device as the raw data for analysis.
[0010] 2. For the power consumption data collected by the LAC algorithm, the leakage points are roughly located and sliced. In the outer loop power consumption part of the LAC sparse polynomial multiplication, it is directly divided into uniform partitions, and each area represents 2 key bits (the key bits are 1 and -1 coordinates). In the inner loop power consumption part, uniform cutting is also directly performed, and each slice area after cutting represents a leakage point. The interval between each leakage point is set to Step, then the power consumption points with an interval of Step points can be grouped together to form a power consumption leakage matrix, recorded as the matrix Where n is the number of curves and L is the number of leakage points. Since our interval is Step, there are Step power leakage matrices.
[0011] 3. Analyze all the leakage points in the LAC sparse polynomial multiplication to obtain the best key. Each outer loop of the sparse polynomial multiplication in LAC contains two inner loops. The first inner loop represents the operation of the coordinates with the key bit of 1, and the second inner loop represents the operation of the coordinates with the key bit of -1. Each inner loop contains multiple operations involving the same key bit in succession. The operations of each inner loop (a total of L) are combined as a leakage point of a key bit. Take sum1[j] as the intermediate value and use the Hamming weight model to take its Hamming weight, which is recorded as the Hamming matrix There are K Hamming matrices in total (K represents the number of possible keys), each Hamming matrix has n curves and L leakage points (the number of leakage points is equal to the number of intermediate values of the HW matrix). Combine all Hamming matrices HW and power leakage matrix T to perform CPA / DPA analysis to obtain the best guess key.
[0012] 4. Group all the key spaces that need to be guessed, and use parameters to control the number of groups. Then take one of the groups as a representative for analysis to obtain the best group, and finally obtain the correct key by traversing all possible key spaces of the best group. Therefore, this method can reduce a lot of guessing space and improve analysis efficiency.
[0013] The beneficial effects of the present invention are: compared with the general horizontal analysis method, the present method can efficiently and quickly analyze the energy trace information to obtain the secret key information of the analyzed cryptographic algorithm, and the adjustable parameter group side channel analysis technology is not only easy to implement, but also can reduce a lot of guessing space and improve analysis efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is the description of the sparse polynomial multiplication algorithm in LAC;
[0015] Figure 2 It is a flow chart of a side channel analysis method for sparse polynomial multiplication in LAC;
[0016] Figure 3 This is a schematic diagram of uniform sharding of the outer loop of sparse polynomial multiplication;
[0017] Figure 4 This is a schematic diagram of the leakage point area of the single-byte key. DETAILED DESCRIPTION
[0018] The following is a detailed description of the workflow of the side channel analysis method of sparse polynomial multiplication in a LAC scheme of the present invention in conjunction with the accompanying drawings. We take the analysis of the LAC cryptographic algorithm on the ARM platform as an example.
[0019] Step 1: We burn the LAC decryption algorithm into the cryptographic chip. The sparse polynomial multiplication in LAC (such as Figure 1 As shown in Figure 1, only part of the entire decryption algorithm is used, and we use ciphertext-independent power consumption acquisition. Therefore, in order to improve the acquisition efficiency, the LAC algorithm can be trimmed (Note: it can also be directly burned without trimming). Figure 2 As shown in the figure, we take the ARM chip as an example and directly burn the LAC algorithm into the ARM chip without cutting it. Then randomly generate ciphertext and send it to the cryptographic device for decryption. During the decryption process, the power consumption / electromagnetic information of sparse polynomial multiplication is collected as the original data for analysis (i.e., power consumption curve. Assuming that there are n power consumption curves here, i.e., randomly input n groups of data, decrypt them, and then record the electromagnetic / power consumption data during the decryption process to form a group of power consumption curves. This group of power consumption curves has a total of n power consumption curves).
[0020] Step 2: Slice the outer loop. The entire sparse polynomial multiplication has multiple outer loops, but the operations performed by each outer loop are the same, so they have the same power consumption / electromagnetic characteristics, and the loops are all implemented in constant time and have repeated similarities. Therefore, the power consumption curve will be cut directly by uniform slicing. Each slice represents an outer loop, and each outer loop contains an operation corresponding to a key bit with a value of 1 and -1. Figure 3 Shown is the outer loop uniform sharding diagram of the sparse polynomial multiplication power consumption curve of the LAC-Light version.
[0021] Step 3: Each outer loop contains two inner loops, and each inner loop represents all operations of a key position. In addition, each inner loop is implemented in constant time and has repeated similarity. Therefore, the leakage point location technology of equal cutting is used to locate the leakage point of key position i. Figure 4 The figure shows a schematic diagram of all leakage points of a certain key position i of the LAC-Light version (a total of 136 leakage points). The interval between each leakage point is set to Step, and the power consumption points with an interval of Step points can be grouped together to form a power consumption leakage matrix, which is recorded as the matrix Since our interval is Step, there are Step power leakage matrices.
[0022] Step 4: According to the LAC decryption algorithm process, with n sets of inputs when collecting the power consumption matrix, calculate the intermediate value variables of all possible keys (that is, there are K sets of intermediate value variables in the end, each set of intermediate value variables has n vectors, corresponding to n power consumption curves, and each vector has L values, corresponding to L leakage points, that is, intermediate values). The intermediate value variable takes the value of Figure 1 In the LAC-Light version, the length of L is 136, so each key bit has 136 intermediate values, corresponding to the 136 leakage points (sum1 or sum2) mentioned above.
[0023] Step 5: Group all possible key spaces. For example, in the LAC-Light version, there are 512 possible keys. Therefore, in order to facilitate grouping, we sort all possible keys and then group them in multiples (Note: the number of groups will affect the analysis efficiency and success rate). For example, in this example, the groups can be divided into 4 / 8 / 16 / 32 / 64 / 128 and other groups, and the number of possible keys contained in each group is 128 / 64 / 32 / 16 / 8 / 4. The grouping can be controlled in the form of parameters.
[0024] Step 6: Get the best grouping by horizontally analyzing LAC. We will select one or two of all groups as representatives of the group to compete for the best grouping. For example, when there are 16 groups in total, each group has 32 possible keys. We can use the 16th key in group 1 as the representative of group 1, and the 48th key in group 2 as the representative of group 2, and so on. Calculate the Hamming weights of all representatives and obtain 16 Hamming matrices. There are n curves and L leakage points. Therefore, all the representative Hamming weight matrices HW and power leakage matrices T are subjected to CPA / DPA calculation to obtain the correlation value of each Hamming matrix with the power leakage matrix, and then the Hamming matrix group corresponding to the highest correlation is obtained by comparing all the correlation values. The group corresponding to the highest correlation is the best group.
[0025] Step 7: Traverse the best group and obtain the correct key information. After obtaining the best group, in order to traverse all possible keys in the group. We first calculate the Hamming matrix HW of each possible key in the group. For example, in the example of 16 groups above, each group has 32 possible keys, so there are 32 Hamming matrices in total. Then perform CPA / DPA calculations on the Hamming matrices HW corresponding to all possible keys and the power leakage matrix T. Similarly, compare the size of the correlation value to obtain the best key, and we believe that the key is the correct key.
[0026] Obviously, the above-mentioned implementation cases of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation methods of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A side channel analysis method for sparse polynomial multiplication in a LAC scheme, characterized in that: The analytical method comprises the following steps: 1) Collect power consumption information on the cryptographic device as raw data for analysis, and draw multiple power consumption curves based on the raw data; 2) Locate the leakage point of the original data in step 1) and obtain the power consumption leakage matrix T; 3) Analyze all the leakage points located in step 2) to obtain the best guess key; 4) Group all the keys that need to be guessed and obtain the best group, and obtain the correct key by traversing all possible keys in the best group; The method for collecting raw data in step 1) includes burning the LAC algorithm into a cryptographic chip, the cryptographic chip randomly generates ciphertext and sends the ciphertext to a cryptographic device for decryption, collecting power consumption information of sparse polynomial multiplication during the decryption process as raw data for analysis, and drawing multiple power consumption curves based on the raw data, wherein the raw data includes an outer loop power consumption part of the LAC sparse polynomial multiplication and an inner loop power consumption part of the LAC sparse polynomial multiplication; In step 2), the outer loop power consumption part of the LAC sparse polynomial multiplication is evenly partitioned according to the step size A, and each partition is an outer loop and represents 2 key bits, namely the key bits with coordinates of 1 and -1. Each outer loop in the LAC sparse polynomial multiplication contains 2 inner loops, the first inner loop represents the operation of the coordinate with the key bit of 1, and the second inner loop represents the operation of the coordinate with the key bit of -1; the inner loop power consumption data of the LAC sparse polynomial multiplication is evenly partitioned according to the step size B, and each partition represents a leakage point, then the total power consumption points of each zone are B; then the power consumption points with an interval of B points are grouped together, then the first power consumption curve is grouped together to form a power consumption leakage vector t 0,0 ,t 0,1 ,…,t 0,L The value of a 0,0 ,a 0,B ,a 0,2B ,…,a 0,(B-1)B , where a 0,(B-1)B Represents the first power consumption point of the last zone. After all power consumption curves are reorganized, a power consumption leakage matrix is formed, which is recorded as matrix Where n is the number of power consumption curves, L is the number of leakage points, t n,L is the power leakage vector of the Lth leakage point of the nth curve, and there are B power leakage matrices T in total; The method for obtaining the best guess key in step 3) is: combine the operations of each inner loop as a leakage point of a key bit. In the coefficient polynomial multiplication of LAC, sum1[j] represents the result of accumulating the corresponding operation of the jth key. All possible keys are calculated. Assuming that there are K possibilities, the sum1[j] value of each possible key is calculated as the intermediate value. The energy conversion of sum1[j] is simulated using the Hamming weight model, that is, the Hamming weight of sum1[j] is calculated, which is recorded as the Hamming matrix Among them hw n,L It represents the value of sum1[L] corresponding to the nth power consumption curve. There are K Hamming matrices in total, each of which represents a possible key, and each Hamming matrix has n power consumption curves and L leakage points. Combine all Hamming matrices HW and power leakage matrix T to perform CPA or DPA related power consumption calculations, and obtain the correlation value of each Hamming matrix with the power leakage matrix T. By comparing the correlation values of each Hamming matrix, the possible key corresponding to the Hamming matrix HW with the highest correlation is obtained, that is, the best guess key is obtained. Step 4) The method for obtaining the correct key is to divide all possible keys K into x groups, the first group is the possible keys from 0 to x-1, the second group is the possible keys from x to 2x-1, each group has y possible keys, where xy=K, and in the x groups, each group selects one or two possible keys as the representative of the group, and competes for the best group, calculates the Hamming weight of all the selected possible keys, and obtains a set of Hamming matrices again There are x Hamming matrices in total, each of which has n curves and L leakage points. The Hamming weight matrices HW and the power leakage matrix T of all selected possible keys are subjected to CPA or DPA calculations. The correlation values are also calculated. The correlation values of all Hamming weight matrices and the power matrix T are compared, and the group corresponding to the Hamming weight matrix with the highest correlation is obtained. The group corresponding to the highest correlation is considered to be the best group. After obtaining the best group, first obtain the Hamming matrix of each possible key in the best group Then, the Hamming matrix HW3 corresponding to all possible keys and the power consumption leakage matrix T are subjected to CPA or DPA calculation to obtain the best key, which is the correct key.
