Efficient leakage detection method and system for secure channel

By using an automatic encoder and a combined loss function method in the AES algorithm side channel leakage detection, the problems of high data samples and low detection efficiency in the prior art are solved, efficient small sample detection is achieved, and the security of the secure channel hardware is ensured.

CN119906587AActive Publication Date: 2025-04-29ZHEJIANG SCI-TECH UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510397147.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-04-29
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

The high demand for the number of data samples in the AES algorithm side channel leakage detection limits the detection efficiency, and data acquisition is limited in actual scenarios, and the prior art has shortcomings in detection efficiency and sample requirements.

Method used

An efficient small sample AES algorithm side channel leakage detection method is adopted. By randomly generating plain text and inputting the encryption device, side channel information is collected in real time, data is reconstructed and denoised using an automatic encoder, and combined with mean square error and maximum mean difference combined loss function, the differences between different data preprocessing operations are reduced, and the machine learning model is trained to evaluate the number of samples required for recovery keys.

Benefits of technology

It realizes efficient side channel leakage detection of the target encryption device when using a small amount of data samples, significantly reduces dependence on a large number of data samples, improves detection efficiency, and ensures the security of the secure channel hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906587A_ABST
    Figure CN119906587A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data transmission, and particularly relates to an efficient leakage detection method and system for a secure channel. The method comprises the following steps: S1, randomly generating a plaintext, inputting the plaintext into encryption equipment, and simultaneously executing an AES encryption process; s2, collecting and storing equipment operation side channel information in real time, and circularly executing the operation of the step S1 to obtain a complete data set; s2, segmenting each collected data sample to extract operation intermediate state leakage information; s3, reconstructing and denoising the segmented data by using an automatic encoder, and reducing the difference between different data preprocessing operations by using an unsupervised pre-adaptation technology; s4, dividing the data into a training data set, a verification data set and an attack data set; training a machine learning model or a newly constructed template model by using the training data set, and evaluating the model performance on the verification data set; and S5, predicting on an attack data set by using the trained model, and evaluating the number of samples required for recovering the key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data transmission, and in particular relates to an efficient leakage detection method and system for a secure channel. Background Art

[0002] With the rapid development of informatization, the application of smart devices and mobile terminals has become more and more extensive. These devices are constantly innovating in terms of operating speed and efficiency, but they are always facing various forms of attack threats such as malicious programs and virus intrusions. The security issues of these products are directly related to security protection and social stability. In order to ensure the security and privacy of data transmission, secure channel technology plays a vital role. As the core of the secure channel, the symmetric encryption algorithm ensures the security of communication through efficient and confidential data transmission. The symmetric encryption algorithm AES has been widely used in various cryptographic devices due to its high efficiency and strong security, from mobile terminals to cloud computing platforms, almost everywhere. However, although the AES algorithm provides strong protection in theory, side channel analysis (SCA) poses a serious threat to its security.

[0003] In this context, how to effectively detect whether there is a leakage problem in the secure channel has become an important research topic in the field of information security. Side channel analysis uses unexpected information (such as power consumption, time delay, and electromagnetic radiation) during the execution of the encryption system to steal keys. This risk does not stem from the mathematical design flaws of the cryptographic algorithm itself, but from the inevitable information leakage in its physical implementation. Through leakage detection based on side channel analysis, researchers can identify and quantify these security vulnerabilities at the physical level, and then develop more robust protection mechanisms to ensure the security of secure channels in practical applications.

[0004] Side channel leaks can be detected by performing side channel analysis on encryption devices and evaluating the strength of the leak based on the data samples needed to recover key information. Based on the evaluation results, the encryption device can be adjusted in reverse to enhance the device's resistance. When performing side channel analysis, attackers usually need to collect a large amount of data from the target device through an oscilloscope. Taking embedded devices that execute the AES algorithm as an example, attackers often need to collect tens of thousands of data samples to effectively recover key information. Subsequently, they will apply non-modeling or modeling algorithms to attack, among which modeling attacks have attracted much attention due to their powerful effects.

[0005] However, the high demand for the number of data samples in existing technologies significantly limits the efficiency of testing. In addition, this high demand does not conform to actual scenarios, because the attacker's control over the target device is usually limited, resulting in limited data collection. At the same time, the AES algorithm consists of a series of repeated sub-operations, and its leakage characteristics show periodic similarities in timing. However, existing technologies often only model and analyze specific bytes in the first or last round, which leads to inefficient information utilization.

[0006] Therefore, there is an urgent need to develop an efficient small-sample AES algorithm side channel leakage detection system and method to effectively overcome the shortcomings of the existing technology in terms of data sample requirements and detection efficiency. Summary of the invention

[0007] The present invention aims to overcome the problems of high data sample requirements and low detection efficiency in the existing security channel leakage detection methods in the prior art, and provides an efficient leakage detection method and system for a secure channel that can achieve efficient side channel leakage detection of a target encryption device using a small amount of data samples and effectively ensure the security of the secure channel hardware.

[0008] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions: An efficient leakage detection method for a secure channel comprises the following steps; S1, randomly generate plain text and input it into the encryption device, while executing the AES encryption process; collect and save the side channel information of the device operation in real time, and execute step S1 operation repeatedly to obtain a complete data set; S2, split each collected data sample according to different rounds, operations and bytes to extract the leakage information of the intermediate state of operation; S3, uses an autoencoder to reconstruct and denoise the segmented data, and combines the mean square error and maximum mean difference joint loss function to reduce the differences between different data preprocessing operations; S4, divide the preprocessed data into a training data set, a validation data set, and an attack data set; use the training data set to train a machine learning model or a newly constructed template model, and evaluate the model performance on the validation data set; S5, use the trained model to make predictions on the attack dataset and evaluate the number of samples required to recover the key.

[0009] Preferably, step S2 comprises the following steps: S21, considering that the AES algorithm operation leakage exists in the round key addition and byte replacement stages, it is set to split a data sample of the AES128 algorithm into 1*16*1+10*16*2 traces; where 1, 16, and 1 in 1*16*1 represent rounds, bytes, and operations respectively; and 10, 16, and 2 in 10*16*2 represent rounds, bytes, and operations respectively; S22, the formula for setting the round key plus the state value is expressed as: ; in, Represents the status value, represents the exclusive-or operation, represents the round key, Represents byte index; The formula for setting the byte replacement status value is expressed as: ; in, Represents S-box operation.

[0010] Preferably, in step S3, the autoencoder is an unsupervised learning model for learning an efficient representation of input data; The automatic encoder comprises an encoder and a decoder; The encoder maps the input data into a latent space, generates a low-dimensional feature representation, and simultaneously extracts key features and removes redundant information; The decoder is responsible for remapping the latent representation back to the original data space, completing the reconstruction of the input data.

[0011] Preferably, step S3 comprises the following steps: S31, using mean square error MSE as reconstruction loss, the specific formula is: ; in, is the total number of data points, is the actual value, is the predicted value; S32, introduces the maximum mean difference MMD as a loss function to quantify the difference between the two data distributions of round key addition and byte replacement; MMD promotes the alignment of feature space by measuring the mean difference of the data generated by round key addition and byte replacement operations in high-dimensional space, thereby making the data from different operations tend to be consistent in feature distribution; the specific formula of the maximum mean difference MMD is as follows: ; in, and are data samples from two different distributions, and are the sizes of the two sample sets, represents the kernel function, represents the norm of a vector; S33, optimizes the MSE and MMD loss functions simultaneously, so that the autoencoder can effectively perform data denoising and reconstruction; the total loss function of the autoencoder The specific expressions are as follows: ; in, Represents the weight coefficient, which is used to control the balance between reconstruction accuracy and data distribution consistency.

[0012] Preferably, step S4 comprises the following steps: S41, labels are created for data samples, which are divided into the following two forms: Based on the ID model: directly use the state value as the label to classify the data samples; considering that the state value ranges from 0 to 255, the data samples are divided into 256 categories; Based on the HW model: the Hamming weight of the state value is used as the label; the Hamming weight refers to the number of bits that are 1 in the binary representation. According to the value of the Hamming weight, the samples are divided into 9 categories; S42, after completing labeling, divide the data samples into three different data sets: training data set, verification data set and attack data set; The training data set is used for model learning and parameter optimization; the validation data set is used for model hyperparameter adjustment and performance evaluation; the attack data set is used to test the effect and robustness of the model in actual attack scenarios; S43, training the model using the training data set; in the model training stage, choosing to build a template model or adopt a machine learning model; Among them, the template model generates feature templates through statistical analysis of training data, which is used to handle simple classification tasks; the machine learning model is used to process complex feature relationships and is suitable for large-scale data and high-dimensional features.

[0013] Preferably, step S5 comprises the following steps: S51, use the trained model to make predictions on the attack data set, and obtain the posterior probability distribution of each data sample on all label categories. According to the input plaintext, the label probability distribution is converted into the posterior probability of the corresponding key, and used as the score distribution of each key; S52, sum the scores of each data sample corresponding to the key to obtain the total score of each key category; the total score distribution of each key category reflects the model's confidence in each key. The higher the score, the more likely the prediction result is the corresponding key. The specific process is expressed by the following formula: ; in, Indicates the key Total score, is a given sample Time Key The posterior probability of is the total number of samples in the attack dataset.

[0014] The present invention also provides an efficient leakage detection system for a secure channel, comprising: The data acquisition module is used to randomly generate plain text and input it into the encryption device while executing the AES encryption process; it collects and saves the side channel information of the device in real time, and executes the data acquisition module operation cyclically to obtain a complete data set; The data segmentation module is used to segment each collected data sample according to different rounds, operations and bytes to extract the leakage information of the intermediate state of operation; The data preprocessing module is used to reconstruct and denoise the segmented data using an autoencoder and use unsupervised pre-adaptation techniques to reduce the differences between different data preprocessing operations; The model training module is used to divide the preprocessed data into a training data set, a validation data set, and an attack data set; use the training data set to train the machine learning model or the newly constructed template model, and evaluate the model performance on the validation data set; The leakage assessment module is used to use the trained model to make predictions on the attack dataset and estimate the number of samples required to recover the key.

[0015] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention proposes a single-byte modeling side channel analysis method, which uses cross-leakage technology to fully utilize the information of a trace; by segmenting long traces according to different rounds, operations and bytes, the leakage information of the intermediate state can be effectively extracted, thereby improving the modeling efficiency; (2) The present invention introduces an autoencoder as a data preprocessing tool; using its powerful dimensionality reduction and reconstruction capabilities, the segmented traces are denoised and data differences are eliminated; this process significantly improves the learning effect of the attack model, enabling it to more accurately identify and extract key features; (3) The method designed by the present invention enables effective modeling to be achieved with only hundreds or even dozens of data samples, significantly reducing the dependence on a large number of data samples, thereby achieving efficient side channel leakage detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flow chart of the structure of the efficient leakage detection method for the secure channel in the present invention; Figure 2A schematic diagram of an operation of data cutting in the present invention; Figure 3 A schematic diagram of a result after data preprocessing of a data sample in the present invention; Figure 4 A schematic diagram of a model structure of the automatic encoder in the present invention; Figure 5 This is an output probability result diagram of the model in the present invention for a certain byte of the key. DETAILED DESCRIPTION

[0017] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.

[0018] like Figure 1 As shown, the present invention provides an efficient leakage detection method for a secure channel, comprising the following steps: 1. Data collection: Randomly generate plain text and input it into the encryption device to perform the AES encryption process. Then collect and save the device operation side channel information in real time, and perform this operation repeatedly to form a complete data set.

[0019] 2. Data segmentation: Segment each collected data sample according to different rounds, operations, and bytes to extract the leakage information of the intermediate running state.

[0020] 3. Data preprocessing: Use an autoencoder to reconstruct and denoise the cut data, and combine the mean square error and maximum mean difference joint loss function to reduce the differences between different operations, improve data quality and consistency, and facilitate subsequent analysis.

[0021] 4. Attack model training: Divide the processed data into training data set, validation data set and attack data set. Use the training data set to train the machine learning model or build a template, and evaluate the model performance on the validation data set.

[0022] 5. Leakage evaluation: Make predictions on the attack dataset and evaluate the number of samples required to recover the key.

[0023] In addition, the present invention also provides an efficient leakage detection system for a secure channel, comprising: The data acquisition module is used to randomly generate plain text and input it into the encryption device while executing the AES encryption process; it collects and saves the side channel information of the device in real time, and executes the data acquisition module operation cyclically to obtain a complete data set; The data segmentation module is used to segment each collected data sample according to different rounds, operations and bytes to extract the leakage information of the intermediate state of operation; The data preprocessing module is used to reconstruct and denoise the segmented data using an autoencoder and use unsupervised pre-adaptation techniques to reduce the differences between different data preprocessing operations; The model training module is used to divide the preprocessed data into a training data set, a validation data set, and an attack data set; use the training data set to train the machine learning model or the newly constructed template model, and evaluate the model performance on the validation data set; The leakage assessment module is used to use the trained model to make predictions on the attack dataset and estimate the number of samples required to recover the key.

[0024] Based on the technical solution of the present invention, the implementation process of the present invention in practical application is illustrated by the following case scenario, and the specific application implementation plan is as follows: Taking the electromagnetic leakage generated during the operation of the Stm32F303 development board as an example, the system components include an oscilloscope, an electromagnetic probe, a PC terminal, an amplifier, etc. The specific implementation steps are as follows: 1. Data acquisition: First, connect the oscilloscope, development board and PC via USB cable. Connect channel 1 of the oscilloscope to the amplifier and the electromagnetic probe, and connect channel 2 to the trigger pin of the development board. Next, configure the parameters of the oscilloscope, set the sampling rate to 500 Msa / s (higher than the chip operating frequency), and set channel 2 as the trigger source to ensure accurate signal capture. The electromagnetic probe should be positioned above the chip to effectively collect the signal. Subsequently, the PC randomly generates plaintext and transmits it to the development board. After receiving the data, the development board first reverses the trigger pin to start the encryption process, and then reverses the trigger pin again after the encryption is completed. When the oscilloscope receives the trigger signal from the development board, the system will save the signal data for that time period and send it to the PC for storage and subsequent analysis. Repeat this process until enough data samples are collected.

[0025] 2. Data segmentation: The AES algorithm consists of a series of identical sub-operations, and its timing signal shows obvious periodic characteristics. For each collected data sample, it is divided according to different rounds, operations, and bytes. This process can be analyzed by calculating all state values ​​and calculating the Pearson correlation coefficient with the data sample to determine the specific leakage location. Since AES operation leakage mainly exists in the round key addition and byte replacement stages, a data sample of the AES128 algorithm can be split into 1 (round) * 16 (bytes) * 1 (operation) + 10 (round) * 16 (bytes) * 2 (operation) traces. This process is as follows Figure 2The left side is the original trace, while the right side is the data sample obtained by splitting according to the characteristics of the AES algorithm.

[0026] The round key plus state value formula can be expressed as: ; in, Represents the status value, represents the exclusive-or operation, represents the round key, Represents the byte index. The byte replacement state value formula can be expressed as: ; in, Represents the status value, represents S-box operation, Represents a byte index.

[0027] 3. Data preprocessing: After data segmentation, the obtained samples contain data from two different types of operations: round key addition and byte replacement. The data generated by these two operations have significant differences in feature distribution, so they can be regarded as two different domains. The data itself is affected by external factors such as noise and acquisition process. Even data from different rounds or different bytes under the same operation have slight differences. Therefore, in the data preprocessing process of this step, the data samples obtained after data segmentation are first divided into two groups of samples according to the operation type. Then the two groups of samples are input into the autoencoder at the same time, and the corresponding representation vectors are obtained in the same high-dimensional space through its reconstruction and approximation capabilities. The obtained representation vectors can be compared and analyzed in the same high-dimensional space, thereby providing support for subsequent classification tasks. Figure 3 The results before and after the data sample processing in this step are shown. The leftmost data sample is the round key plus leakage trace, and the middle part is the byte replacement leakage trace. Due to the different operations, the two show different leakage characteristics. However, after data preprocessing, they are mapped to the same space.

[0028] An autoencoder is an unsupervised learning model that aims to learn an efficient representation of input data. It mainly consists of two parts: an encoder and a decoder. Its structure is as follows: Figure 4 As shown. The encoder maps the input data to the latent space, generates a low-dimensional feature representation, extracts key features and removes redundant information; the decoder is responsible for remapping the latent representation back to the original data space, with the goal of reconstructing the input data as accurately as possible. In this process, the mean square error (MSE) is first used as the reconstruction loss. MSE is used to quantify the difference between the reconstructed data and the original input data, thereby ensuring that the autoencoder effectively retains the original features of the data during the reconstruction process and reduces the reconstruction error. The specific formula is as follows: ; in, is the total number of data points, is the actual value, is the predicted value. Secondly, the Maximum Mean Discrepancy (MMD) is introduced as a loss function to quantify the difference between the two data distributions. MMD promotes the alignment of feature space by measuring the mean difference of the data generated by round key addition and byte replacement operations in high-dimensional space, thereby making the data from different operations tend to be consistent in feature distribution. Its formula is as follows: ; in, and are data samples from two different distributions, and are the sizes of the two sample sets, represents the kernel function, Represents the norm of the vector. By optimizing the MSE and MMD loss functions simultaneously, the autoencoder can effectively denoise and reconstruct data, improving the quality and consistency of the data. The total loss function of the autoencoder can be expressed as follows: ; in, Represents the weight coefficient, which is used to control the balance between reconstruction accuracy and data distribution consistency.

[0029] 4. Attack model training: Labeling data samples is a key step in side channel analysis and can be divided into two forms: ID-based model: This method directly uses the state value as a label to classify the data. Since the state value ranges from 0 to 255, the samples can be divided into 256 categories.

[0030] Based on the HW model: Use the Hamming weight of the state value as the label. The Hamming weight refers to the number of bits that are 1 in the binary representation, so according to the value of the Hamming weight, the samples can be divided into 9 categories.

[0031] After labeling is completed, the data samples are divided into three different data sets: training data set, validation data set, and attack data set. The training data set is used for model learning and parameter optimization; the validation data set is used for model hyperparameter adjustment and performance evaluation; the attack data set is used to test the effect and robustness of the model in actual attack scenarios. During the model training phase, you can choose to build a template model or use a machine learning model. The template model generates feature templates through statistical analysis of training data and is suitable for processing relatively simple classification tasks. Machine learning models (such as support vector machines, random forests, etc.) and deep learning models (such as convolutional neural networks, recurrent neural networks, etc.) can handle more complex feature relationships and are suitable for large-scale data and high-dimensional features.

[0032] 5. Leakage assessment: Use the trained model to make predictions on the attack dataset to obtain the posterior probability distribution of each data sample on all label categories, convert it into the posterior probability of the corresponding key based on the input plaintext, and use it as the score distribution of each key. Figure 5 The probability corresponding to each value of the first byte of the key is shown in . The horizontal axis represents the low-order value of the byte, and the vertical axis represents the high-order value. By adding up the corresponding key of each sample score, we can get the total score of each key category. These score distributions reflect the model's confidence in each key. The higher the score, the more likely the predicted result is the key. This process can be expressed as the following formula: ; in, Indicates the key Total score, is a given sample Time Key The posterior probability of is the total number of samples in the attack data set. When the prediction function of the model is normal, the summation process of the key scores is essentially an entropy reduction process. In this process, the score of the correct key gradually becomes significantly higher than the scores of other keys. Entropy is a measure of system uncertainty. The faster the rate of reduction of entropy, the faster the model can converge to the correct key, which usually reflects the stronger side channel information leakage of the device.

[0033] The innovative features of the present invention are as follows: 1. The present invention proposes a single-byte modeling side channel analysis method, which uses cross-leakage technology to fully utilize the information of a trace; by segmenting the long trace according to different rounds, operations and bytes, the leakage information of the intermediate state can be effectively extracted, thereby improving the modeling efficiency; 2. The present invention introduces an autoencoder as a data preprocessing tool; using its powerful dimensionality reduction and reconstruction capabilities, the segmented traces are denoised and data differences are eliminated; this process significantly improves the learning effect of the attack model, enabling it to more accurately identify and extract key features; 3. The method designed in the present invention enables effective modeling with only hundreds or even dozens of data samples, significantly reducing the dependence on a large number of data samples, thereby achieving efficient side channel leakage detection.

[0034] The above description is only a detailed description of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, according to the ideas provided by the present invention, there will be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.

Claims

1. An efficient leakage detection method for a secure channel, characterized in that: The method comprises the following steps: S1, randomly generate plain text and input it into the encryption device, while executing the AES encryption process; collect and save the side channel information of the device operation in real time, and execute step S1 operation repeatedly to obtain a complete data set; S2, split each collected data sample according to different rounds, operations and bytes to extract the leakage information of the intermediate state of operation; S3, uses an autoencoder to reconstruct and denoise the segmented data, and combines the mean square error and maximum mean difference joint loss function to reduce the differences between different data preprocessing operations; S4, divide the preprocessed data into a training data set, a validation data set, and an attack data set; use the training data set to train a machine learning model or a newly constructed template model, and evaluate the model performance on the validation data set; S5, use the trained model to make predictions on the attack dataset and evaluate the number of samples required to recover the key.

2. The efficient leakage detection method for a secure channel according to claim 1, characterized in that: Step S2 includes the following steps: S21, considering that the AES algorithm operation leakage exists in the round key addition and byte replacement stages, it is set to split a data sample of the AES128 algorithm into 1*16*1+10*16*2 traces; where 1, 16, and 1 in 1*16*1 represent rounds, bytes, and operations respectively; and 10, 16, and 2 in 10*16*2 represent rounds, bytes, and operations respectively; S22, the formula for setting the round key plus the state value is expressed as: ; in, Represents the status value, represents the exclusive-or operation, represents the round key, Represents byte index; The formula for setting the byte replacement status value is expressed as: ; in, Represents S-box operation.

3. The efficient leakage detection method for a secure channel according to claim 2, characterized in that: In step S3, the autoencoder is an unsupervised learning model for learning an efficient representation of input data; The automatic encoder comprises an encoder and a decoder; The encoder maps the input data into a latent space, generates a low-dimensional feature representation, and simultaneously extracts key features and removes redundant information; The decoder is responsible for remapping the latent representation back to the original data space, completing the reconstruction of the input data.

4. The efficient leakage detection method for a secure channel according to claim 3, characterized in that: Step S3 includes the following steps: S31, using mean square error MSE as reconstruction loss, the specific formula is: ; in, is the total number of data points, is the actual value, is the predicted value; S32, introduces the maximum mean difference MMD as a loss function to quantify the difference between the two data distributions of round key addition and byte replacement; MMD promotes the alignment of feature space by measuring the mean difference of the data generated by round key addition and byte replacement operations in high-dimensional space, thereby making the data from different operations tend to be consistent in feature distribution; the specific formula of the maximum mean difference MMD is as follows: ; in, and are data samples from two different distributions, and are the sizes of the two sample sets, represents the kernel function, represents the norm of a vector; S33, optimizes the MSE and MMD loss functions simultaneously, so that the autoencoder can effectively perform data denoising and reconstruction; the total loss function of the autoencoder The specific expressions are as follows: ; in, Represents the weight coefficient, which is used to control the balance between reconstruction accuracy and data distribution consistency.

5. The efficient leakage detection method for a secure channel according to claim 4, characterized in that: Step S4 includes the following steps: S41, labels are created for data samples, which are divided into the following two forms: Based on the ID model: directly use the state value as the label to classify the data samples; considering that the state value ranges from 0 to 255, the data samples are divided into 256 categories; Based on the HW model: the Hamming weight of the state value is used as the label; the Hamming weight refers to the number of bits that are 1 in the binary representation. According to the value of the Hamming weight, the samples are divided into 9 categories; S42, after completing labeling, divide the data samples into three different data sets: a training data set, a validation data set, and an attack data set; The training data set is used for model learning and parameter optimization; The validation dataset is used for hyperparameter adjustment and performance evaluation of the model; the attack dataset is used to test the effect and robustness of the model in actual attack scenarios; S43, training the model using the training data set; in the model training stage, choosing to build a template model or adopt a machine learning model; Among them, the template model generates feature templates through statistical analysis of training data, which is used to handle simple classification tasks; Machine learning models are used to process complex feature relationships and are suitable for large-scale data and high-dimensional features.

6. The efficient leakage detection method for a secure channel according to claim 5, characterized in that: Step S5 includes the following steps: S51, use the trained model to make predictions on the attack data set, and obtain the posterior probability distribution of each data sample on all label categories. According to the input plaintext, the label probability distribution is converted into the posterior probability of the corresponding key, and used as the score distribution of each key; S52, sum the scores of each data sample corresponding to the key to obtain the total score of each key category; the total score distribution of each key category reflects the model's confidence in each key. The higher the score, the more likely the prediction result is the corresponding key. The specific process is expressed by the following formula: ; in, Indicates the key Total score, is a given sample Time Key The posterior probability of is the total number of samples in the attack dataset.

7. An efficient leakage detection system for a secure channel, used to implement the efficient leakage detection method for a secure channel according to any one of claims 1 to 6, characterized in that: The efficient leakage detection system for a secure channel comprises: The data acquisition module is used to randomly generate plain text and input it into the encryption device while executing the AES encryption process; it collects and saves the side channel information of the device in real time, and executes the data acquisition module operation cyclically to obtain a complete data set; The data segmentation module is used to segment each collected data sample according to different rounds, operations and bytes to extract the leakage information of the intermediate state of operation; The data preprocessing module is used to reconstruct and denoise the segmented data using an autoencoder and use unsupervised pre-adaptation techniques to reduce the differences between different data preprocessing operations; The model training module is used to divide the preprocessed data into a training data set, a validation data set, and an attack data set; use the training data set to train the machine learning model or the newly constructed template model, and evaluate the model performance on the validation data set; The leakage assessment module is used to use the trained model to make predictions on the attack dataset and estimate the number of samples required to recover the key.

Citation Information

Patent Citations

  • Chip electromagnetic side channel analysis method and system and storage medium

    CN116260565A

  • Side channel analysis method based on multi-loss regularization noise reduction automatic encoder

    CN117040722A

  • Deep learning side channel analysis method for efficiently recovering secret key

    CN119276461A

  • Cipher chip simple energy analysis enhancement method and equipment

    CN119583039A