Side channel attack method and attack system based on manifold learning
Through manifold learning method, the target power consumption trace in side channel attacks is reduced and feature extraction is solved, which solves the problem of high attack complexity under high-order mask protection in the prior art and improves the attack success rate.
Patent Information
- Application Number
- CN202411405521.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-10
AI Technical Summary
The existing side channel attack methods increase exponentially when facing high-order mask-protected cryptographic chips, resulting in increased attack difficulty and time-consuming, and difficult to deal with.
Using a manifold learning method, an explicit mapping relationship function is obtained by portraying an explicit manifold learning model, and the target power consumption trace is dimensionality reduction and feature extraction is performed on the target, instead of complex interest selection, and an attack is constructed through Hanming weight classification. Template to improve attack efficiency.
Reduces the complexity of attack mask-protected password chips, significantly improves the success rate of attacks, and reduces the overhead of the point-of-interest selection process.
Smart Images

Figure CN119299068A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a side channel attack method and an attack system based on manifold learning, belonging to the technical field of chip attack. Background Art
[0002] Side-Channel Attacks is an attack method that uses the physical leakage of cryptographic devices to recover keys. It has the advantages of not relying on algorithm weaknesses and being easy to implement. It has been widely used in attacking various cryptographic implementations.
[0003] The principle of side-channel attack is that the cryptographic chip will leak physical information related to its internal sensitive data when performing cryptographic operations. The attacker extracts the leaked physical quantity in the cryptographic chip circuit and analyzes its change pattern to infer sensitive information such as keys.
[0004] Due to the high threat of side channel attacks, defense technologies such as masking have been proposed. Masking technology introduces random values to cover up the intermediate values of cryptographic algorithms, such as splitting the intermediate variables into multiple random, independent secret factors (shares), thereby eliminating or reducing the dependency between the energy consumption of cryptographic devices and the intermediate values of cryptographic algorithms, significantly increasing the difficulty for attackers to carry out side channel attacks.
[0005] When carrying out side channel attacks on cryptographic chips protected by masks, traditional side channel attack methods need to find the time points when all secret factors are processed, i.e., points of interest, and combine the leakage of these secret factors. The complexity of this traditional method of attacking cryptographic chips protected by masks increases exponentially with the increase of the mask order, and there are problems such as long time consumption and difficulty in processing high-order masks. Summary of the invention
[0006] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a side channel attack method and attack system based on manifold learning. By characterizing an explicit manifold learning model to obtain an explicit mapping relationship function, the target power consumption trace is reduced in dimension and features are extracted, which can replace the complex point of interest selection, and the explicit mapping of manifold learning is used to fit the characterization attack scenario, which reduces the complexity of attacking the masked protected cryptographic chip and greatly improves the success rate of the attack.
[0007] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0008] On the one hand, the present invention discloses a side channel attack method based on manifold learning, comprising the following steps:
[0009] Collecting the target power consumption trace of the target chip when it is running and its corresponding subkey set, as well as the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip;
[0010] According to the clone power consumption trace, an explicit mapping relationship function is obtained by characterizing an explicit manifold learning model, and multiple attack templates are constructed through Hamming weight classification, each attack template corresponds to a Hamming weight;
[0011] For any sub-key, each target power consumption trace is mapped based on the explicit mapping relationship function, and after obtaining the low-dimensional representation of the corresponding target power consumption trace, it is matched with the attack template, and the product of the corresponding probability density values is calculated; the sub-key with the product of the maximum probability density value is taken as the correct key to realize the side channel attack based on manifold learning.
[0012] Furthermore, the expression of the explicit mapping relationship function is as follows:
[0013] ;
[0014] In the formula, A low-dimensional representation representing the target power consumption trace or the clone power consumption trace; represents the polynomial coefficient of the mth low-dimensional representation component under the power index r and the dimension index s, where m represents the dimension of the low-dimensional representation; r represents the power index, R represents the number of power indexes r, that is, the degree of the polynomial; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the target power trace or the cloned power trace; Represents the sth component of the target power trace or clone power trace.
[0015] Furthermore, obtaining the explicit mapping relationship function comprises the following steps:
[0016] Based on the k-NN nearest neighbor strategy, an adjacency graph containing all clone power consumption traces is constructed, and the similarity matrix between clone power consumption traces is calculated;
[0017] Constructing a first optimization problem according to the similarity matrix;
[0018] By introducing a polynomial, the first optimization problem is transformed into a second optimization problem;
[0019] By constructing a Lagrangian function, the second optimization problem is converted into a generalized eigenvalue problem for solution to obtain polynomial coefficients; based on the polynomial coefficients, an explicit mapping relationship function is obtained.
[0020] Furthermore, the expression of the first optimization problem is as follows:
[0021] ;
[0022] Where Y represents the set of low-dimensional representations of cloned power consumption traces, , represents the power consumption trace of the i-th clone The low-dimensional representation of represents the power consumption trace of the jth clone The low-dimensional representation of , m represents the dimension of the low-dimensional representation, and N represents the number of clone power consumption traces;
[0023] tr represents the determinant; L represents the Laplace matrix of the adjacency graph, L=DW, D represents the diagonal matrix, , represents the element in the i-th row and i-th column of the diagonal matrix D, ; W represents the similarity matrix, , Represents the element in the i-th row and j-th column of the similarity matrix W, and the expression is as follows:
[0024] ;
[0025] t represents the hyperparameter used to measure the distance difference; st represents the constraint condition; Represents the identity matrix.
[0026] Furthermore, the expression of the second optimization problem is as follows:
[0027] ;
[0028] In the formula, Represents the vector of polynomial coefficients of the d-th low-dimensional representation component, d=1,2,⋯,m, m represents the dimension of the low-dimensional representation, and the expression is as follows:
[0029] ;
[0030] r represents the power index, R represents the number of power indexes r, that is, the degree of the polynomial; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the cloned power consumption trace;
[0031] represents the set of combination vectors of cloned power consumption traces based on R-th Hadamard product, , N represents the number of cloned power traces, represents the combination vector of the i-th clone power consumption trace based on the R-th Hadamard product, and the expression is as follows:
[0032] ;
[0033] In the formula, represents the Hadamard product; represents the power consumption trace of the i-th clone; represents the polynomial coefficient corresponding to the f-th low-dimensional representation component; represents the Kronecker function, when f=d ,otherwise .
[0034] Further, the obtaining of polynomial coefficients comprises the following steps:
[0035] The second optimization problem is converted into a generalized eigenvalue problem, and the expression of the generalized eigenvalue problem is as follows:
[0036] ;
[0037] In the formula, Represents the combination matrix The generalized eigenvalues of are:
[0038] Solve the generalized eigenvalue problem and combine the matrix The non-zero eigenvalues in the generalized eigenvalues are sorted in ascending order, and the eigenvectors corresponding to the m smallest non-zero eigenvalues are selected as the polynomial coefficients .
[0039] Furthermore, the constructing of the attack template includes:
[0040] Calculating the Hamming weight of the intermediate value of the cloned power consumption trace, wherein the intermediate value is the output of the first round of encryption S-box in the process of encrypting plaintext using the subkey;
[0041] The low-dimensional representations of the clone power consumption traces corresponding to the Hamming weights of the middle values of the same value are classified into one category, and multiple categories of low-dimensional representation data are obtained;
[0042] For each type of low-dimensional representation data, the corresponding mean vector and covariance matrix are calculated to construct an attack template, and multiple types of attack templates are obtained. Each type of attack template corresponds to a Hamming weight.
[0043] Furthermore, the attack template is expressed as follows:
[0044] ;
[0045] In the formula, Represents the low-dimensional representation based on the c-th attack template The probability density value of ; represents the mean vector of the c-th attack template; represents the covariance matrix of the c-th attack template, and the category c of the attack template is determined according to the Hamming weight; m represents the dimension of the low-dimensional representation.
[0046] Furthermore, the subkey with the product of the maximum probability density value is taken as the correct key, and the expression is as follows:
[0047] ;
[0048] In the formula, a subkey representing the product of the maximum probability density values; represents the kth subkey; Represents a subkey set , K represents the number of subkeys; V represents the number of target power consumption traces; Represents the low-dimensional representation based on the c-th attack template The probability density value of ; П represents the product operation;
[0049] Represents the vth target power consumption trace A low-dimensional representation of represents the mean vector of the c-th attack template; Represents the covariance matrix of the c-th attack template, where the category c of the attack template is calculated according to the Hamming weight Sure, Indicates the use of subkey The power consumption trace of the vth target The corresponding middle value.
[0050] On the other hand, the present invention discloses a side channel attack system based on manifold learning, which is applicable to the above-mentioned side channel attack method based on manifold learning, comprising:
[0051] A data acquisition module, used to collect the target power consumption trace of the target chip when it is running and its corresponding subkey set, as well as the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip;
[0052] A template construction module is used to obtain an explicit mapping relationship function by characterizing an explicit manifold learning model according to the clone power consumption trace, and to construct multiple attack templates through Hamming weight classification, each attack template corresponding to a Hamming weight;
[0053] The side channel attack module is used to map each target power consumption trace based on the explicit mapping relationship function for any sub-key, obtain the low-dimensional representation of the corresponding target power consumption trace, match it with the attack template, and calculate the product of the corresponding probability density values; take the sub-key with the product of the maximum probability density value as the correct key to realize the side channel attack based on manifold learning.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The side channel attack method and attack system based on manifold learning of the present invention reduce the dimension and extract features of the target power consumption trace by obtaining an explicit mapping relationship function by characterizing an explicit manifold learning model, which can replace the complex point of interest selection, and adopts the explicit mapping of manifold learning to fit the characterization attack scenario, thereby reducing the complexity of attacking the masked protected cryptographic chip and greatly improving the success rate of the attack. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a flow chart of a side channel attack method based on manifold learning provided in Example 1;
[0057] Figure 2 This is a schematic diagram of the results of attacking the AES-128 algorithm for first-order Boolean mask protection provided in Example 1. DETAILED DESCRIPTION
[0058] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0059] Example 1
[0060] This embodiment 1 provides a side channel attack method based on manifold learning, including the following steps:
[0061] Collect the target power consumption traces and their corresponding subkey sets when the target chip is running, as well as the clone power consumption traces of the cloned chip with the same leakage characteristics as the target chip;
[0062] According to the clone power consumption trace, an explicit mapping relationship function is obtained by characterizing the explicit manifold learning model, and multiple attack templates are constructed through Hamming weight classification, each of which corresponds to a Hamming weight.
[0063] For any sub-key, each target power consumption trace is mapped based on an explicit mapping relationship function. After obtaining the low-dimensional representation of the corresponding target power consumption trace, it is matched with the attack template and the product of the corresponding probability density values is calculated. The sub-key with the product of the maximum probability density value is taken as the correct key to realize the side channel attack based on manifold learning.
[0064] The technical concept of the present invention is: by characterizing the explicit manifold learning model to obtain the explicit mapping relationship function, the dimension reduction and feature extraction of the target power consumption trace can be performed, which can replace the complex point of interest selection, and the explicit mapping of manifold learning is used to fit the characterization attack scenario, which reduces the complexity of attacking the masked protected cryptographic chip and greatly improves the success rate of the attack.
[0065] like Figure 1 As shown, the specific steps are as follows:
[0066] Step 1: Data acquisition.
[0067] The acquired data are respectively the target power consumption trace and its corresponding subkey set when the target chip is running, and the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip.
[0068] The target chip in this method refers to the cryptographic chip that the attacker actually wants to attack. In the characterization attack scenario, the attacker cannot directly control the target chip, so he can find a cryptographic chip with the same leakage characteristics as the target chip, called a clone chip. A resistor is connected in series to the ground terminal of the clone chip, and an oscilloscope is used to collect the clone power consumption trace of the clone chip during operation.
[0069] Assuming that the cryptographic algorithm of the target chip is known, the corresponding subkey set can be obtained by enumeration. , K is the number of subkeys; in this embodiment, taking the AES-128 algorithm as an example, the enumeration space of subkeys is , so the value of K is 256.
[0070] In this method, power consumption traces are collected by selecting specific plain text inputs, and one plain text input corresponds to one power consumption trace.
[0071] For cloned chips, use subkey For plain text When encrypting, the corresponding clone power consumption trace can be collected , clone power trace The corresponding intermediate value is selected as the output of the first round of encryption S-box in the process of encrypting the plaintext using the subkey, that is, , Indicates the use of subkey The power consumption trace of the i-th clone collected at The corresponding intermediate value, n represents the dimension of the cloned power trace, N represents the number of cloned power traces; Sbox represents the S-box table lookup operation; represents the i-th plaintext; represents the kth subkey.
[0072] Similarly, for the target chip, use the subkey For plain text The corresponding target power consumption trace can be collected during encryption , target power consumption trace The corresponding intermediate value is selected as the output of the first round of encryption S-box in the process of encrypting the plaintext using the subkey, that is, , Indicates the use of subkey The vth target power consumption trace collected at The corresponding intermediate value, n represents the dimension of the target power trace, which is consistent with the dimension of the clone power trace, V represents the number of target power traces; Sbox represents the S-box table lookup operation; represents the vth plaintext; represents the kth subkey.
[0073] Step 2: Template construction.
[0074] This method assumes that there is a nonlinear polynomial mapping relationship between high-dimensional power consumption traces and their low-dimensional representations. First, an explicit manifold learning model is characterized by cloning power consumption traces to find an explicit mapping relationship function from cloned power consumption traces to their low-dimensional representations. The cloned power consumption traces are mapped to low dimensions through the explicit mapping relationship function, and classified according to the Hamming weight of the intermediate value. The mean and covariance of each class are calculated to construct an attack template based on Gaussian distribution.
[0075] Manifold learning is a dimensionality reduction method based on graph theory, which aims to preserve the local features of clone power traces. Manifold learning uses the neighborhood information of the clone power trace set to construct a weighted graph, that is, clone power traces that are close in the original space remain close after dimensionality reduction mapping. and are adjacent on the adjacency graph, and their low-dimensional representation and Given a set of high-dimensional clone power consumption traces , where N is the number of cloned power traces and n is the dimension of cloned power traces. The explicit manifold learning model is characterized by the following process:
[0076] (1) Construct an adjacency graph.
[0077] This method uses the k-NN (k-Nearest Neighbors) nearest neighbor strategy to select the neighbors of each clone power trace and construct an adjacency graph. The Euclidean norm is used to measure the distance between two clone power traces. In cloning power consumption trace or clone the power consumption trace among a preset number of nearest neighbors In cloning the power consumption trace Among the preset number of nearest neighbors, the power consumption trace is cloned and Adjacency.
[0078] (2) Calculate the similarity matrix.
[0079] Using Gaussian kernel function to measure the power consumption traces of two clones and The similarity between them is used to construct the similarity matrix W, whose elements can be calculated by the following formula:
[0080] ;
[0081] Wherein t represents a hyperparameter for measuring distance difference, which measures the distance difference between different pairs of adjacent points. In most cases, t is set to a positive integer and is adjustable, which is not limited in this embodiment.
[0082] (3) Solve for the polynomial coefficients.
[0083] First, this method retains the local characteristics of the manifold structure, so that the adjacent clone power consumption traces in the adjacency graph remain adjacent after dimensionality reduction, that is, minimizing the objective function, which is expressed as follows:
[0084] ;
[0085] Where Y represents the set of low-dimensional representations of cloned power consumption traces, , represents the power consumption trace of the i-th clone The low-dimensional representation of represents the power consumption trace of the jth clone The low-dimensional representation of , m represents the dimension of the low-dimensional representation, and N represents the number of clone power consumption traces;
[0086] Assume that D represents a diagonal matrix, , represents the element in the i-th row and i-th column of the diagonal matrix D, ; W represents the similarity matrix, , represents the element in the i-th row and j-th column of the similarity matrix W; then L represents the Laplacian matrix of the adjacency graph, L=DW.
[0087] To avoid redundant solutions, add constraints , the above problem can be transformed into the first optimization problem:
[0088] ;
[0089] In the formula, tr represents the determinant; st represents the constraint condition; Represents the identity matrix.
[0090] The present invention assumes a low-dimensional representation The dth component of It can be expressed as the corresponding high-dimensional clone power consumption trace in the following way An R-degree polynomial of :
[0091] ;
[0092] In the formula, represents the power consumption trace of the i-th clone The low-dimensional representation of The dth component of ; r represents the power index, R represents the number of power indexes r, that is, the polynomial degree; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the cloned power consumption trace; represents the polynomial coefficients of the dth low-dimensional representation component under power index r and dimension index s, The vector of polynomial coefficients representing the dth low-dimensional representation component is defined as follows:
[0093] ;
[0094] The vector of polynomial coefficients representing the dth low-dimensional representation component is indexed by the power index r and the dimension index s. This polynomial enumerates all monomials except cross terms. Substituting this polynomial assumption, the first optimization problem can be transformed into the second optimization problem:
[0095] ;
[0096] In the formula, represents the vector of polynomial coefficients of the d-th low-dimensional representation component, d=1,2,⋯,m, m represents the dimension of the low-dimensional representation;
[0097] represents the polynomial coefficient corresponding to the f-th low-dimensional representation component; represents the Kronecker function, when f=d ,otherwise ;
[0098] represents the set of combination vectors of cloned power consumption traces based on R-th Hadamard product, , N represents the number of cloned power traces, represents the combination vector of the i-th clone power consumption trace based on the R-th Hadamard product, and the expression is as follows:
[0099] ;
[0100] In the formula, represents the combination vector of the i-th clone power consumption trace based on the R-th Hadamard product; represents the Hadamard product, that is, matrix multiplication term by term; for any matrix and , .therefore, .
[0101] By constructing the Lagrangian function, the above optimization problem is transformed into solving the generalized eigenvalue problem:
[0102] ;
[0103] In the formula, Represents the combination matrix The generalized eigenvalues of are:
[0104] Solve the generalized eigenvalue problem and combine the matrix The non-zero eigenvalues in the generalized eigenvalues are sorted in ascending order, and the eigenvectors corresponding to the m smallest non-zero eigenvalues are selected as the polynomial coefficients .pass , the present invention can completely determine the mapping relationship from the high-dimensional clone power consumption trace to its low-dimensional representation.
[0105] Therefore, for any power consumption trace, its low-dimensional representation can be directly and quickly calculated according to the following explicit mapping function:
[0106] ;
[0107] In the formula, A low-dimensional representation representing the target power consumption trace or the clone power consumption trace; represents the polynomial coefficient of the mth low-dimensional representation component under the power index r and the dimension index s, where m represents the dimension of the low-dimensional representation; r represents the power index, R represents the number of power indexes r, that is, the degree of the polynomial; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the target power trace or the cloned power trace; Represents the sth component of the target power trace or clone power trace.
[0108] Then, based on the above explicit mapping relationship function, the clone power consumption trace can be mapped to a low dimension. Follow the steps below to build an attack template based on Gaussian distribution:
[0109] (1) As before, the subkey set of this embodiment is , K is the number of subkeys. It is known that the subkeys used The power consumption trace of the i-th clone collected at The corresponding intermediate value , calculate the median value The Hamming weight , HW stands for Hamming Weight, that is, Hamming weight function.
[0110] (2) The low-dimensional representations of the clone power traces corresponding to the Hamming weights of the intermediate values of the same numerical value are classified into one category, and multiple categories of low-dimensional representation data are obtained, each category of low-dimensional representation data corresponds to a Hamming weight. For example, the low-dimensional representations of the clone power traces corresponding to all intermediate values with a Hamming weight of 4 are classified into one category, those with a Hamming weight of 5 are classified into another category, and so on.
[0111] (3) For each type of low-dimensional representation data, the corresponding mean vector and covariance matrix are calculated to construct an attack template, and multiple groups of attack templates are obtained. Each group of attack templates corresponds to a Hamming weight.
[0112] Assume that the c-th type of low-dimensional representation data contains n' low-dimensional representation vectors , the mean vector It can be expressed as . Covariance matrix It can be expressed as Using the mean vector and the covariance matrix , the corresponding attack template of the cth type can be constructed for the cth type of low-dimensional representation data. The attack template is based on the multivariate normal distribution, that is, the Gaussian distribution assumption. Each type of low-dimensional representation data is considered to conform to a Gaussian distribution. For each type of low-dimensional representation data, based on the corresponding mean vector and the covariance matrix Define a multivariate Gaussian distribution, the expression is as follows:
[0113] ;
[0114] In the formula, Represents the low-dimensional representation based on the c-th attack template The probability density value of ; represents the mean vector of the c-th attack template; represents the covariance matrix of the c-th attack template, and the category c of the attack template is determined according to the Hamming weight; m represents the dimension of the low-dimensional representation.
[0115] Step 3: Template attack.
[0116] As before, step 1 has collected multiple target power consumption traces , n represents the dimension of the target power consumption trace, which is consistent with the dimension of the clone power consumption trace, and V represents the number of target power consumption traces.
[0117] Based on the explicit mapping function obtained in step 2, for each target power consumption trace Mapping is performed to obtain a low-dimensional representation of the corresponding target power consumption trace , and then the low-dimensional representation Match it with the attack template obtained in step 2.
[0118] As before, the subkey set of this embodiment is , K is the number of subkeys. It is known that the subkeys used The vth target power consumption trace collected at The corresponding intermediate value , calculate the median value The Hamming weight , HW stands for Hamming Weight, that is, Hamming weight function.
[0119] According to the Hamming weight , select the corresponding c-th attack template to obtain the corresponding mean vector and the covariance matrix , calculates the probability density value of the multivariate Gaussian distribution.
[0120] Take the subkey with the product of the maximum probability density value For the correct key, the expression is as follows:
[0121] ;
[0122] In the formula, a subkey representing the product of the maximum probability density values; represents the kth subkey; Represents a subkey set , K represents the number of subkeys; V represents the number of target power consumption traces; Represents the low-dimensional representation based on the c-th attack template The probability density value of ; П represents the product operation;
[0123] Represents the vth target power consumption trace A low-dimensional representation of represents the mean vector of the c-th attack template; Represents the covariance matrix of the c-th attack template, where the category c of the attack template is calculated according to the Hamming weight Sure, Indicates the use of subkey The power consumption trace of the vth target The corresponding middle value.
[0124] This example builds and attacks the ASCAD dataset collected by the AES-128 algorithm protected by a first-order Boolean mask, and compares it with the existing deep learning-based attack method MLP. The results are as follows: Figure 2 It can be seen that when the number of power consumption traces used in the attack is greater than 150, the method of the present invention requires fewer power consumption traces for a successful attack.
[0125] The present invention is a side channel attack method based on manifold learning. The present invention performs dimensionality reduction and feature extraction processing on original high-dimensional power consumption traces through manifold learning. Firstly, an explicit manifold learning model is characterized by using part of the power consumption traces to find an explicit mapping relationship from the high-dimensional power consumption trace to its low-dimensional representation. Then, all the characterized power consumption traces are mapped to low dimensions to construct an attack template. In the attack stage, the target power consumption trace is mapped to low dimensions, matched with the template, and a key is guessed.
[0126] The present invention reduces the dimension of high-dimensional power consumption traces by means of manifold learning, thereby reducing the cost of the interest point selection process, improving the cost of attacking the mask-protected cryptographic chip, and also improving the success rate of the attack.
[0127] Example 2
[0128] This embodiment 2 provides a side channel attack system based on manifold learning, including:
[0129] A data acquisition module, used to collect the target power consumption trace and its corresponding subkey set when the target chip is running, and the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip;
[0130] The template construction module is used to obtain an explicit mapping relationship function by characterizing an explicit manifold learning model based on the cloned power consumption trace, and to construct multiple attack templates through Hamming weight classification, where each attack template corresponds to a Hamming weight;
[0131] The side channel attack module is used to map each target power consumption trace based on an explicit mapping relationship function for any sub-key, obtain the low-dimensional representation of the corresponding target power consumption trace, match it with the attack template, and calculate the product of the corresponding probability density values; the sub-key with the product of the maximum probability density value is taken as the correct key to realize the side channel attack based on manifold learning.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0136] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A side channel attack method based on manifold learning, characterized in that: The steps include: Collecting the target power consumption trace of the target chip when it is running and its corresponding subkey set, as well as the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip; According to the clone power consumption trace, an explicit mapping relationship function is obtained by characterizing an explicit manifold learning model, and multiple attack templates are constructed through Hamming weight classification, each attack template corresponds to a Hamming weight; For any sub-key, each target power consumption trace is mapped based on the explicit mapping relationship function, and after obtaining the low-dimensional representation of the corresponding target power consumption trace, it is matched with the attack template, and the product of the corresponding probability density values is calculated; the sub-key with the product of the maximum probability density value is taken as the correct key to realize the side channel attack based on manifold learning.
2. The side channel attack method based on manifold learning according to claim 1 is characterized in that: The expression of the explicit mapping relationship function is as follows: ; In the formula, A low-dimensional representation representing the target power consumption trace or the clone power consumption trace; represents the polynomial coefficient of the mth low-dimensional representation component under the power index r and the dimension index s, where m represents the dimension of the low-dimensional representation; r represents the power index, R represents the number of power indexes r, that is, the degree of the polynomial; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the target power trace or the cloned power trace; Represents the sth component of the target power trace or clone power trace.
3. The side channel attack method based on manifold learning according to claim 1 is characterized in that: The step of obtaining the explicit mapping relationship function comprises the following steps: Based on the k-NN nearest neighbor strategy, an adjacency graph containing all clone power consumption traces is constructed, and the similarity matrix between clone power consumption traces is calculated; Constructing a first optimization problem according to the similarity matrix; By introducing a polynomial, the first optimization problem is transformed into a second optimization problem; By constructing a Lagrangian function, the second optimization problem is converted into a generalized eigenvalue problem for solution to obtain polynomial coefficients; based on the polynomial coefficients, an explicit mapping relationship function is obtained.
4. The side channel attack method based on manifold learning according to claim 3 is characterized in that: The expression of the first optimization problem is as follows: ; Where Y represents the set of low-dimensional representations of cloned power consumption traces, , represents the power consumption trace of the i-th clone The low-dimensional representation of represents the power consumption trace of the jth clone The low-dimensional representation of , m represents the dimension of the low-dimensional representation, and N represents the number of clone power consumption traces; tr represents the determinant; L represents the Laplace matrix of the adjacency graph, L=DW, D represents the diagonal matrix, , represents the element in the i-th row and i-th column of the diagonal matrix D, ; W represents the similarity matrix, , Represents the element in the i-th row and j-th column of the similarity matrix W, and the expression is as follows: ; t represents the hyperparameter used to measure the distance difference; st represents the constraint condition; Represents the identity matrix.
5. The side channel attack method based on manifold learning according to claim 3 is characterized in that: The expression of the second optimization problem is as follows: ; In the formula, Represents the vector of polynomial coefficients of the d-th low-dimensional representation component, d=1,2,⋯,m, m represents the dimension of the low-dimensional representation, and the expression is as follows: ; r represents the power index, R represents the number of power indexes r, that is, the degree of the polynomial; s represents the dimension index, n represents the number of dimension indexes s, that is, the dimension of the cloned power consumption trace; represents the set of combination vectors of cloned power consumption traces based on R-th Hadamard product, , N represents the number of clone power traces, represents the combination vector of the i-th clone power consumption trace based on the R-th Hadamard product, and the expression is as follows: ; In the formula, represents the Hadamard product; represents the power consumption trace of the i-th clone; represents the polynomial coefficient corresponding to the f-th low-dimensional representation component; represents the Kronecker function, when f=d ,otherwise .
6. The side channel attack method based on manifold learning according to claim 3 is characterized in that: The method of obtaining polynomial coefficients comprises the following steps: The second optimization problem is converted into a generalized eigenvalue problem, and the expression of the generalized eigenvalue problem is as follows: ; In the formula, Represents the combination matrix The generalized eigenvalues of are: Solve the generalized eigenvalue problem and combine the matrix The non-zero eigenvalues in the generalized eigenvalues are sorted in ascending order, and the eigenvectors corresponding to the m smallest non-zero eigenvalues are selected as the polynomial coefficients .
7. The side channel attack method based on manifold learning according to claim 1 is characterized in that: The constructing of the attack template comprises: Calculating the Hamming weight of the intermediate value of the cloned power consumption trace, wherein the intermediate value is the output of the first round of encryption S-box in the process of encrypting plaintext using the subkey; The low-dimensional representations of the clone power consumption traces corresponding to the Hamming weights of the middle values of the same value are classified into one category, and multiple categories of low-dimensional representation data are obtained; For each type of low-dimensional representation data, the corresponding mean vector and covariance matrix are calculated to construct an attack template, and multiple types of attack templates are obtained. Each type of attack template corresponds to a Hamming weight.
8. The side channel attack method based on manifold learning according to claim 7 is characterized in that: The attack template is expressed as follows: ; In the formula, Represents the low-dimensional representation based on the c-th attack template The probability density value of ; represents the mean vector of the c-th attack template; represents the covariance matrix of the c-th attack template, and the category c of the attack template is determined according to the Hamming weight; m represents the dimension of the low-dimensional representation.
9. The side channel attack method based on manifold learning according to claim 1 is characterized in that: The subkey with the product of the maximum probability density value is taken as the correct key, and the expression is as follows: ; In the formula, a subkey representing the product of the maximum probability density values; represents the kth subkey; Represents a subkey set , K represents the number of subkeys; V represents the number of target power consumption traces; Represents the low-dimensional representation based on the c-th attack template The probability density value of ; П represents the product operation; Represents the vth target power consumption trace A low-dimensional representation of represents the mean vector of the c-th attack template; Represents the covariance matrix of the c-th attack template, where the category c of the attack template is calculated according to the Hamming weight Sure, Indicates the use of subkey The power consumption trace of the vth target The corresponding middle value.
10. A side channel attack system based on manifold learning, applicable to the side channel attack method based on manifold learning according to any one of claims 1 to 9, characterized in that: include: A data acquisition module, used to collect the target power consumption trace of the target chip when it is running and its corresponding subkey set, as well as the clone power consumption trace of the clone chip with the same leakage characteristics as the target chip; A template construction module is used to obtain an explicit mapping relationship function by characterizing an explicit manifold learning model according to the clone power consumption trace, and to construct multiple attack templates through Hamming weight classification, each attack template corresponding to a Hamming weight; The side channel attack module is used to map each target power consumption trace based on the explicit mapping relationship function for any sub-key, obtain the low-dimensional representation of the corresponding target power consumption trace, match it with the attack template, and calculate the product of the corresponding probability density values; take the sub-key with the product of the maximum probability density value as the correct key to realize the side channel attack based on manifold learning.
Citation Information
Patent Citations
Bit stream attack detection method and device for FPGA embedded terminal equipment and electronic equipment
CN112069501A
Cross-device side channel analysis method based on variational automatic encoder model
CN116131973A
Side channel security assessment method based on distribution prediction
CN117650878A
Related power consumption analysis method based on uniform flow pattern approximation and projection
CN117768195A
Modeling type side channel attack method based on tetrad network
CN118018176A
Cited By
Side channel analysis method and device, equipment, storage medium and program product
CN120546853A