Hardware Trojan horse detection method, device and equipment, medium and program product

By obtaining the chip power consumption curve, extracting dynamic power consumption data and using training models for detection, the existing hardware Trojan detection problems are solved, and efficient and accurate Trojan detection is achieved.

CN120296732APending Publication Date: 2025-07-11CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510266802.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing hardware Trojan detection methods are costly, long time, and destructive to the chip. It is difficult to activate Trojans for functional testing, and the detection efficiency and accuracy are insufficient.

Method used

By obtaining the power consumption curve of the target chip, dynamic power consumption data are extracted and feature extraction is performed, and the pre-trained Trojan detection model is used for detection.

Benefits of technology

It improves the efficiency and accuracy of hardware Trojan detection, reduces data processing volume, and achieves fast and accurate Trojan detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296732A_ABST
    Figure CN120296732A_ABST
Patent Text Reader

Abstract

The invention relates to a hardware Trojan horse detection method and device, equipment, a medium and a program product. The hardware Trojan horse detection method comprises the steps of obtaining a power consumption curve of a target chip; extracting dynamic power consumption data of the target chip from the power consumption curve; extracting power consumption characteristic data in the dynamic power consumption data; and inputting the power consumption characteristic data into a pre-trained Trojan horse detection model to obtain a Trojan horse detection result of the target chip. Through the method, whether the Trojan horse exists in the target chip or not can be quickly and accurately judged, and Trojan horse detection efficiency and detection accuracy of the target chip can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Trojan detection, and particularly to a hardware Trojan detection method, device, equipment, medium and program product. Background Art

[0002] With the rapid development of integrated circuit technology, the attack threat of hardware Trojans has become increasingly significant. A hardware Trojan is a malicious circuit that can quietly change the function and performance of the original circuit and even steal sensitive information. When an integrated circuit implanted with a hardware Trojan is applied in a high-security requirement field, it will pose a greater security threat. Therefore, before a chip is used, it is usually subjected to security detection to ensure that the chip has not been implanted with a Trojan.

[0003] Traditional hardware Trojan detection methods can detect hardware Trojans by using failure analysis or functional testing. Among them, failure analysis detects hardware Trojans by delaminating and photographing the chip to obtain pictures of each layer of the chip and comparing them with the original layout. This method has a high detection cost, a long detection time, and is destructive to the chip; functional testing determines whether there is a hardware Trojan in the chip by applying test vectors at the input end of the chip and observing whether the output is consistent with the specification. This method has a low cost, but there is a possibility that the test vectors are difficult to activate the Trojan, and the detection time is also long. Summary of the Invention

[0004] Based on this, it is necessary to provide a hardware Trojan detection method, device, equipment, medium and program product for the above technical problems, so as to improve the detection efficiency and accuracy of hardware Trojans.

[0005] In a first aspect, the present application provides a hardware Trojan detection method, including:

[0006] Obtaining a power consumption curve of a target chip;

[0007] Extracting dynamic power consumption data of the target chip from the power consumption curve;

[0008] Extracting power consumption feature data from the dynamic power consumption data;

[0009] Inputting the power consumption feature data into a pre-trained Trojan detection model to obtain a Trojan detection result of the target chip.

[0010] In one embodiment, extracting the dynamic power consumption data of the target chip from the power consumption curve includes: determining key sampling moments corresponding to the dynamic power consumption data; and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moments.

[0011] In one embodiment, determining the key sampling moments corresponding to the dynamic power consumption data includes: obtaining the clock signal of the target chip; determining the first time points corresponding to the rising edges and / or falling edges in the clock signal; and using the first time points as the key sampling moments.

[0012] In one embodiment, determining the key sampling moments corresponding to the dynamic power consumption data includes: determining the second time points corresponding to the positive peaks in the power consumption curve; and using the second time points as the key sampling moments.

[0013] In one embodiment, extracting the dynamic power consumption data of the target chip from the power consumption curve includes: determining the data extraction period corresponding to the key sampling moments according to a preset time window; and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0014] In one embodiment, the Trojan detection model is trained in the following manner: obtaining training samples and the sample categories to which the training samples belong; the sample categories include the category with Trojans and / or the category without Trojans, and the training samples include the sample dynamic power consumption data of sample chips; extracting sample feature data from the training samples according to a feature extraction model; using the sample feature data as the model input and the sample categories to which the training samples belong as labels to perform model training on a pre-constructed Trojan detection model.

[0015] In a second aspect, the present application further provides a hardware Trojan detection device, including:

[0016] An acquisition module, configured to acquire the power consumption curve of the target chip;

[0017] A first extraction module, configured to extract the dynamic power consumption data of the target chip from the power consumption curve;

[0018] A second extraction module, configured to extract the power consumption feature data from the dynamic power consumption data;

[0019] An input module, configured to input the power consumption feature data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0020] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0021] Acquire the power consumption curve of the target chip;

[0022] Extract the dynamic power consumption data of the target chip from the power consumption curve;

[0023] Extract the power consumption feature data from the dynamic power consumption data;

[0024] Input the power consumption characteristic data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0025] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0026] Obtain the power consumption curve of the target chip;

[0027] Extract the dynamic power consumption data of the target chip from the power consumption curve;

[0028] Extract the power consumption characteristic data from the dynamic power consumption data;

[0029] Input the power consumption characteristic data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0030] Fifthly, the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0031] Obtain the power consumption curve of the target chip;

[0032] Extract the dynamic power consumption data of the target chip from the power consumption curve;

[0033] Extract the power consumption characteristic data from the dynamic power consumption data;

[0034] Input the power consumption characteristic data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0035] The above hardware Trojan detection method, device, equipment, medium and program product can comprehensively monitor the power consumption of the target chip in different working states by obtaining the power consumption curve of the target chip, providing a data basis for subsequent Trojan detection. By extracting the dynamic power consumption data of the target chip from the power consumption curve, the data processing volume can be reduced and the detection efficiency can be improved on the basis of meeting the accuracy of Trojan detection. By extracting the power consumption characteristic data from the dynamic power consumption data and inputting the power consumption characteristic data into a pre-trained Trojan detection model, it can be quickly and accurately determined whether there is a Trojan in the target chip, which is beneficial to improving the Trojan detection efficiency and detection accuracy of the target chip. Description of the Drawings

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present application or related technologies. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0037] Figure 1A It is a schematic flowchart of a hardware Trojan detection method in an embodiment;

[0038] Figure 1B It is a schematic diagram of the model structure of a convolutional neural network model in an embodiment;

[0039] Figure 2 It is a schematic flowchart of the dynamic power consumption data extraction step in an embodiment;

[0040] Figure 3 It is a schematic flowchart of a hardware Trojan detection method in another embodiment;

[0041] Figure 4 It is a structural block diagram of a hardware Trojan detection device in an embodiment;

[0042] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0043] In order to make the purpose, technical solutions and advantages of the present application more clear, the following further details the present application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] In one embodiment, as Figure 1A shown, a hardware Trojan detection method is provided. In this embodiment, it is exemplified that the method is applied to a terminal. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is realized through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0045] S110. Obtain the power consumption curve of the target chip.

[0046] Among them, the power consumption curve of the target chip is used to characterize the power consumption change of the target chip within a preset time period. Exemplarily, the abscissa of the power consumption curve can represent time, and the ordinate can represent the power consumption of the target chip at the corresponding time. Exemplarily, by switching the working state of the target chip, the energy consumption of the target chip in different working states can be collected.

[0047] Optionally, the power consumption curve of the target chip can be obtained by collecting it with an oscilloscope. Exemplarily, a precision resistor can be connected in series to the power supply of the target chip, or connected to the ground terminal of the target chip, and the oscilloscope collects the voltage across the precision resistor, thereby obtaining the power consumption curve of the target chip.

[0048] S120. Extract the dynamic power consumption data of the target chip from the power consumption curve.

[0049] Among them, the power consumption curve contains static power consumption data and dynamic power consumption data. Exemplarily, the static power consumption data can be understood as the power consumption data when the chip is in the standby state or the stable state (without signal inversion or state transition). Correspondingly, the dynamic power consumption data can be understood as the power consumption data when the chip is in the working state (with signal inversion or transistor switching operation).

[0050] It can be understood that the static power consumption amplitude is often small and is easily affected by the oscilloscope resolution display, so that the static power consumption data often contains a large amount of noise and has a low signal-to-noise ratio; while the dynamic data amplitude is large and is less affected by measurement noise, and has a high signal-to-noise ratio. By deeply exploring the characteristics of hardware Trojans and combining the data characteristics of static power consumption data and dynamic power consumption data itself, this application finally uses the dynamic power consumption data as the data basis for hardware Trojan detection, thereby being able to improve the signal-to-noise ratio, reduce the amount of input data, and can more clearly distinguish whether there is a hardware Trojan in the chip.

[0051] In an optional embodiment, the key sampling moment corresponding to the positive peak value of the power consumption curve can be determined, and centered on the key sampling moment, a preset number of data points before and after the key sampling moment are collected as the dynamic power consumption data. In another optional embodiment, a clock signal can be introduced to assist in determining the dynamic power consumption data. Exemplarily, the key sampling moment corresponding to the rising edge and / or falling edge of the clock signal can be determined, and centered on the key sampling moment, a preset number of data points before and after the key sampling moment are collected as the dynamic power consumption data.

[0052] Optionally, a time window can be preset, and according to the preset time window and the key sampling moment, the dynamic power consumption data in the power consumption curve is collected.

[0053] S130. Extract the power consumption feature data from the dynamic power consumption data.

[0054] Among them, the power consumption feature data can be understood as the key information used to characterize the dynamic power consumption characteristics of the target chip.

[0055] In an optional embodiment, the dynamic power consumption data can be input into a pre-trained feature extraction model to obtain the power consumption feature data. In another optional embodiment, feature analysis can be performed on the dynamic power consumption data to extract the power consumption feature data from the dynamic power consumption data.

[0056] Optionally, the feature extraction model can be a Convolutional Neural Networks (CNN) model. Among them, Figure 1B The model structure of the convolutional neural network model is shown, which successively includes: a 3*1 convolutional layer with 16 channels, a batch normalization layer, a 5*1 convolutional layer with 32 channels, a batch normalization layer, an 8*1 average pooling layer, a 16*1 convolutional layer with 64 channels, a batch normalization layer, a 32*1 convolutional layer with 128 channels, a batch normalization layer, a 4*1 max pooling layer, a 64*1 convolutional layer with 256 channels, a batch normalization layer, and a fully connected layer with 8 channels. Among them, the power consumption feature data is output by the fully connected layer.

[0057] Exemplarily, the ReLU (Rectified Linear Unit) function can be used as the activation function after each of the above batch normalization layers.

[0058] Exemplarily, the pre-constructed feature extraction model can be trained based on the sample dynamic power consumption data. Among them, the sample dynamic power consumption data can be extracted from the sample power consumption curve of the sample chip.

[0059] S140. Input the power consumption feature data into the pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0060] Among them, the Trojan detection result can include that there is a hardware Trojan in the target chip and that there is no hardware Trojan in the target chip.

[0061] In an optional embodiment, the Trojan detection model can be an SVM (Support Vector Machine) model.

[0062] Optionally, the Trojan detection model can be a one-class SVM model. Exemplarily, the SVM model can classify the power consumption feature data. One class is outside the decision boundary, which is used to represent that there is a Trojan in the target chip, and the other is inside the decision boundary, which is used to represent that there is no Trojan in the target chip.

[0063] In an optional embodiment, the Trojan detection model is trained in the following manner: obtain training samples and the sample categories to which the training samples belong; the sample categories include the presence of Trojan categories and / or the absence of Trojan categories, and the training samples include the sample dynamic power consumption data of sample chips; perform feature extraction on the training samples according to the feature extraction model to obtain sample feature data; use the sample feature data as the model input and the sample categories to which the training samples belong as labels to perform model training on the pre-constructed Trojan detection model. Among them, the sample dynamic power consumption data is extracted from the sample power consumption curve of the sample chip. The present application does not make any limitation on the specific training method of the SVM model.

[0064] Exemplarily, the sample categories may include the absence of Trojan categories. Correspondingly, the training samples may include the sample dynamic power consumption data corresponding to the Trojan-free sample chips. At this time, the Trojan detection model may be a one-class SVM model.

[0065] Exemplarily, the sample categories may include Trojan categories and the absence of Trojan categories. Correspondingly, the training samples may include the sample dynamic power consumption data corresponding to the Trojan-infected sample chips and the sample dynamic power consumption data corresponding to the Trojan-free sample chips.

[0066] The above hardware Trojan detection method can comprehensively monitor the power consumption of the target chip in different working states by obtaining the power consumption curve of the target chip, providing a data basis for subsequent Trojan detection. By extracting the dynamic power consumption data of the target chip from the power consumption curve, the data processing volume can be reduced and the detection efficiency can be improved on the basis of meeting the accuracy of Trojan detection. By extracting the power consumption feature data from the dynamic power consumption data and inputting the power consumption feature data into the pre-trained Trojan detection model, it can be quickly and accurately determined whether the target chip has a Trojan, which is beneficial to improving the Trojan detection efficiency and detection accuracy of the target chip.

[0067] On the basis of the technical solutions of the above embodiments, the present application also provides an optional embodiment, in which the extraction steps of the dynamic power consumption data are refined.

[0068] See Figure 2 The extraction steps of the dynamic power consumption data shown include:

[0069] S210. Determine the key sampling moments corresponding to the dynamic power consumption data.

[0070] In an optional embodiment, the clock signal of the target chip may be obtained; the first time points corresponding to the rising edge and / or falling edge in the clock signal are determined; and the first time points are used as the key sampling moments.

[0071] In another alternative embodiment, a second time point corresponding to the positive peak in the power consumption curve may be determined; and the second time point is used as the key sampling moment.

[0072] S220. Extract the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moment.

[0073] In an alternative embodiment, the data corresponding to the key sampling moment in the power consumption curve may be used as the dynamic power consumption data of the target chip.

[0074] In another alternative embodiment, the data points with a preset number before and after the key sampling moment in the power consumption curve may be used as the dynamic power consumption data of the target chip.

[0075] In yet another alternative embodiment, a data extraction period corresponding to the key sampling moment may be determined according to a preset time window; and the dynamic power consumption data of the target chip is extracted from the power consumption curve according to the data extraction period. Wherein, the preset time window can be set by those skilled in the art according to needs or experience, or determined through a large number of experiments, and the present application does not make any limitation thereto.

[0076] In the above steps, by determining the key sampling moment corresponding to the dynamic power consumption data, and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moment, the dynamic power consumption data can be extracted more accurately, and at the same time, it is also beneficial to improve the extraction efficiency.

[0077] Based on the technical solutions of the above embodiments, the present application also provides an alternative embodiment, in which the hardware Trojan detection method is described in detail.

[0078] See Figure 3 The shown hardware Trojan detection method includes:

[0079] S310. Obtain the power consumption curve of the target chip.

[0080] S320. Obtain the clock signal of the target chip.

[0081] S330. Determine the first time point corresponding to the rising edge and / or falling edge in the clock signal.

[0082] S340. Use the first time point as the key sampling moment.

[0083] S350. Determine the data extraction period corresponding to the key sampling moment according to a preset time window.

[0084] S360. Extract the dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0085] S370. Extract power consumption feature data from the dynamic power consumption data.

[0086] S380. Input the power consumption feature data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0087] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0088] Based on the same inventive concept, the embodiments of the present application also provide a hardware Trojan detection device for implementing the above-mentioned hardware Trojan detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following hardware Trojan detection device can refer to the limitations on the hardware Trojan detection method in the above text, and will not be repeated here.

[0089] In an exemplary embodiment, as Figure 4 shown, a hardware Trojan detection device is provided, including: an acquisition module 410, a first extraction module 420, a second extraction module 430, and an input module 440, where:

[0090] The acquisition module 410 is used to acquire the power consumption curve of the target chip.

[0091] The first extraction module 420 is used to extract the dynamic power consumption data of the target chip from the power consumption curve.

[0092] The second extraction module 430 is used to extract the power consumption feature data from the dynamic power consumption data.

[0093] The input module 440 is used to input the power consumption feature data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

[0094] In one embodiment, the first extraction module 420 includes: a first determination unit for determining the key sampling moments corresponding to the dynamic power consumption data; a first extraction unit for extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moments.

[0095] In one embodiment, the first determination unit includes: a first acquisition subunit, configured to acquire a clock signal of a target chip; a first determination subunit, configured to determine a first time point corresponding to a rising edge and / or a falling edge in the clock signal; and use the first time point as a key sampling moment.

[0096] In one embodiment, the first determination unit includes: a second determination subunit, configured to determine a second time point corresponding to a positive peak in the power consumption curve; and use the second time point as a key sampling moment.

[0097] In one embodiment, the first extraction unit includes: a third determination subunit, configured to determine a data extraction period corresponding to the key sampling moment according to a preset time window; a first extraction subunit, configured to extract dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0098] In one embodiment, a training module is further included. The training module includes: a first acquisition unit, configured to acquire training samples and sample categories to which the training samples belong; the sample categories include a category with a Trojan and / or a category without a Trojan, and the training samples include sample dynamic power consumption data of sample chips; a second extraction unit, configured to perform feature extraction on the training samples according to a feature extraction model to obtain sample feature data; and a training unit, configured to use the sample feature data as a model input and use the sample category to which the training samples belong as a label to perform model training on a pre-constructed Trojan detection model.

[0099] Each module in the above hardware Trojan detection device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in the computer device in a software form, so as to facilitate the processor to call and execute operations corresponding to the above respective modules.

[0100] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as Figure 5As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a hardware trojan detection method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0101] Those skilled in the art can understand that Figure 5 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0102] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0103] Obtain the power consumption curve of the target chip;

[0104] Extract the dynamic power consumption data of the target chip from the power consumption curve;

[0105] Extract the power consumption feature data from the dynamic power consumption data;

[0106] Input the power consumption feature data into a pre-trained trojan detection model to obtain the trojan detection result of the target chip.

[0107] In one embodiment, when the processor executes a computer program, the following steps are further implemented: determining a key sampling moment corresponding to the dynamic power consumption data; and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moment.

[0108] In one embodiment, when the processor executes a computer program, the following steps are further implemented: obtaining a clock signal of the target chip; determining a first time point corresponding to a rising edge and / or a falling edge in the clock signal; and using the first time point as the key sampling moment.

[0109] In one embodiment, when the processor executes a computer program, the following steps are further implemented: determining a second time point corresponding to a positive peak value in the power consumption curve; and using the second time point as the key sampling moment.

[0110] In one embodiment, when the processor executes a computer program, the following steps are further implemented: determining a data extraction period corresponding to the key sampling moment according to a preset time window; and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0111] In one embodiment, when the processor executes a computer program, the following steps are further implemented: obtaining a training sample and a sample category to which the training sample belongs; the sample category includes a category with a Trojan and / or a category without a Trojan, and the training sample includes sample dynamic power consumption data of a sample chip; extracting sample feature data from the training sample according to a feature extraction model; and using the sample feature data as a model input and using the sample category to which the training sample belongs as a label to perform model training on a pre-constructed Trojan detection model.

[0112] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0113] Obtaining a power consumption curve of the target chip;

[0114] Extracting the dynamic power consumption data of the target chip from the power consumption curve;

[0115] Extracting power consumption feature data from the dynamic power consumption data;

[0116] Inputting the power consumption feature data into a pre-trained Trojan detection model to obtain a Trojan detection result of the target chip.

[0117] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a key sampling moment corresponding to the dynamic power consumption data; and extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moment.

[0118] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining a clock signal of a target chip; determining first time points corresponding to rising edges and / or falling edges in the clock signal; using the first time points as key sampling moments.

[0119] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a second time point corresponding to a positive peak value in a power consumption curve; using the second time point as a key sampling moment.

[0120] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a data extraction period corresponding to a key sampling moment according to a preset time window; extracting dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0121] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining a training sample and a sample category to which the training sample belongs; the sample category includes a Trojan horse presence category and / or a Trojan horse absence category, and the training sample includes sample dynamic power consumption data of a sample chip; extracting sample feature data from the training sample according to a feature extraction model; using the sample feature data as a model input and using the sample category to which the training sample belongs as a label to perform model training on a pre-constructed Trojan horse detection model.

[0122] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0123] Obtaining a power consumption curve of a target chip;

[0124] Extracting dynamic power consumption data of the target chip from the power consumption curve;

[0125] Extracting power consumption feature data from the dynamic power consumption data;

[0126] Inputting the power consumption feature data into a pre-trained Trojan horse detection model to obtain a Trojan horse detection result of the target chip.

[0127] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a key sampling moment corresponding to the dynamic power consumption data; extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moment.

[0128] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining a clock signal of a target chip; determining first time points corresponding to rising edges and / or falling edges in the clock signal; using the first time points as key sampling moments.

[0129] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a second time point corresponding to a positive peak in the power consumption curve; and using the second time point as a key sampling moment.

[0130] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: determining a data extraction period corresponding to the key sampling moment according to a preset time window; and extracting dynamic power consumption data of the target chip from the power consumption curve according to the data extraction period.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining a training sample and a sample category to which the training sample belongs; the sample category includes a Trojan presence category and / or a Trojan absence category, and the training sample includes sample dynamic power consumption data of a sample chip; extracting sample feature data from the training sample according to a feature extraction model; and using the sample feature data as a model input and using the sample category to which the training sample belongs as a label to perform model training on a pre-constructed Trojan detection model.

[0132] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0133] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in this application.

[0134] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A hardware Trojan detection method, characterized in that, The method includes: Obtaining the power consumption curve of the target chip; Extracting the dynamic power consumption data of the target chip from the power consumption curve; Extracting the power consumption feature data from the dynamic power consumption data; Inputting the power consumption feature data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

2. The method according to claim 1, characterized in that, The extracting the dynamic power consumption data of the target chip from the power consumption curve includes: Determining the key sampling moments corresponding to the dynamic power consumption data; Extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moments.

3. The method according to claim 2, wherein The determining the key sampling moments corresponding to the dynamic power consumption data includes: Obtaining the clock signal of the target chip; Determining the first time points corresponding to the rising edges and / or falling edges in the clock signal; Taking the first time points as the key sampling moments.

4. The method according to claim 2, wherein The determining the key sampling moments corresponding to the dynamic power consumption data includes: Determining the second time points corresponding to the positive peaks in the power consumption curve; Taking the second time points as the key sampling moments.

5. The method according to claim 2, wherein The extracting the dynamic power consumption data of the target chip from the power consumption curve according to the key sampling moments includes: Determining the data extraction periods corresponding to the key sampling moments according to a preset time window; Extracting the dynamic power consumption data of the target chip from the power consumption curve according to the data extraction periods.

6. The method according to any one of claims 1-5, characterized in that, The Trojan detection model is trained in the following manner: Obtaining training samples and the sample categories to which the training samples belong; the sample categories include the Trojan presence category and / or the Trojan absence category, and the training samples include the sample dynamic power consumption data of sample chips; Performing feature extraction on the training samples according to a feature extraction model to obtain sample feature data; Using the sample feature data as model inputs and using the sample categories to which the training samples belong as labels to perform model training on a pre-constructed Trojan detection model.

7. A hardware Trojan detection device, characterized in that, The device includes: An obtaining module, configured to obtain the power consumption curve of the target chip; A first extraction module, configured to extract the dynamic power consumption data of the target chip from the power consumption curve; A second extraction module, configured to extract the power consumption feature data from the dynamic power consumption data; An input module, configured to input the power consumption feature data into a pre-trained Trojan detection model to obtain the Trojan detection result of the target chip.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.