The present invention is directed to an automated methodology based on Graph Neural Networks (GNN) to model Integrated Circuits (IC) and mitigate hardware security threats.
The IC manufacturing industry has developed significantly and scaled down to 7 nm technology that has made the integration of numerous transistors possible. However, the hardware engineers could not keep up with rapid advancements in the fabrication technology, and they failed to use all of the available transistors in the die. To close this productivity gap under time-to-market pressure, hardware Intellectual Property (IP) core design has grabbed substantial attention from the semiconductor industry and has dramatically reduced design and verification costs.
The globalization of the IC supply chain poses a high risk of theft for design companies that share their most valuable assets, IPs, with other entities. IP piracy is a serious issue in the current economy with a drastic need for an effective detection method. According to the U.S. Department of Commerce study, 38% of the American economy is composed of IP-intensive industries that lose between $225 billion to $600 billion annually because of Chinese companies stealing American IPs mainly in the semiconductor industry, based on the U.S. Trade Representative report.
Hardware IP is considered as any stand-alone component of a system-on-chip design that is classified into three categories based on the level of abstraction: Soft IP (i.e., synthesizable HDL source code), Firm IP (i.e., netlists and placed RTL block), and Hard IP (i.e., GDSII and physical layout).
Conventionally, the IP protection techniques fall into preventive (i.e., logic encryption, camouflaging, metering, and split manufacturing) and detective (i.e., digital signature) methods. All these methods add excessive implementation overhead to the hardware design that limits their applications in practice. Moreover, they mostly focus on security at the IC level, while many commercial IPs comprise the soft IPs due to flexibility, independence of platform technology, portability, and easy integration with other components. The high level of abstraction makes IP protection more challenging since it is easier for an adversary to slightly change the source code and redistribute it illegally at the lower levels of abstraction. Although the existing preventive countermeasures deter IP theft, they cannot guarantee IP security as the adversaries keep developing more sophisticated attacks to bypass them. Therefore, an effective IP piracy detection method is crucial for IP providers to disclose the theft.
To this end, the state-of-the-art piracy detection method is embedding signatures of IP owners known as watermark and legal IP users known as a fingerprint in the circuit design to assure authorship and trace legal/illegal IP usage. IP watermarking and fingerprinting are prone to removal, masking, or forging attacks that attempt to omit the watermark, distort its extraction process, or embed another watermark in IP.
Development and verification of IP can be costly and time-consuming. Therefore, IP providers are concerned about protecting IP from possible threats such as IP piracy (unlicensed usage of IP), overbuilding, counterfeiting (producing a faithful copy of the circuit), and reverse engineering. The countermeasures proposed in the literature can be classified as follows:
Watermarking and fingerprinting: The IP owner and legal IP user's signatures, known as watermark and fingerprint, are added to the circuit to prove infringement.
Hardware metering: The designer assigns a unique tag to each chip, which can be used for chip identification (passive tag) and enabling/disabling the chip (active tag).
Obfuscation: There are two obfuscation methodologies; logic locking (encryption) and IC camouflaging. In the logic locking method, additional gates such as XOR are inserted in non-critical wires. The circuit would be functional only if the correct controlling signal (key) is provided as these gates' input. It is assumed that the correct key is stored in a secure memory, and the attacker does not have access to the key. On the other hand, camouflaging modifies the design such that cells with different functionalities look similar to the attacker and confuses the reverse engineering process.
Split manufacturing: IP house split the design to separate ICs and have them fabricated in different foundries. Thus, none of the foundries have access to the whole design to overbuild, reverse engineer, or perform malicious activities.
The existing defenses suffer from a large overhead on area, power, and timing that restrict their application. As the new countermeasures are developed, the attacks are advanced to bypass them. SAT attack is a powerful method used to formulate and solve a sequence of SAT formulas iteratively to unlock the encrypted circuit, reverse engineer the Boolean functionalities of camouflaged gates, or reconstruct the missing wire in 2.5D split manufactured ICs. Anti-SAT and AND-tree insertion obfuscation techniques are proposed to mitigate SAT attacks. However, signal probability skew (SPS) attack, AppSAT guided removal (AGR) attack, and sensitization guided SAT (SGS) attack break them. A proximity attack is another attack against 2.5D split manufacturing that iteratively connects the inputs to outputs in two IC partitions until a loop is formed. Removal, masking, and forging attacks bypass watermarking by eliminating, distorting, or embedding a ghost watermark.
In this work, a novel methodology for IP piracy detection is proposed that, instead of insertion and extraction of a signature to prove the ownership, models the circuits and assesses the similarity between IP designs. Therefore, the present method does not require additional hardware overhead as the signature and is not vulnerable to removal, masking, or forging attacks. It also effectively exposes the infringement between two IPs when the adversary complicates the original IP to deceive the IP owner. Modeling the hardware design is challenging since it is a structural non-Euclidean data type and most of the modeling techniques are developed for Euclidean data. To solve it, the circuit may be represented as a graph with similar data types and properties and generate the data-flow graph (DFG) of circuits.
As another security threat, IP piracy is a serious issue in the current economy with a drastic need for an effective detection method. According to the U.S. Department of Commerce study, 38% of the American economy is composed of IP-intensive industries [3] that lose between $225 billion to $600 billion annually because of Chinese companies stealing American IPs mainly in the semiconductor industry, based on the U.S. Trade Representative report.
The time to market pressure and resource constraints has pushed SoC designers toward using third-party Electronic Design Automation (EDA) tools and IP cores and outsourcing design, fabrication, and test services worldwide. The globalization of the semiconductor industry has raised the risk of insertion of hardware Trojans by rogue entities in the IC supply chain, refer to
To ensure the trustworthiness of SoC design, it is essential to ascertain the authenticity of 3PIPs. Depending on the format of the IP, it is classified into three categories; Soft IP (i.e., synthesizable Verilog or VHDL source codes), Firm IP (i.e., netlists and placed RTL blocks), and Hard IP (i.e., GDSII files and custom physical layout). IP trust mainly revolves around HT detection in soft IP cores since it is the most flexible and widely-used IP core in practice. Additionally, the high level of abstraction and flexibility in RTL codes ease the design and implementation of various malicious functions for attackers.
It is crucial to identify HT in the early stages of design flow because removing it would be very expensive later. Detecting a few lines of HT in an industrial-strength IP with thousand lines of RTL code is extremely challenging and any work which requires manual review is error-prone, time-consuming, and not scalable. The need for a scalable pre-silicon security verification method is highlighted in many technical documents, such as a recent white paper from Cadence and Tortuga Logic because existing solutions fail to guarantee the trustworthiness of the hardware design.
Despite numerous HT detection methods proposed in the literature, the problem still exists because as the designers develop a new defense mechanism against the existing HTs, the attackers design new HTs to evade detection. For instance, the FANCI was successful in HT detection until DeTrust designed a new HT to bypass it. Among Trusthub benchmarks, it marks AES-T600 as HT but fails for AES-700 while both HTs have the same trigger and leak the secret key differently. Later, identify the HT in AES-600 and AES-700 by data leakage detection. Nevertheless, it fails for AES-500 degrades the chip instead of data leakage. A recent paper demonstrated that modeling the hardware design as a graph can be beneficial in the hardware security domain. However, graph similarity algorithms limit the detection scope to known HTs in the method's library. The story goes on, and there is no universal method for detecting all types of HTs. Thus, a new scalable methodology is required for unknown HT detection that is expandable as new HTs are introduced.
The existing HT detection solutions have several shortcomings; reliance on golden reference, unable to identify unknown HTs, burdening the designer with a manual review of code, unable to guarantee HT detection, limited detection scope to some specific type of HTs, not scalable, or too complex. To overcome these limitations, a novel golden reference-free pre-silicon HT detection method that learns the circuit behavior and identifies the HTs due to their malicious behavior is presented. Since hardware is a non-euclidean, structural type of data in nature, the graph data structure is used as a great match for hardware representation and generates the DFG for RTL codes. The GNN is leveraged to model the behavior of the circuit. The scalability of the present method lies in the fully automated process of graph generation, feature extraction, and detection without any manual workload. Automatic feature extraction is crucial when new HTs are identified. In this case, the present model can be readily updated without any need for defining new properties or feature engineering as in previous works. The majority of the pre-silicon HT detection techniques in prior literature fall into four main categories, described below:
It is an objective of the present invention to provide systems and methods that allow for GNN to model ICs and mitigate hardware security threats, as specified in the independent claims. Embodiments of the invention are given in the dependent claims. Embodiments of the present invention can be freely combined with each other if they are not mutually exclusive.
The present invention features a system for detecting hardware Trojans and IP piracy in a circuit. The circuit may comprise a plurality of signals which may comprise input signals and output signals. The system may be based on a GNN. The GNN may comprise one or more graph convolutional neural network (GCN) layers, one or more pooling layers, and one or more multilayer perceptron (MLP) layers. The system may comprise a Hardware-to-Graph module comprising instructions for reading a plurality of base-level files from the circuit. converting them into a combined file, converting the combined file into a plurality of graphs (one for each signal), and combining the plurality of graphs into a combined graph. The system may further comprise a Graph-to-Vector module. The Graph-to-Vector module may comprise instructions for accepting the combined graph and running the combined graph through the GNN to transform the combined graph into a vectorized graph embedding through a plurality of graph convolutional neural network layers, a pooling layer, and a multilayer perceptron network. This results in a vectorized graph embedding having two two-dimensional outputs.
The system may further comprise a Hardware Trojan Detection module. The Hardware Trojan Detection module may comprise instructions for accepting the combined graph and the vectorized graph embedding from the Graph-to-Vector module and generating a label that determines whether or not there is an HT in the circuit. The Hardware Trojan Localization module may further localize the Trojan circuit in the victim main design by generating node embeddings using GNN and classify the graph nodes based on the vectorized node embeddings between two classes; benign node or HT infected node. In some embodiments, the Hardware Patching module may further comprise instructions for removing the plurality of HT infected nodes from the combined graph of hardware design and recreating the plurality of hardware design files based on the combined graph with HT removed. The system may further comprise an IP Piracy Detection module. In some embodiments, the IP Piracy Detection module may comprise instructions for accepting two vectorized graph embeddings and calculating, based on the GNN, a similarity score between the two. The IP Piracy Detection module may further comprise instructions for determining, based on the similarity score, whether the second vectorized graph embedding contains IP piracy of the first vectorized graph embedding.
This project proposes a novel design automation methodology and associated toolchain to model IC and learn its behavior to mitigate security threats. An overview of the present invention is shown in
The first defense mechanism may be a toolchain to mitigate the security threat of hardware Trojans. The tool may determine if the hardware design is infested with HT according to the Trojan's malicious behavior. After detection, it may be able to localize the HT in the graph representation of the design by tracing back the detection process. Lastly, the hardware patching tool may be proposed to remove the Trojan sub-graph from the circuit graph and generate a Trojan-free circuit. The pipeline may be fully automated as the tool may learn the key features and circuits' behavior automatically without any manual workload for feature engineering or property definition. Furthermore, the tool may be scalable to large designs, and its HT detection scope will not be limited to any specific HT type or only known HTs.
The second security threat to detect may be IP piracy. In this regard, a reverse engineering tool may be used to retrieve information from low-level design. It is used along with another tool to detect IP piracy by comparing the embeddings of two designs. The piracy detection tool may be automated and does not add any circuit overhead to the design. The reverse engineering tool may also be resilient to attacks against digital signature-based piracy detection techniques.
The present invention looks into two major security concerns in the hardware domain; Hardware Trojan, and IP Security. Aggressive time-to-market constraints and enormous IC design and fabrication costs have pushed system-on-chip designers toward using third-party Electronic Design Automation (EDA) tools and IP cores and also outsourcing design, fabrication, and test services worldwide. The globalization of the semiconductor industry has raised the risk of insertion of hardware Trojans by rogue entities in the IC supply chain exposing IP providers to theft and illegal redistribution of IPs, refer to
HT refers to any intentional and malicious modification of an IC that is usually designed to leak information, change the functionality, degrade the performance, or deny the service of the chip. Due to the devastating effects and stealthy nature of HT, its detection has become one of the major hardware security concerns. The need for a scalable pre-silicon security verification method is highlighted in many technical documents, such as a recent white paper from Cadence and Tortuga Logic because existing solutions fail to guarantee the trustworthiness of the hardware design.
The present invention is advantageous in three aspects. Firstly, a methodology based on GNNs is implemented that automatically learns the behavior of circuits and models the hardware design. Secondly, a defense mechanism for hardware Trojans is implemented that proposes the following advantages over current HT detection methods: the ability to find unknown HTs, automated, fast, scalable, and practical (no reliance on a trusted reference design). It also implements the important feature of localization of Trojan and removing it (hardware patching). Thirdly, a tool for reverse engineering and TIP piracy detection is implemented. The piracy detection methodology is fundamentally prone to the existing attack against state-of-the-art methods (watermarking and fingerprinting) and does not add any hardware overhead to the design.
One of the unique and inventive technical features of the present invention is the implementation of a GNN to create a vectorized graph embedding for a circuit. Without wishing to limit the invention to any theory or mechanism, it is believed that the technical feature of the present invention advantageously provides for the efficient identification of hardware Trojans in a circuit, including unknown Trojans with no previous references, as well as allowing the present invention to efficiently remove the Trojans and rebuild the hardware tree. Furthermore, this methodology addresses the weaknesses of current IP piracy detection methods (watermarking, fingerprinting, etc.) without adding any hardware overhead. None of the presently known prior references or work has the unique inventive technical feature of the present invention.
Any feature or combination of features described herein are included within the scope of the present invention provided that the features included in any such combination are not mutually inconsistent as will be apparent from the context, this specification, and the knowledge of one of ordinary skill in the art. Additional advantages and aspects of the present invention are apparent in the following detailed description and claims.
The features and advantages of the present invention will become apparent from a consideration of the following detailed description presented in connection with the accompanying drawings in which:
Following is a list of elements corresponding to a particular element referred to herein:
Referring now to
The memory component may further comprise a Graph-to-Vector module (200). The Graph-to-Vector module (200) may comprise computer-readable instructions for execution by the processor accepting the combined graph from the Hardware-to-Graph module (100) and applying the GNN (500) to the combined graph. In some embodiments, applying the GNN (500) may comprise extracting, for each node of the combined graph, an aggregated feature vector. The aggregated feature vector may comprise a plurality of features collected from any neighboring nodes of the node. Applying the GNN (500) may further comprise combining, for each node, a node feature vector of the node with the aggregated feature vector of the node to generate a node feature vector of any incoming neighbor nodes of the node and calculating a weight for each node based on the GNN (500). Extracting the aggregated feature vector for each GCN layer, combining nodes, and assigning weights may be repeated for each layer of the GNN (500). Each repetition may generate a node feature vector for each node, wherein the last repetition results in an embedded node and a final weight for each node. Applying the GNN (500) may further comprise processing the plurality of embedded nodes through the pooling layers of the GNN (500) resulting in a pooled set of embedded nodes, generating a vectorized graph embedding by combining, each embedded node of the pooled set of embedded nodes, all node feature vectors, and processing the vectorized graph embedding through the multilayer perceptron layers of the GNN (500) to reduce an overall output of the Graph-to-Vector Module (200) to a first output and a second output. In some embodiments, processing the plurality of embedded nodes through the pooling layers of the GNN (500) may comprise top-k filtering. The pooling layers may implement a pooling ratio of about 0.8 to aid the top-k filtering. In some embodiments, the Graph-To-Vector Module (200) may comprise the GNN (500).
The memory component may further comprise a Hardware Trojan Detection module (300). The Hardware Trojan Detection module (300) may comprise computer-readable instructions for execution by the processor comprising accepting the combined graph and the vectorized graph embedding from the Graph-to-Vector module (200) and generating, based on the GNN (500), the first output of the vectorized graph embedding which may comprise a first two-dimensional value. The first two-dimensional value may comprise a probability of an HT in the circuit and a probability of no HT in the circuit. The Hardware Trojan Detection module (300) may further comprise instructions for normalizing the first output and determining if the first output has returned a greater probability of an HT, based on the plurality of final weights, a plurality of HT infected nodes. In some embodiments, the Hardware Trojan Detection module (300) may further comprise instructions for removing the plurality of HT infected nodes from the combined graph and recreating the plurality of base-level files based on the combined graph with HT removed.
The memory component may further comprise an IP Piracy Detection module (400). In some embodiments, the IP Piracy Detection module (400) may comprise computer-readable instructions for execution by the processor comprising accepting a first vectorized graph embedding from the Graph-to-Vector module (200), accepting a second vectorized graph embedding from the Graph-to-Vector module (200), and calculating, based on the GNN (500), the second output. The second output may comprise a similarity score of the first vectorized graph embedding and the second vectorized graph embedding. The IP Piracy Detection module (400) may further comprise instructions for determining, based on the similarity score, whether a second circuit corresponding to the second vectorized graph embedding has stolen the IP of the circuit corresponding to the first vectorized graph embedding. In some embodiments, calculating the similarity score may comprise calculating cosine similarity between the first vectorized graph embedding and the second vectorized graph embedding.
In some embodiments, the plurality of base-level files may comprise register transfer level (RTL) files, gate-level netlist files, physical layout (GDSI) files, or a combination thereof. In some embodiments, the graph may be selected from a group comprising a control flow graph, a data flow graph, and an abstract syntax tree. In some embodiments, the GNN (500) may comprise two GCN layers which may comprise 150 to 250 hidden units per layer. Furthermore, the GNN (500) may comprise one MLP layer that reduces the hidden units of each layer to two hidden units.
Referring now to
The method may further comprise applying the GNN (500) to the combined graph. In some embodiments, applying the GNN (500) may comprise extracting, for each node of the combined graph, an aggregated feature vector. The aggregated feature vector may comprise a plurality of features collected from any neighboring nodes of the node. Applying the GNN (500) may further comprise combining, for each node, a node feature vector of the node with the aggregated feature vector of the node to generate a node feature vector of any incoming neighbor nodes of the node and calculating a weight for each node based on the GNN (500). Extracting the aggregated feature vector for each GCN layer, combining nodes, and assigning weights may be repeated for each layer of the GNN (500). Each repetition may generate a node feature vector for each node, wherein the last repetition results in an embedded node and a final weight for each node. Applying the GNN (500) may further comprise processing the plurality of embedded nodes through the pooling layers of the GNN (500) resulting in a pooled set of embedded nodes, generating a vectorized graph embedding by combining, each embedded node of the pooled set of embedded nodes, all node feature vectors, and processing the vectorized graph embedding through the multilayer perceptron layers of the GNN (500) to reduce an overall output of the present method to a first output and a second output. In some embodiments, processing the plurality of embedded nodes through the pooling layers of the GNN (500) may comprise top-k filtering. The pooling layers may implement a pooling ratio of about 0.8 to aid the top-k filtering. In some embodiments, processing the plurality of embedded nodes through the pooling layers of the GNN (500) may comprise top-k filtering. The pooling layers may implement a pooling ratio of 0.8 to aid the top-k filtering.
The method may further comprise generating, based on the GNN (500), the first output of the vectorized graph embedding may comprise a first two-dimensional value. The first two-dimensional value may comprise a probability of an HT in the circuit and a probability of no HT in the circuit. The method may further comprise normalizing the first output and determining if the first output has returned a greater probability of an HT, based on the plurality of final weights, a plurality of HT infected nodes. In some embodiments, the method may further comprise removing the plurality of HT infected nodes from the combined graph and recreating the plurality of base-level files based on the combined graph with HT removed.
The method may further comprise accepting a second vectorized graph embedding from the Graph-to-Vector module (200), calculating, based on the GNN (500), the second output. The second output may comprise a similarity score of the first vectorized graph embedding and the second vectorized graph embedding. The method may further comprise determining based on the similarity score whether a second circuit corresponding to the second vectorized graph embedding contains IP piracy of the circuit corresponding to the first vectorized graph embedding. In some embodiments, calculating the similarity score may comprise calculating cosine similarity between the first vectorized graph embedding and the second vectorized graph embedding.
In some embodiments, the plurality of base-level files may comprise register transfer level (RTL) files, gate-level netlist files, physical layout (GDSII) files, or a combination thereof. In some embodiments, the graph may be selected from a group comprising a control flow graph, a data flow graph, and an abstract syntax tree. In some embodiments, the GNN (500) may comprise two GCN layers which may comprise 150 to 250 hidden units per layer. Furthermore, the GNN (500) may comprise one MLP layer that reduces the hidden units of each layer to two hidden units.
The present invention implements a novel automated methodology that proposes three main contributions to the IC security domain. The first methodology is titled HW2VEC, as illustrated in
The second methodology may be designed as a defense mechanism against HT. Using the generated embedding from HW2VEC, a classifier may be trained to detect HT and label a circuit as Trojan-free or Trojan-infested. After the detection, the graph representation of the infected circuit may be analyzed further to localize the HT. The attention mechanism from HW2VEC may make the model able to focus on the part of the graph which is mostly responsible for the model decision (output label). Thus, the defense mechanism may generate a score for each node according to its influence in the HT detection which is utilized to determine the HT nodes. Lastly, a hardware patching tool is implemented to automatically remove the HT in graph level and re-create the hardware design from its graph representation.
Another area of contribution may be hardware IP security. In this regard, two tools may be implemented for reverse engineering and IP piracy detection. Reverse engineering may involve retrieving the high-level information from the low-level design which may be used from physical layer to gate-level netlist or from netlist to RTL design. To develop the IP piracy detection, the graph neural network model may be trained to map similar hardware designs to embedding vectors in close proximity. Therefore, the piracy between two IPs by comparing their embeddings may be determined. A similarity score can indicate how much the designs are similar and the threshold may be learned to determine the output label as piracy or no-piracy.
There exists a feed-forward function ƒ that outputs whether a RTL program p has a HT or not through a label y as given in Equation 1.
The present invention features a model for approximating function ƒ. The overall architecture of GNN4TJ is illustrated in
A plurality of HT insertion scenarios may be considered by the present invention. (1) 3PIP vendor is not trusted, and a malicious circuit is hidden in the IP. (2) The 3P-EDA used for design synthesis and analysis inserts an HT automatically. (3) A rogue in-house designer intentionally manipulates the RTL design. (4) The design is tampered with in the later stages (gate-level netlist, physical layout, or bare die), and the RTL design is derived using reverse-engineering techniques.
The hardware design may be a non-euclidean, structural type of data similar to the graph data structure. As RTL representation, DFG is used, which indicates the relationships and dependencies between the signals and gives a fundamental expression of the code's computational structure. As pictured in
The final DFG may be a rooted directed graph that shows data dependency from the output signals (the root nodes) to the input signals (the leaf nodes). It may be defined as graph G=(V, E) where E is the set of directed edges and V is the set of vertices. V may be defined as V={ν1, ν2, . . . , νn} where νi represents signals, constant values, and operations such as xor, and, concatenation, branch, or branch condition. E may be defined as E=ei,j for all i,j such that eij∈E if the value of νi depends on the value of νj, or if the operation νj is applied on νi. An RTL code and its DFG are exemplified in
GNN is deep learning that operates on graphs. The architecture used in GNN4TJ may partially implement a Spatial Graph Convolution Neural Network (SGCN). In general, SGCN defines the convolution operation based on a node's spatial relations. The spatial convolution has the following phases: (i) message propagation phase and (ii) the read-out phase. The message propagation phase involves two sub-functions: AGGREGATE and COMBINE functions, given by,
In the present invention, hardware design may be modeled by firstly extracting the DFG from the circuit and then applying the graph learning pipeline to acquire the embedding of hardware designs. To process each circuit in its DFG form, the GNN framework may be employed with the architecture depicted in
The node embedding Xprop may be further processed with an attention-based graph pooling layer. Such an attention-based pooling layer may allow the model to focus on a local part of the graph and may be considered as a part of a unified computational block of a GNN pipeline. In this layer, the present invention may perform top-k filtering on nodes according to the scores predicted from a separate trainable GNN layer, as follows:
In the present invention, the problem of IP piracy detection is formulated as finding the similarity between two hardware designs. The present invention assumes the existence of a feed-forward function ƒ that outputs whether two circuits ρ1 and ρ2 are subject to piracy or not through a binary label γ as given in Equation 10.
To approximate ƒ, the present invention extracts the DFGs GA and GB from circuit pair (ρ1, ρ2) using the DFG generation pipeline. Then, the process passes (GA, GB) to a graph embedding layer, HW2VEC, to acquire the graph-level embeddings (hG
In the threat model, the present invention examines the IP designs in RTL or gate-level netlist to discover piracy. The design may be a soft IP, firm IP, or derived by reverse engineering a hard IP or IC. The adversary may be a hardware designer, competitor company, or the fabrication foundry who present the stolen IP as their genuine design and sell it as an IC or an IP at the same or lower level of abstraction. The attack scenario may involve modification of IP design to tamper piracy detection. The attacker may get access to the original IP through one of these means: I) purchase the IP for limited usage, II) leaked through a rogue employee in the design house, or III) reverse engineered the physical layout/IC.
In the present algorithm, GNN4IP refers to approximating function ƒ, which can yield the inference of whether two circuits ρ1 and ρ2 are subject to IP piracy. Applying typical machine learning methodologies to hardware designs, which may be non-euclidean in nature, usually requires feature engineering and immense expert knowledge in hardware design languages. Therefore, the present invention implements HW2VEC that utilizes the DFG of a circuit and applies a GNN framework to acquire the corresponding representation of features hp for each hardware design ρ. The architecture of IP piracy detection is depicted in
The HW2VEC uses the DFG generation pipeline and acquires the corresponding graph G for circuit ρ in the form of (X, A) where X represents the initial list of node embeddings and A stands for the adjacency information of G. Next, the HW2VEC begins the message propagation phase, denoted as Graph Conv in the algorithm, which is Graph Convolution Network (GCN). In each iteration I of message propagation, the node embeddings Xl+1 will be updated as in equation 5, wherein the corresponding adjacency matrix is denoted as Aprop.
Once propagated the information on G, the resultant node embedding Xprop is further processed with an attention-based graph pooling layer Graph Pool. Denote the collection of all node embeddings of G after passing through L layers of GCN as Xprop. The Xprop is passed to a self-attention graph pooling layer that learns to filter out irrelevant nodes from the graph, creating the pooled set of node embeddings Xpool and their edges Apool. In this layer, the present invention implements a graph convolution layer to predict the scoring α=SCORE(Xprop, Aprop) and use α to perform top-k filtering over the nodes in the DFG.
Then, the Graph Readout in the algorithm aggregates the node embeddings Xpool to acquire the graph-level embedding hG for the DFG G using this formula hG=READOUT(Xpool). The READOUT operation may be either summation, averaging, or selecting the maximum of each feature dimension over all the node embeddings, denoted as sum-pooling, mean-pooling, or max-pooling respectively. Lastly, HW2VEC returns the embedding hG of each hardware.
The gnn4ip defines the primary procedure that processes a pair of hardware design programs ρ1 and ρ2 and returns the result of whether one of which is an IP piracy to each other. The gnn4ip utilizes hw2vec to transform ρ1 and ρ2 into the corresponding DFG embeddings, denoted as hp
Finally, gnn4ip utilizes predefined decision boundary δ and Y{circumflex over ( )} to judge whether two programs ρ1 and ρ2 are a piracy to one another and to return the results of IP piracy detection using a binary label (0 or 1).
As both gnn4ip and HW2VEC include several trainable parameters, these parameters for IP piracy detection need to be trained via computing the cosine embedding loss function, denoted as H, between true label Y and the predicted label Ŷ. The calculation of loss can be described as follows,
The present invention used 2 GCN layers with about 200 hidden units for each layer. For the graph pooling layer, the present invention used the pooling ratio of 0.8 to perform top-k filtering. For READOUT, the present invention used max-pooling for aggregating node embeddings of each graph. The present invention used 1 MLP layer to reduce the number of hidden units from 200 to 2 used in hG for predicting the result of HT detection. In training, the present invention appended a dropout layer with a rate of 0.5 after each GCN layer. The present invention trained the model for 200 epochs using the batch gradient descent algorithm with batch size 4 and the learning rate 0.001.
A HT comprised two fundamental parts: payload and trigger. The payload was the implementation of the malicious behavior of HT to leak data leakage, change the functionality, deny the service, or degrade the performance. The trigger was the optional circuit that monitored various signals or events in the base circuit and activated the payload when a specific signal or event was observed. The present invention classified the triggers of HT benchmarks into three main categories; i) time bomb, ii) cheat code, and iv) always on. The time bomb trigger was activated after numerous clock cycles and the cheat code trigger depended on one or a sequence of specific inputs in the base circuit.
The present invention created a HT dataset based on the benchmarks in Trusthub that contained 34 varied types of HTs inserted in 3 base circuits: AES, PIC, and RS232. To expand the dataset, the present invention extracted the HT design and used them as additional data instances. Moreover, the present invention integrated some of the extracted HTs to new HT-free circuits, DES and RC5, which increased the HT-infested samples. To balance the dataset and increment the number of HT-free samples, the present invention added the different variations of current circuits in addition to new ones, including DET, RC6, SPI, SYN-SRAM, VGA, and XTEA to the dataset that resulted in a dataset of HT-Free and HT-infested codes with 100 instances.
The present invention aimed to evaluate GNN4TJ performance in unknown HT detection. To detect the HTs in a base circuit, the present invention left the base circuit benchmarks for testing and trained the model with the other benchmarks. In this setup, the test circuit and Trojans were unknown to the model. The present invention repeated it about 20 times for each base circuit and count True Positive (TP), False Negative (FN), and False Positive (FP) to calculate the evaluation metrics, Precision (P), Recall (R) or True Positive Rate, and Fβ score as follows:
This testing scenario imitated the situation that neither the HT was known nor the golden HT-free reference of the circuit under test was seen by the model in training. Recall expressed the model's ability to detect the HTs or, in other words, what percentage of HT-infested samples were detected by the model. This metric was intuitive, but it was not sufficient for evaluation, especially in an unbalanced dataset. It was essential to analyze the false positive, the numbers of HT-free samples incorrectly classified as HT. Thus, the present invention computed precision that demonstrated what percentage of the samples that model classified as HT-infested actually contained HT. Fβ score was the weighted average of precision and recalled that better presented performance. Dataset played an important role in the performance of the model. As it is pictured in
The model was trained and tested on a server with two NVIDIA TITAN-XP and NVIDIA GeForce GTX 1080 graphics cards. The timing results for the base circuits are summarized in
As qualitative metrics, 3 essential characteristics were investigated: i) golden reference-free, ii) unknown HT detection, and iii) automated process. The construction of an HT detection model without white-box knowledge of the IP was challenging. An effective and uniform approach did not rely on any trusted reference design since it was not available in reality. Generally, the algorithmic approaches satisfied this quality while ML techniques failed. Another important factor was the capability to find different types of HTs, even the unknown ones. Regarding this factor, ML-based approaches were more successful in extracting the intuitive features from circuits to recognize a variety of HTs. The detection scope of other techniques was limited to the HTs that already exist in the method's library or had properties that were predefined. To the best of the knowledge, all the existing approaches required feature engineering or manual property definition. However, in the present approach, not only HT detection but also the feature extraction process was automated. Hence, the model was easily expanded by training on various circuits and scaled for industrial-level IP design. Furthermore, the model got updated by retraining if a new type of HT was discovered, and it did not require manual effort to extract the new set of properties or features.
As quantitative metrics, precision, recall, and timing were observed. For timing, the average detection time for the AES benchmarks were compared. Since the papers' computing platforms were different, the exact comparison between the reported timing numbers was not reasonable. However, the order of magnitude of timing results was useful for general comparison, and it showed that the model was much faster than the others. The timing of algorithmic methods (FV, CA, and GM) highly depended on hardware design complexity. Their memory usage and detection time drastically grew for large designs that caused timeout or memory shortage problems. On the other hand, the circuit's complexity did not have a notable effect on the detection time of GNN4TJ according to
In terms of recall and precision, the present invention had comparable results. Comparison with algorithmic methods was challenging because, in most cases, the authors reported a list of known HT benchmarks that their model successfully detected while the present model was tested on unknown HTs, which mostly were not detectable by those algorithms. Furthermore, FP and IP for computing precision and the performance of the methods on HT-free samples were not available in some papers to compare.
In
In hw2vec, 2 GCN layers with 16 hidden units were used for each layer. For the graph pool, the pooling ratio of 0.5 was used to perform top-k filtering. For the graph readout, max-pooling was used for aggregating node embeddings of each graph. In training, apply dropout with a rate of 0.1 was applied after each GCN layer. The model was trained using the batch gradient descent algorithm with batch size 64 and the learning rate to be 0.001.
One of the significant challenges of machine learning model development was data collection. To construct GNN4IP, RTL codes and gate-level netlists of hardware designs were gathered in Verilog format and their DFGs were extracted using an automated graph generation pipeline. The collection comprised 50 distinct circuit designs and several hardware instances for each circuit design that summed up 143 netlists and 390 RTL codes. As the model worked on pairs of hardware instances, a dataset of 19094 similar pairs and 66631 dissimilar pairs was formed, wherein 20% of these 85725 pairs were dedicated for testing and the rest for training.
The GNN4IP examined a pair of hardware designs, labeled it as piracy (positive) or no-piracy (negative), and outputted a similarity score in range [−1, +1] where the higher score indicated more similarity. The model was evaluated on RTL and netlist datasets, which resulted in the confusion matrices depicted in
The HW2VEC generated vectorized embedding for hardware designs and mapped them to the points in the multi-dimensional space such that similar circuits were nearby. The HW2VEC embeddings were visualized using dimensionality-reduction algorithms such as Principal Component Analysis (PCA) and t-distributed Stochastic Neighbor Embedding (t-SNE).
In the PCA plot, the first two principal components were depicted that expressed the two orthogonal directions, which maximized the variance of the projected data. t-SNE was a nonlinear machine learning algorithm that performed transformations on the data and approximated spectral clustering. Two MIPS processors were chosen with similar functionality for this experiment to harden the differentiation between them. The processors' contrast lies only in their design and specifications. According to the plots, two well-separated clusters of hardware instances were formed such that data points for the same processor design were close. It demonstrated that HW2VEC was a compelling tool to distinguish between various hardware designs. It not only considered the functionality and DFG structure but also recognized the design.
The model identified piracy based on its generated similarity score for two designs, and the decision boundary was controlled by a hyper-parameter δ. The δ was tuned to achieve maximum accuracy, but this could have been adjusted to decide how much similarity is considered piracy. The similarity score was calculated in 3 cases: 1) different designs, 2) different codes with the same design, and 3) a design and its subset. For each case, 4 examples and the mean score for 50 examples are mentioned in
To further evaluate the model, it was tested on a dataset of ISCAS'85 benchmarks and their obfuscated instances in the gate-level netlist format, derived from TrustHub. Obfuscation complicated the circuit and confused reverse engineering but did not change the behavior of the circuit. The model recognized the similarity between the circuits despite the obfuscation because it learned the circuit's behavior. This capability of the model was tested in this experiment by comparing each benchmark with its obfuscated instances and computing each benchmark's average similarity score, presented in
The current state-of-the-art IP piracy detection method is watermarking. The concept of accuracy is not defined for it, and another metric called the probability of coincidence (Pc) is used. It declares the probability that a different designer inserts the same watermark and depends on the watermark signature size. Although the quantitative comparison with watermarking is not plausible, the false-negative rate provides similar intuition in machine learning. The state-of-the-art outperforms its previous rival algorithms by reporting Pc=1.11×10−87 with the cost of adding 0.13% to 26.12% overhead to design. The model false-negative rate was zero for the netlist and 6.65×10−4 for the RTL dataset which was very low and acceptable. Compared to the state-of-the-art, the model had the paramount advantages of zero overhead and resiliency over attacks against watermarking. Moreover, the model was powerful enough to recognize the similarity between designs despite obfuscation.
Instructions that cause at least one processing circuit to perform one or more operations are “computer-executable.” Within the scope of the present invention, “computer-readable memory,” “memory component,” and the like comprises two distinctly different kinds of computer-readable media: physical storage media that stores computer-executable instructions and transmission media that carries computer-executable instructions. Physical storage media includes RAM and other volatile types of memory; ROM, EEPROM, and other non-volatile types of memory; CD-ROM, CD-RW, DVD-ROM, DVD-RW, and other optical disk storage; magnetic disk storage or other magnetic storage devices; and any other tangible medium that can store computer-executable instructions that can be accessed and processed by at least one processing circuit. Transmission media can include signals carrying computer-executable instructions over a network to be received by a general-purpose or special-purpose computer. Thus, it is emphasized that (by disclosure or recitation of the exemplary term “non-transitory”) embodiments of the present invention expressly exclude signals carrying computer-executable instructions. However, it should be understood that once a signal carrying computer-executable instructions is received by a computer, the type of computer-readable storage media transforms automatically from transmission media to physical storage media. This transformation may even occur early on in intermediate memory such as (by way of example and not limitation) a buffer in the RAM of a network interface card, regardless of whether the buffer's content is later transferred to less volatile RAM in the computer.
Although there has been shown and described the preferred embodiment of the present invention, it will be readily apparent to those skilled in the art that modifications may be made thereto which do not exceed the scope of the appended claims. Therefore, the scope of the invention is only to be limited by the following claims. In some embodiments, the figures presented in this patent application are drawn to scale, including the angles, ratios of dimensions, etc. In some embodiments, the figures are representative only and the claims are not limited by the dimensions of the figures. In some embodiments, descriptions of the inventions described herein using the phrase “comprising” includes embodiments that could be described as “consisting essentially of” or “consisting of”, and as such the written description requirement for claiming one or more embodiments of the present invention using the phrase “consisting essentially of” or “consisting of” is met.
The reference numbers recited in the below claims are solely for ease of examination of this patent application, and are exemplary, and are not intended in any way to limit the scope of the claims to the particular features having the corresponding reference numbers in the drawings.
This application claims benefit of U.S. Provisional Application No. 63/233,575 filed Aug. 16, 2021, the specification of which is incorporated herein in its entirety by reference.
This invention was made with government support under Grant No. N00014-17-1-2499 awarded by the Office of Naval Research. The government has certain rights in the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US22/75007 | 8/16/2022 | WO |
Number | Date | Country | |
---|---|---|---|
63233575 | Aug 2021 | US |