Side channel analysis method based on frequency domain loss auto-encoder data enhancement

By introducing a frequency domain loss term into the reconstruction loss of the autoencoder, the loss function is improved, generating more realistic energy trace data. This solves the problem of insufficient model generalization ability in side-channel analysis and enhances the effectiveness and robustness of side-channel analysis.

CN121619084APending Publication Date: 2026-03-06GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing deep learning-based side-channel analysis methods suffer from insufficient generalization ability when the number of energy traces collected is insufficient, leading to a high risk of model overfitting and difficulty in effectively extracting and utilizing frequency domain structure information, thus affecting the analysis results.

Method used

By introducing a frequency domain loss term into the reconstruction loss of the vector quantization variational autoencoder, and combining frequency and time domain information, the autoencoder loss function is improved, generating more realistic energy trace data, expanding the dataset, and enhancing the model's generalization ability.

Benefits of technology

The energy trace data generated by the improved loss function is more realistic, expands the dataset, improves the effectiveness and robustness of deep learning side-channel analysis, and enhances the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121619084A_ABST
    Figure CN121619084A_ABST
Patent Text Reader

Abstract

The invention provides a side channel analysis method based on frequency domain loss auto-encoder data enhancement, which comprises the following steps of: adding a frequency domain loss item to a reconstruction loss part of a vector quantization variational auto-encoder loss function, and synchronously utilizing frequency domain and time domain information to improve the loss function of an auto-encoder; constructing an auto-encoder model based on the improved loss function, and training the improved auto-encoder model by using original data; performing data enhancement by using the trained model to generate a new energy trace; and finally, performing side channel analysis by using the newly generated energy trace. The method can better help the model to learn the periodic structure and frequency characteristics of the energy trace, thereby generating more real energy trace data, expanding the scale of a data set for side channel analysis, improving the generalization ability of a deep learning side channel analysis model, and improving the effect of side channel analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security, specifically a side-channel analysis method based on frequency domain loss autoencoder data augmentation. Background Technology

[0002] Side-channel analysis (SCA) is considered one of the most serious threats to cryptographic devices. It obtains secret information by capturing and analyzing side-channel information leaked during the operation of cryptographic devices. In recent years, with the rapid development of artificial intelligence technology, deep learning has been widely used in side-channel analysis due to its feature extraction capabilities in large-scale complex data. Compared with traditional side-channel analysis methods, deep learning-based side-channel analysis has higher analysis efficiency, more accurate classification capabilities, and stronger feature extraction capabilities, opening up new directions and ideas for side-channel analysis research.

[0003] However, in practical side-channel analysis, the number of energy traces collected is often insufficient due to limitations such as time, resources, and protection strategies. This reduces the generalization ability and effectiveness of deep learning side-channel analysis. Data augmentation techniques can effectively expand the dataset, thereby reducing the risk of model overfitting and improving classification accuracy and robustness. Vector Quantized Variational Autoencoder (VQVAE) is a deep learning model that combines vector quantization and variational autoencoding mechanisms. It learns structured representations of data through discrete codebooks, supporting efficient compression and high-quality generation. Because the VQVAE method uses mean squared error to calculate reconstruction error, its ability to perceive local oscillations or frequency changes is weak. This makes it easy for the model to ignore frequency domain structural information, such as periodicity and spikes, during training when using it for data augmentation in the side-channel domain, thus affecting the authenticity of the generated samples. To address the aforementioned issues, this invention proposes a side-channel analysis method based on frequency-domain loss autoencoder data augmentation. By introducing a frequency-domain loss term into the reconstruction loss, the method simultaneously utilizes frequency and time-domain information to improve the autoencoder loss function. This function is then used to construct a model that generates more realistic energy traces for side-channel analysis, thereby enhancing the effectiveness of the side-channel analysis. Summary of the Invention

[0004] This invention proposes a side-channel analysis method based on frequency-domain loss autoencoder data augmentation. This method targets vector quantization variational autoencoders, introduces a frequency-domain loss term into the autoencoder's reconstruction loss, and simultaneously utilizes frequency and time-domain information to improve the autoencoder loss function. Based on the improved loss function, a model is constructed and trained. Based on the trained model, data augmentation is performed to generate energy traces. Finally, the generated energy traces are used for side-channel analysis.

[0005] The technical solution to achieve the objective of this invention is:

[0006] A side-channel analysis method based on frequency-domain loss autoencoder data augmentation specifically includes the following steps:

[0007] (1) Calculate the reconstruction loss of the VQVAE loss function by combining the frequency domain loss;

[0008] To adapt to the periodic structure and frequency characteristics of the energy trace, a frequency domain loss term is added to the reconstruction loss part of the vector quantization variational autoencoder loss function. The frequency domain loss and the original reconstruction error are weighted and fused to calculate the reconstruction loss. The frequency domain loss term is calculated from the frequency domain amplitude loss and phase loss.

[0009] (2) Construct an autoencoder model based on the improved loss function;

[0010] The autoencoder model consists of three components: encoder, quantization codebook, and decoder. The encoder extracts energy trace features, the quantization codebook discretizes the feature vectors, and the decoder is used to reconstruct the energy trace data.

[0011] (3) Train the improved autoencoder model using the original data;

[0012] Input the original energy trace into the constructed model for iterative training until the loss value converges, and save the optimal model;

[0013] (4) Use the trained model for data augmentation;

[0014] The original energy trace dataset is input into the trained optimal model to generate new energy trace data;

[0015] (5) Perform side-channel analysis using the newly generated energy trace data;

[0016] The newly generated energy trace data is expanded into the original energy trace dataset for side-channel analysis.

[0017] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (1) of calculating the reconstruction loss of the VQVAE loss function by combining frequency domain loss is as follows:

[0018] (1.1) To adapt to the periodic structure and frequency characteristics of the energy trace, a frequency domain loss term is added to the reconstruction loss part of the vector quantization variational autoencoder loss function. The frequency domain loss and the original reconstruction error are weighted and fused to calculate the reconstruction loss; with L recon The reconstruction loss function is calculated as follows:

[0019]

[0020] Wherein, NMSE is the standardized mean square error, which is the reconstruction loss part in the original vector quantization variational autoencoder loss function; For frequency domain loss terms, These are the weighting coefficients;

[0021] (1.2) Calculate the frequency domain loss term;

[0022] (1.2.1) Assume that each original energy trace has N sample points, and let x represent the energy trace, x = (x0, x1, …, x t ,…,x N-1 ), x t Let x be the t-th sample point, 0 ≤ t ≤ N-1; The original energy trace data is transformed using Fourier transform F(⋅), projecting the original energy trace x into the frequency domain to obtain a frequency domain sequence with the same length as the energy trace x. Let X represent the frequency domain sequence of the energy trace x after discrete Fourier transform. = (X0, X1, …,X k ,…,X N-1 ), X k X represents the k-th frequency component, whose spectrum contains information about both amplitude and phase. k ∈C, where C is the set of complex numbers, 0≤k≤N-1; X k The calculation method is as follows:

[0023]

[0024] Where i is the complex unit. It is a natural constant;

[0025] (1.2.2) Frequency component X k The amplitude reflects the energy distribution of the energy trace at various frequencies and is an important manifestation of the periodicity and intensity changes in the energy trace; let |X| represent the amplitude of the frequency domain sequence X, then |X| = (|X0|, |X1|, …, |X... k | ,…, |X N-1 |),|X k | represents the amplitude corresponding to the k-th frequency component, 0≤k≤N-1; frequency component X k amplitude |X k The calculation method is as follows:

[0026]

[0027] Where Re(⋅) is used to extract the real part of the complex number, and Im(⋅) is used to extract the imaginary part of the complex number; |X k The larger the value, the stronger the frequency component, and the more of that frequency component is contained in the signal;

[0028] (1.2.3) The temporal structure of the phase-controlled energy trace is a crucial factor determining the waveform shape of the energy trace; preserving the phase structure during the generation of energy trace samples helps ensure the authenticity of the generated energy trace samples; Let X represent the phase angle of the frequency domain sequence X. , This represents the phase angle corresponding to the k-th frequency domain component. , 0≤k≤N-1, The calculation method is as follows:

[0029]

[0030] Where arctan2() is the arctangent function;

[0031] (1.2.4) with The generated energy trace will By performing a discrete Fourier transform and projecting it into the frequency domain, a frequency domain sequence of the same length is obtained. , ;

[0032] (1.2.5) To accurately evaluate the model's loss in the frequency domain, it is necessary to calculate the amplitude and phase losses separately; the amplitude loss L amp The calculation method is the sum of squares of the amplitude differences between the original sequence and the generated sequence. L represents the sum of squares in the second normal form. amp The calculation method is as follows:

[0033]

[0034] by Indicates the generation of energy trace frequency domain sequence The corresponding phase angle sequence, phase loss L phase The calculation method is as follows:

[0035]

[0036] (1.2.6) Frequency domain loss term The calculation method is as follows:

[0037]

[0038] (1.3) Based on the improved reconstruction loss function L recon The loss function L of the autoencoder is as follows:

[0039]

[0040] in, This is the vector quantization loss, used to force the encoder output to be closer to the discrete vectors in the codebook, thus achieving the quantization effect. The commitment loss is used to prevent the encoder output from being excessively distorted in order to get closer to the codebook, thus maintaining the stability of the features; z is the feature vector of the energy trace x of the encoder output; e k is the codebook vector; sg(⋅) is gradient stopping, which stops updating its operands during gradient propagation; β is a hyperparameter used to balance the weights of the commitment loss.

[0041] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (2) of constructing the autoencoder model based on the improved loss function is as follows:

[0042] The autoencoder model mainly consists of three components: encoder, quantization codebook, and decoder. The specific construction method is as follows:

[0043] (2.1) The encoder is used to extract features and consists of one input layer and three convolutional layers. The input layer is used to receive energy traces as initial input. The energy trace data dimension is 1×N, where N is the number of energy trace sample points. The first two of the three convolutional layers are used to extract features from the energy traces. The first convolutional layer uses 32 filters and a convolutional kernel of size 1×3, with ReLU activation function. The second convolutional layer uses 64 filters and a convolutional kernel of size 1×3, with ReLU activation function. The last convolutional layer is used to reduce the dimension of each feature vector to D dimensions. The size of the convolutional kernel is 1×1, and there are D filters, where D is the dimension of the embedded vector in the quantization codebook.

[0044] (2.2) The quantization codebook is used to discretize the features extracted by the encoder, and is defined as a latent space e∈R M×D Where R is the set of real numbers, M is the number of embedding vectors, and each embedding vector has D dimensions, e i Let i be the i-th embedding vector;

[0045] (2.3) The decoder is used to reconstruct the energy trace and consists of three deconvolutional layers. The first deconvolutional layer uses 64 filters and a 1×3 kernel with ReLU activation function. The second convolutional layer uses 32 filters and a 1×3 kernel with ReLU activation function. The third convolutional layer uses one filter and a 1×3 kernel to recover the generated energy trace with the same structure as the original energy trace.

[0046] In the side-channel analysis method based on frequency domain loss autoencoder data augmentation of the present invention, step (3) involves training an improved autoencoder model using the original data, and the specific steps are as follows:

[0047] (3.1) Divide the original energy traces into a training set and a test set; input the original energy traces x in the training set into the autoencoder model constructed in step (2);

[0048] (3.2) Extract the feature z of the original energy trace x from the encoder;

[0049] (3.3) In the latent space of the quantized codebook, the nearest neighbor search method is used to replace z with the nearest neighbor vector q in the codebook. = e m ,in ;

[0050] (3.4) The decoder reconstructs the generated q into a sequence similar to the input sequence x. ;

[0051] (3.5) Calculate the loss value of the batch of energy traces based on the loss function based on frequency domain loss; the smaller the loss value, the better the model can learn the features of the original energy traces, and the higher the authenticity of the generated new energy traces;

[0052] (3.6) Update the model parameters through backpropagation based on the loss value;

[0053] (3.7) Perform iterative calculations on the model according to the above steps until the model converges. When the loss value loss < 0.05, the model is considered to have converged, and the optimal model is saved.

[0054] In the side-channel analysis method based on frequency domain loss autoencoder data augmentation of the present invention, step (4) involves data augmentation using a trained model, and the specific steps are as follows:

[0055] (4.1) Input the training set from the original energy trace into the optimal model trained in step (3);

[0056] (4.2) The output of the decoder of the optimal model is used as new energy trace data;

[0057] (4.3) Use the original energy trace's tag as the tag for the new energy trace.

[0058] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (5) involves performing side-channel analysis using newly generated energy trace data. The specific steps are as follows:

[0059] (5.1) The newly generated energy trace dataset is mixed and added to the training set of the original energy trace;

[0060] (5.2) A deep learning side-channel analysis model is constructed using convolutional neural networks and multilayer perceptrons;

[0061] (5.3) Input the hybrid energy trace dataset into the deep learning side-channel analysis model for training, and save the optimal model;

[0062] (5.4) Use the trained deep learning side-channel analysis model to perform key prediction on the test set of the original energy trace, complete the side-channel analysis, and evaluate the prediction results.

[0063] The beneficial effects of this invention are:

[0064] (1) This invention improves the loss function of the autoencoder by adding a frequency domain loss term to the reconstruction loss part of the vector quantization variational autoencoder loss function, which can better help the model learn the periodic structure and frequency characteristics of the energy trace, thereby generating more realistic sample data, expanding the dataset, improving the generalization ability of the deep learning side-channel analysis model, and improving the effect of side-channel analysis.

[0065] (2) By optimizing the loss function of the vector quantization variational autoencoder, this invention improves the learning ability and robustness of the model, enabling the model to generate new real energy trace data on different energy trace datasets, thereby improving the ability of the deep learning side-channel analysis model. Attached Figure Description

[0066] Figure 1 This is a flowchart of a side-channel analysis method based on frequency domain loss autoencoder data enhancement according to the present invention.

[0067] Specific implementation examples

[0068] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but this is not intended to limit the present invention. Example

[0069] A side-channel analysis method based on frequency-domain loss autoencoder data augmentation, referring to... Figure 1 This includes the following steps:

[0070] (1) Calculate the reconstruction loss of the VQVAE loss function by combining the frequency domain loss;

[0071] (2) Construct an autoencoder model based on the improved loss function;

[0072] (3) Train the improved autoencoder model using the original data;

[0073] (4) Use the trained model for data augmentation;

[0074] (5) Use the newly generated energy trace data for side-channel analysis.

[0075] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (1) of calculating the reconstruction loss of the VQVAE loss function by combining frequency domain loss is as follows:

[0076] (1.1) To adapt to the periodic structure and frequency characteristics of the energy trace, a frequency domain loss term is added to the reconstruction loss part of the vector quantization variational autoencoder loss function. The frequency domain loss and the original reconstruction error are weighted and fused to calculate the reconstruction loss; with L recon The reconstruction loss function is calculated as follows:

[0077]

[0078] Wherein, NMSE is the standardized mean square error, which is the reconstruction loss part in the original vector quantization variational autoencoder loss function; For frequency domain loss terms, These are the weighting coefficients;

[0079] (1.2) Calculate the frequency domain loss term;

[0080] (1.2.1) Assume that each original energy trace has N sample points, and let x represent the energy trace, x = (x0, x1, …, x t ,…,x N-1 ), x t Let x be the t-th sample point, 0 ≤ t ≤ N-1; The original energy trace data is transformed using Fourier transform F(⋅), projecting the original energy trace x into the frequency domain to obtain a frequency domain sequence with the same length as the energy trace x. Let X represent the frequency domain sequence of the energy trace x after discrete Fourier transform. = (X0, X1, …,X k ,…,X N-1 ), X k X represents the k-th frequency component, whose spectrum contains information about both amplitude and phase. k ∈C, where C is the set of complex numbers, 0≤k≤N-1; X k The calculation method is as follows:

[0081]

[0082] Where i is the complex unit. It is a natural constant;

[0083] (1.2.2) Frequency component X k The amplitude reflects the energy distribution of the energy trace at various frequencies and is an important manifestation of the periodicity and intensity changes in the energy trace; let |X| represent the amplitude of the frequency domain sequence X, then |X| = (|X0|, |X1|, …, |X... k | ,…, |X N-1 |),|X k | represents the amplitude corresponding to the k-th frequency component, 0≤k≤N-1; frequency component X k amplitude |X k The calculation method is as follows:

[0084]

[0085] Where Re(⋅) is used to extract the real part of the complex number, and Im(⋅) is used to extract the imaginary part of the complex number; |X k The larger the value, the stronger the frequency component, and the more of that frequency component is contained in the signal;

[0086] (1.2.3) The temporal structure of the phase-controlled energy trace is a crucial factor determining the waveform shape of the energy trace; preserving the phase structure during the generation of energy trace samples helps ensure the authenticity of the generated energy trace samples; Let X represent the phase angle of the frequency domain sequence X. , This represents the phase angle corresponding to the k-th frequency domain component. , 0≤k≤N-1, The calculation method is as follows:

[0087]

[0088] Where arctan2() is the arctangent function;

[0089] (1.2.4) with The generated energy trace will By performing a discrete Fourier transform and projecting it into the frequency domain, a frequency domain sequence of the same length is obtained. , ;

[0090] (1.2.5) To accurately evaluate the model's loss in the frequency domain, it is necessary to calculate the amplitude and phase losses separately; the amplitude loss L amp The calculation method is the sum of squares of the amplitude differences between the original sequence and the generated sequence. L represents the sum of squares in the second normal form. amp The calculation method is as follows:

[0091]

[0092] by Indicates the generation of energy trace frequency domain sequence The corresponding phase angle sequence, phase loss L phase The calculation method is as follows:

[0093]

[0094] (1.2.6) Frequency domain loss term The calculation method is as follows:

[0095]

[0096] (1.3) Based on the improved reconstruction loss function L recon The loss function L of the autoencoder is as follows:

[0097]

[0098] in, This is the vector quantization loss, used to force the encoder output to be closer to the discrete vectors in the codebook, thus achieving the quantization effect. The commitment loss is used to prevent the encoder output from being excessively distorted in order to get closer to the codebook, thus maintaining the stability of the features; z is the feature vector of the energy trace x of the encoder output; e k is the codebook vector; sg(⋅) is gradient stopping, which stops updating its operands during gradient propagation; β is a hyperparameter used to balance the weights of the commitment loss.

[0099] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (2) of constructing the autoencoder model based on the improved loss function is as follows:

[0100] The autoencoder model mainly consists of three components: encoder, quantization codebook, and decoder. The specific construction method is as follows:

[0101] (2.1) The encoder is used to extract features and consists of one input layer and three convolutional layers. The input layer is used to receive energy traces as initial input. The energy trace data dimension is 1×N, where N is the number of energy trace sample points. The first two of the three convolutional layers are used to extract features from the energy traces. The first convolutional layer uses 32 filters and a convolutional kernel of size 1×3, with ReLU activation function. The second convolutional layer uses 64 filters and a convolutional kernel of size 1×3, with ReLU activation function. The last convolutional layer is used to reduce the dimension of each feature vector to D dimensions. The size of the convolutional kernel is 1×1, and there are D filters, where D is the dimension of the embedded vector in the quantization codebook.

[0102] (2.2) The quantization codebook is used to discretize the features extracted by the encoder, and is defined as a latent space e∈R M×D Where R is the set of real numbers, M is the number of embedding vectors, and each embedding vector has D dimensions, e i Let i be the i-th embedding vector;

[0103] (2.3) The decoder is used to reconstruct the energy trace and consists of three deconvolutional layers. The first deconvolutional layer uses 64 filters and a 1×3 kernel with ReLU activation function. The second convolutional layer uses 32 filters and a 1×3 kernel with ReLU activation function. The third convolutional layer uses one filter and a 1×3 kernel to recover the generated energy trace with the same structure as the original energy trace.

[0104] In the side-channel analysis method based on frequency domain loss autoencoder data augmentation of the present invention, step (3) involves training an improved autoencoder model using the original data, and the specific steps are as follows:

[0105] (3.1) Divide the original energy traces into a training set and a test set; input the original energy traces x in the training set into the autoencoder model constructed in step (2);

[0106] (3.2) Extract the feature z of the original energy trace x from the encoder;

[0107] (3.3) In the latent space of the quantized codebook, the nearest neighbor search method is used to replace z with the nearest neighbor vector q in the codebook. = e m ,in ;

[0108] (3.4) The decoder reconstructs the generated q into a sequence similar to the input sequence x. ;

[0109] (3.5) Calculate the loss value of the batch of energy traces based on the loss function based on frequency domain loss; the smaller the loss value, the better the model can learn the features of the original energy traces, and the higher the authenticity of the generated new energy traces;

[0110] (3.6) Update the model parameters through backpropagation based on the loss value;

[0111] (3.7) Perform iterative calculations on the model according to the above steps until the model converges. When the loss value loss < 0.05, the model is considered to have converged, and the optimal model is saved.

[0112] In the side-channel analysis method based on frequency domain loss autoencoder data augmentation of the present invention, step (4) involves data augmentation using a trained model, and the specific steps are as follows:

[0113] (4.1) Input the training set from the original energy trace into the optimal model trained in step (3);

[0114] (4.2) The output of the decoder of the optimal model is used as new energy trace data;

[0115] (4.3) Use the original energy trace's tag as the tag for the new energy trace.

[0116] In the side-channel analysis method based on frequency domain loss autoencoder data enhancement of the present invention, step (5) involves performing side-channel analysis using newly generated energy trace data. The specific steps are as follows:

[0117] (5.1) The newly generated energy trace dataset is mixed and added to the training set of the original energy trace;

[0118] (5.2) A deep learning side-channel analysis model is constructed using convolutional neural networks and multilayer perceptrons;

[0119] (5.3) Input the hybrid energy trace dataset into the deep learning side-channel analysis model for training, and save the optimal model;

[0120] (5.4) Use the trained deep learning side-channel analysis model to perform key prediction on the test set of the original energy trace, complete the side-channel analysis, and evaluate the prediction results.

Claims

1. A side-channel analysis method based on frequency domain loss autoencoder data augmentation, characterized in that, The method comprises the following steps: (1) calculating the reconstruction loss of the VQVAE loss function in combination with the frequency domain loss; To adapt to the periodic structure and frequency characteristics of the energy trace, a frequency domain loss term is added to the reconstruction loss part of the vector quantization variational autoencoder loss function, and the frequency domain loss and the original reconstruction error are weighted and fused to calculate the reconstruction loss, and the frequency domain loss term is calculated by the frequency domain amplitude loss and the phase loss; (2) constructing an autoencoder model based on the improved loss function; The autoencoder model comprises an encoder, a quantization codebook and a decoder, wherein the encoder extracts energy trace features, the quantization codebook discretizes the feature vectors, and the decoder is used to reconstruct the energy trace data; (3) training the improved autoencoder model using original data; The original energy trace is input into the constructed model for iterative training until the loss value converges, and the optimal model is saved; (4) data enhancement using the trained model; The original energy trace dataset is input into the trained optimal model to generate new energy trace data; (5) using the newly generated energy trace data for side channel analysis; The newly generated energy trace data is expanded into the original energy trace dataset for side channel analysis.

2. The side-channel analysis method based on frequency domain loss autoencoder data augmentation of claim 1, wherein, Step (1) of calculating the reconstruction loss of the VQVAE loss function in combination with the frequency domain loss, the specific steps are as follows: (1.1) To adapt to the periodic structure and frequency characteristics of the energy trace, a frequency domain loss term is added to the reconstruction loss part of the vector quantization variational autoencoder loss function, and the frequency domain loss and the original reconstruction error are weighted and fused to calculate the reconstruction loss. L recon represents the reconstruction loss function, and the calculation method is as follows: wherein NMSE is a normalized mean square error, and is a reconstruction loss part in the original vector quantization variational autoencoder loss function; is a frequency domain loss term, is a weight coefficient; (1.2) calculating the frequency domain loss term; (1.2.1) Assume that each original energy trace has N sample points, and let x represent the energy trace, x = (x0, x1, …, x t ,…,x N-1 ), x t Let x be the t-th sample point, 0 ≤ t ≤ N-1; The original energy trace data is transformed using Fourier transform F(⋅), projecting the original energy trace x into the frequency domain to obtain a frequency domain sequence with the same length as the energy trace x. Let X represent the frequency domain sequence of the energy trace x after discrete Fourier transform. = (X0, X1, …,X k ,…,X N-1 ), X k X represents the k-th frequency component, whose spectrum contains information about both amplitude and phase. k ∈C, where C is the set of complex numbers, 0≤k≤N-1; X k The calculation method is as follows: where i is the complex unit, is a natural constant; (1.2.2) Denote the amplitude of the frequency domain sequence X as |X|, then |X| = (|X0|, |X1|, …, |X k |,…, |X N-1 |), |X k | represents the amplitude corresponding to the kth frequency domain component, 0≤k≤N-1; the amplitude |X k of the frequency component X k | is calculated as follows: Wherein, Re(·) is the real part of the complex number, and Im(·) is the imaginary part of the complex number; (1.2.3) where denotes the phase angle of the frequency domain sequence X, then , denotes the phase angle corresponding to the kth frequency domain component, , 0≤k≤N-1, The calculation method of is: Wherein, arctan2() is the inverse tangent function; (1.2.4) to represent the generated energy trace, and performing a discrete Fourier transform projection into the frequency domain to obtain a frequency domain sequence of the same sequence length , ; (1.2.5) To accurately evaluate the loss of the model in the frequency domain, the loss of the amplitude and the phase needs to be calculated respectively; the amplitude loss L amp The calculation method is as follows: the square sum of the amplitude difference between the original sequence and the generated sequence, represents the calculation of the square sum of the second norm, L amp The calculation method is as follows: with representing the generation of an energy trace frequency domain sequence a corresponding sequence of phase angles, a phase loss L phase The calculation method is: (1.2.6) Frequency domain loss term The calculation method is shown as follows: (1.3) Based on the improved reconstruction loss function L recon The loss function L of the autoencoder is as follows: where, is the vector quantization loss, is the commitment loss, z is the feature vector of the energy trace x, e k is the codebook vector, sg(·) is the gradient stop, β is a hyperparameter to balance the weight of the commitment loss.

3. The side-channel analysis method based on frequency domain loss autoencoder data augmentation of claim 2, wherein, Step (2) of constructing an autoencoder model based on the improved loss function, the specific method is as follows: The autoencoder model mainly comprises an encoder, a quantization codebook and a decoder, and the specific construction method is as follows: (2.1) The encoder is used to extract features, which comprises an input layer and three convolutional layers. The input layer is used to receive the energy trace as the initial input, and the energy trace data has a dimension of 1xN, N being the number of energy trace sample points. The first two of the three convolutional layers are used to extract features from the energy trace. The first convolutional layer uses 32 filters and a convolution kernel with a size of 1x3, and the activation function is Relu. The second convolutional layer uses 64 filters and a convolution kernel with a size of 1x3, and the activation function is Relu. The last convolutional layer is used to reduce the dimension of each feature vector to D dimensions, the convolution kernel has a size of 1x1, there are D filters, and D is the dimension of the embedded vector in the quantization codebook; (2.2) A quantization codebook is used to discretize the features extracted by the encoder, defined as a latent space e E R M×D where R is the set of real numbers, M is the number of embedding vectors, each of dimension D, e i is the i-th embedding vector; (2.3) The decoder is used to reconstruct the energy trace, which comprises three deconvolutional layers. The first deconvolutional layer uses 64 filters and a convolution kernel with a size of 1x3, and the activation function is Relu. The second convolutional layer uses 32 filters and a convolution kernel with a size of 1x3, and the activation function is Relu. The third convolutional layer uses 1 filter and a convolution kernel with a size of 1x3 to restore the generated energy trace with the same structure as the original energy trace.

4. The side-channel analysis method based on frequency domain loss autoencoder data augmentation of claim 3, wherein, Step (3) of training the improved autoencoder model using original data, the specific steps are as follows: (3.1) Divide the original energy traces into training set and test set; input the original energy traces x in the training set into the autoencoder model constructed by step (2); (3.2) Extract the features z of the original energy traces x by the encoder; (3.3) In the latent space of the quantized codebook, the nearest neighbor search method is adopted, and z is replaced by the nearest neighbor vector q = e in the codebook m where ; (3.4) The decoder will generate a q reconstruction that is similar to the input sequence x ; (3.5) Calculate the loss value loss of the batch of energy traces according to the loss function based on the frequency domain loss; (3.6) Update the model parameters by back propagation according to the loss value; (3.7) Perform iterative calculation on the model according to the above steps until the model converges, and when the loss value loss<0.05, the model is considered to converge, and the optimal model is saved.

5. The side-channel analysis method based on frequency domain loss autoencoder data augmentation of claim 4, wherein, Step (4) uses the trained model to perform data augmentation, and the specific steps are as follows: (4.1) Input the training set in the original energy traces into the optimal model trained in step (3); (4.2) The output of the decoder of the optimal model is used as new energy trace data; (4.3) Use the label of the original energy trace as the label of the new energy trace.

6. The side-channel analysis method based on frequency domain loss autoencoder data augmentation of claim 5, wherein, Step (5) uses the newly generated energy trace data to perform side channel analysis, and the specific steps are as follows: (5.1) Mix the newly generated energy trace data set into the training set of the original energy traces; (5.2) Build a deep learning side channel analysis model using convolutional neural network and multilayer perception mechanism; (5.3) Input the mixed energy trace data set into the deep learning side channel analysis model for training, and save the optimal model; (5.4) Use the trained deep learning side channel analysis model to predict the key of the test set of the original energy traces, complete the side channel analysis, and evaluate the prediction result.