You are on page 1of 9

This article has been accepted for publication in a future issue of this journal, but has not been

fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
1

On Reverse Engineering-Based Hardware Trojan


Detection
Chongxi Bao, Student Member, IEEE, Domenic Forte, Member, IEEE, and Ankur Srivastava, Member, IEEE

AbstractDue to design and fabrication outsourcing to being Trojan-infected. While these approaches are effective,
foundries, the problem of malicious modications to integrated obtaining such golden models/data is mostly an open problem.
circuits, also known as hardware Trojans, has attracted attention
Motivation. Prior works such as [6] suggest that reverse-
in academia as well as industry. To reduce the risks associated
with Trojans, researchers have proposed different approaches engineering (RE) be used to identify Trojan-free ICs and
to detect them. Among these approaches, test-time detection verify the data used for the golden models. To the best of
approaches have drawn the greatest attention. Many test-time our knowledge, our previous work [1] was the rst one that
approaches assume the existence of a Trojan-free chip/model proposed a method to verify a golden chip using reverse-
also known as golden model. Prior works suggest using reverse-
engineering efciently and accurately. However, [1] is based
engineering to identify such Trojan-free ICs for the golden model.
However, they did not state how to do this efciently. In fact, on a parametric classication approach, which means that its
reverse-engineering is a very costly process which consumes performance is highly dependent on the choice of some design
lots of time and intensive manual effort. It is also very error parameters. This can make it very hard to be trained and tuned.
prone. In this paper, we propose an innovative and robust Contributions. In this paper, we propose another efcient
reverse-engineering scheme to identify the Trojan-free ICs. We
reformulate the Trojan-detection problem as clustering problem. method for verifying a golden chip. Compared with [1], this
We then adapt a widely-used machine learning method, K-Means paper has lots of new contributions:
clustering, to solve our problem. Simulation results using state- In addition to the Support Vector Machine based ap-
of-the-art tools on several publicly available circuits show that
the proposed approach can detect hardware Trojans with high
proach, we develop a K-Means clustering approach to
accuracy rate. A comparison of this approach with our previously automatically learn how to distinguish between expected
proposed approach [1] is also conducted. Both the limitations and and suspicious structures in the ICs. Neither of the two
application scenarios of the two methods are discussed in detail. methods relies on a Trojan-free (golden) IC, which is the
underlying assumption of many other approaches.
Index TermsHardware Trojan detection, reverse-engineering Simulation results on 6 benchmarks show that the per-
based hardware Trojan detection, integrated circuit (IC) security formance of K-Means clustering approach, unlike SVM,
and trust, one-class SVM, K-Means clustering does not depend on the choice of parameters. Thus it is
easier than SVM to be trained and tuned.
I. I NTRODUCTION We also conduct experiments to compare the two ap-
proaches thoroughly in many aspects. We discuss their
More and more integrated circuit (IC) designers are out- advantages, limitations and application scenarios in detail.
sourcing fabrication to foundries and incorporating third-
party intellectual property (IP) cores into their designs. This The rest of the paper is organized as follows: Section II
practice leads to security problems. For example, malicious gives a brief review of reverse-engineering, hardware Trojans
modications to ICs, also known as hardware Trojans (HTs), and detection. Section III denes the problem we want to solve
have been reported. HTs can change IC functionality, reduce and discusses the motivation behind it. Section IV gives a
IC reliability, leak valuable information from the IC, and even quick recap on our previously proposed SVM based approach.
cause denial of service [2]. To reduce the risks associated K-Means clustering approach is elaborated in Section V. In
with Trojans, researchers have proposed different approaches Section VI, experimental results are discussed. A thorough
to detect them. Test-time detection approaches [3][5] have comparison of two methods is conducted. A comparison of
drawn the greatest amount of attention from researchers. In our approaches with some other existing approaches is shown
these approaches, functional and/or side-channel behavior of in Section VII. Finally, Section VIII concludes the paper.
suspect ICs are compared to a golden model that represents
the expected behavior of a Trojan-free IC. If the suspect IC
II. BACKGROUND
deviates sufciently from the golden model, it is classied as
A. Reverse Engineering
This work was supported by the National Science Foundation under Grant
1223233. Reverse-engineering of an IC is the process of analyzing an
D. Forte is with the Department of Electrical and Computer En-
gineering, University of Florida, Gainesville, FL, 32611 USA (e-mail: ICs internal structures, connections, etc. in order to determine
dforte@ece.u.edu). how it was designed and how it operates. A typical RE ow
C. Bao and A. Srivastava are with the Department of Electrical and includes the following steps [7].
Computer Engineering, University of Maryland, College Park, MD, 20742
USA (e-mail: {borisbcx,ankurs}@umd.edu. 1) Decapsulation: The die is removed from its package.

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
2

2) Delayering: Each layer of the die is stripped off one with. They suggest reverse-engineering be used to obtain such
at a time using chemical methods while polishing the a golden chip [6]. Reverse-engineering based approaches apply
surface to keep it planar. the reverse-engineering (RE) process (discussed above) to ICs
3) Imaging: Thousands of high-resolution images of each in order to detect HTs. Basically, the design/netlist uncovered
exposed layer are taken using scanning electron micro- by RE is compared to an intended (golden) netlist. Since these
scope (SEM). The images are stitched together to form approaches are not only time-consuming, but destructive, they
a complete view of the layer using special software. have been pursued the least for HT detection. Their main use
Multiple layers are also aligned at this step so that of RE has been to verify the Trojan-free chips used in the
contacts and vias are lined up with layers above and golden model development [6].
below them. Since all of the above have their own advantages and
4) Annotation: All structures in the device (interconnects, disadvantages, one proposed direction is to apply each for
vias, transistors, etc.) are annotated either manually or the highest HT coverage. For example, post-silicon, RE-based
by using image recognition software [7]. approaches can verify golden chips required for test-time
5) Schematic creation, organization, and analysis: A hier- and run-time golden models. Functional and side-channel ap-
archical or at netlist is generated using the annotated proaches can be used to detect small and large Trojans respec-
images as well as public information (e.g. datasheets). tively inserted during fabrication. Design-time approaches can
All of the above steps are time-consuming and error-prone. be induced to improve the Trojan coverage and observability.
The rst 3 steps essentially extract images of the structures Run-time approaches can act as a last line of defense.
contained in the IC. Removing and polishing layers affect the
structures in the exposed and lower layers, resulting in addi- III. P ROBLEM S TATEMENT AND M OTIVATION
tional noise in their IC structures. The last 2 steps are required Problem Statement. Assume we are given ICs from one or
for circuit/design extraction and are also quite challenging. The more untrusted foundries. We want to determine which ICs
annotation process and the schematic creation/analysis often are Trojan-free (TF) and which have Trojans inserted (TI).
requires input from experienced analysts [7]. We consider that there are three-types of TI cases possible:
Trojan Addition (TA) : These HTs add transistors, gates,
B. Hardware Trojans and Detection and interconnects into the original layout.
Hardware Trojans (HTs) are malicious modications to the Trojan Deletion (TD) : These HTs delete transistors, gates,

circuitry of an IC. They can be made at any untrusted or and interconnects from the original layout.
outsourced phase of the ICs production (design, synthesis, Trojan Parametric (TP) : These HTs perform physical

fabrication, and distribution) [8]. HTs can leak secret infor- changes to the transistors, gates, and interconnects of the
mation, disable the IC, or even destroy the IC [9] making original layout as suggested in [14].
them very dangerous. Examples of TF, TA, TD, and TP are shown in Figure 1. Note
Researchers in academia as well as industry have proposed that the above problem can be viewed as an instance of the
different approaches to detect HTs. These methods fall into classication problem which is given as follows. Assume we
the following four categories. have 2 classes of objects denoted by C0 and C1 . Let each
Design-time approaches have two types: formal verica- object be represented by a feature vector x = (x1 , . . . , xn )
tion and design-for-security (DFS). Formal verication [10] where xi denotes the ith feature, xi R, and n denotes the
requires that the design house prove certain security properties # of features. Given an unknown object A, the problem is to
hold in the design. DFS approaches (e.g., [11]) are aimed at determine the correct class of A. In our case, objects are chips
increasing the controllability and observability of ICs in order under test and TF represents class C0 while the TI cases (TA,
to aid test-time detection approaches. Test-time approaches TD and TP) represent class C1 . We further assume that a batch
consist of tests in addition to normal IC post-manufacturing of ICs manufactured by the same foundry will be either all
tests and are the most widely studied approaches in the Trojan-free or all Trojan-infected. The reason is that making
literature. There are two types: functional testing and side- two masks of the design, one Trojan-free and one Trojan-
channel ngerprinting [5]. Functional testing approaches [3], infected, will be very costly for the foundry. Therefore, by
[4] aim to detect HTs that change the functionality (primary classifying one chip within the batch, we can tell whether this
outputs) of the IC from the intended one. Side-channel n- batch of ICs is Trojan-free or not.
gerprinting [12], [13] is an alternative approach that measures Motivation. Prior works [6] suggest reverse-engineering (RE)-
side channel signals (timing, power, EM, etc.) and uses them to based methods be used to identify Trojan-free ICs in order to
distinguish genuine ICs from Trojan-infested ones. Run-time develop the golden models for other HT detection approaches.
approaches add circuitry that monitors the behavior/state of a However, there has not been any work devoted towards per-
chip after it has been deployed. If deviation from the expected forming this classication. One can only assume that papers
golden behavior is detected, additional circuitry can disable the in the literature would assume a golden netlist and naively
chip or bypass the malicious logic before the HT can do any apply all 5 RE steps (see Section II-A) to extract netlists from
damage. Most test-time and run-time approaches assume that all unknown chips. Only data from those chips with netlists
a Trojan-free chip also known as a golden chip (a chip with that match the golden netlist would be included in the golden
intended functionality and behavior) is available to compare model.

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
3

  160

  320

Pixels



  480

640




800


 160 320 480 640 800
  

   


  Pixels

(a) Trojan Free Case (TF) (b) Trojan Addition Case (TA) Fig. 3: Griding techniques. Part Fig. 4: Golden layout and SEM image of real
of metal1 layer of s298 bench- layout within one grid. Solid rectangle and
mark with grid size 160160 curve denote Z and Y respectively while
pixels is shown. rectangles in dashed line are Zin and Zout .
 

 



 
is dened in Section III using one-class SVM approach. We



give a quick recap of the approach here but direct interested



 



  




readers to [1] for a more detailed explanation.
(c) Trojan Deletion Case (TD) (d) Trojan Parametric Case (TP) Support Vector Machine (SVM) is a popular classication
approach which tries to classify some objects based on some
Fig. 1: Example of three kinds of trojans. SEM image of metal1 layer is shown.
features extracted from them. SVM is rst trained on training
samples to obtain a classier and then uses this classier to
We feel that there are some issues with this naive approach. classify a given object. One-class SVM is used when training
First, some Trojans (e.g., parametric Trojans) can actually be samples from one class is available. This is exactly the case
missed by only comparing netlists. Second, the effort required for our application. The designer can obtain the training chips
by this naive approach is excessive. As [7] pointed out, RE by sampling from the manufactured chips. However, he does
steps 4-5 are time-consuming and require manual input for not know whether they are Trojan-free or Trojan-infected. He
annotation and schematic read-back. Furthermore, [15] states can only assume that they are Trojan-free and let the classier
that reverse-engineering at advanced technology nodes such as detect those outliers (those chips that violate our Trojan-free
22nm is not feasible without access to the gate-level netlist. assumptions).
This means that extracting the gate-level netlists from the The overall approach is summarized in the block diagram
layout images (RE steps 4-5) will be infeasible in technologies shown in Figure 2. We take as input the golden layout, N
beyond 22nm. chips to classify, and parameter values for grid size, noise
In this paper, our goal is to develop a more efcient and margin dnm , etc. The N chips undergo only rst 3 RE steps,
robust RE approach for solving the above classication prob- which result in images of each layer for all N chips. The next
lem. In our approach, we avoid extracting netlists altogether. step is to divide the images for each layer of all N chips into
Instead, we develop a one-class SVM-based approach that non-overlapping grids. Breaking the images into smaller grids
makes a classication decision based on features extracted allows us to parallelize or distribute the processing for each
from the IC images. The key features of our approach are grid. Then, features are extracted for all N chips for each grid
ability to detect all the above Trojan cases in an efcient and in each layer. We train the classier and obtain a decision
automated fashion. Details of our approach are discussed in boundary for each layer using a subset of the chips (possibly
the following sections. even just one chip). After training, we classify the grids in the
each layer of all the N chips as Trojan-free (TF) or Trojan-
IV. T HE SVM A PPROACH inserted (TI) based on the -SVM decision boundaries of each
layer. Finally, we determine a label for each chip based on
A. General Ideas these grid classications.
Assumptions. As discussed above, we wish to solve the We elaborate on two things: feature extraction and the nal
following classication problem: Given N ICs, classify each classication of the chip based on the label of each grid.
as Trojan-free (TF) or Trojan-inserted (TI). To perform the
classication, we assume the following. We assume that the
original design is Trojan-free and Trojans have only been B. Feature Selection
inserted during fabrication. Formal verication and trusted (in- As discussed above, we break the images (layouts) into
house) design are two approaches that guarantee this. We also smaller non-overlapping grids as shown in Figure 3. Features
assume that we have the original physical layout (referred to are extracted from each grid by comparing the corresponding
as the golden layout) for all the layers of the IC. Since the grids of the IC under test (ICUT) with the golden layout grids
designer would ultimately come up with this layout and send (which we know from design).
it to the foundry, it is reasonable to assume we have this. We illustrate many of our features with the help of Figure 4.
Classication via SVM. Our approach utilizes the rst 3 steps The RE image and golden layout of one grid are shown. Let Y
of reverse-engineeringto obtain internal images of each layer denote the structures in the layout image obtained by reverse-
(poly, metal1, etc.) for the ICs. Then we classify the ICs using engineering, which is the curly shape in the gure. Let Z
these images and support vector machines (see below). The denote the structures in the golden layout, which is the solid
key of our approach is to solve a classication problem which rectangle in the middle. Let Zin be Z scaled by a margin dnm .

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
4

Fig. 2: Block diagram of our SVM based Trojan detection approach.

Let Zout be Z expanded by dnm , which we call noise margin.


Zin and Zout correspond to two rectangles in dashed lines.
dnm represents noise in fabrication and reverse-engineering
process that is thought to be reasonable. Let Z denote the
complement of Z, where the universal set is the set containing
all the pixels in the grid (hence Z is the set of pixels outside
Z). (a) (b) (c)
We select ve features which are determined based on area
Fig. 5: Illustration of centroid and use of centroid difference to distinguish two cases.
and centroid differences between the RE and golden layouts. The cross and open dot denote the centroid of structures in the golden layout and
Area differences. Our rst 3 features are obtained by calcu- real layout respectively.
lating the intersection of different areas between the golden
layout and reverse-engineered layout. They are given by the
following equations random RE and fabrication noise. Both cases will produce the
same f1 , f2 , f3 , but centroids will capture the difference.
A(Y Zin ) Equations for the centroid difference features are as follows
f1 = (1)
A(Zin )
|CX(Z) CX(Y )|
A(Y Zout ) f4 = (4)
f2 =1 (2) grid s length
A(Y )
A(Y Zout ) |CY (Z) CY (Y )|
f3 =1 f5 = (5)
(3) grid s height
A(Zout )
where CX(Z) and CY (Z) denote the x and y coordinate of
where A(Z) denotes the area of Z. Equation (1) captures Zs centroid.
how much from the golden layout is missing in the reverse-
engineered layout while Equations (2) and (3) concentrate on
whether there is anything additional in the reverse-engineered C. Final Classication
layout compared to the golden layout. The values of these The nal classication for each chip is decided by looking
features should be 1 if no modications exist. When A(Zin ) = at the number of grids classied as Trojan-Inserted (TI) and
0, which means there is no structure at all in the grid, we set their location. We do not classify a chip as TI if it has only a
f1 = 1 meaning there is no deletion because there is nothing few sparse TI grids. Rather, we assume that in order for the
to delete. When A(Y ) = 0 or A(Zout ) = 0, which means chip to be classied at TI there must be at least n neighboring
either there is no addition or there is no way to add because TI classied grids in the chip. Neighboring grids can be
a grid of golden layout is entirely lled with structure, we set dened within layers (horizontally adjacent grids) and between
f2 = 0 or f3 = 0 respectively. neighboring IC layers (vertically adjacent grids). This is based
The reason that we expand and shrink the original structure on the following two observations. First, because of the grid
by a margin and use them to get rst three features is based size we choose, most likely, the malicious modications will
on the following observation. Process variations and noises in not t in one grid. Thus two or more grids will be affected.
RE process tend to produce imperfections only outside Zin Second, malicious modications tend to be continuous. They
and inside Zout . Thus, any differences within these areas are are either connected in some way on one layer or connected
regarded as acceptable while differences outside these areas to some other malicious modications through neighboring
are suspicious. layers. The maximum number of connected negative grids
Centroid differences. A centroid is dened as the geometric gives us a notion of how large deviations from the golden
center of a mass (e.g., see Figure 5). We calculate features layout there are in the chip under test.
based on the difference between the centroid of the golden It is important to note that even if the attacker knows
layout and ICUT layout because not only do area differences such detection scheme, he cannot hide his Trojans either.
matter, but where these differences occur also matters. Figure 5 The reasons are as follows. To avoid detection, the attacker
explains this in detail. The solid rectangle in the middle is has to make the interconnect discontinuous, i.e. to change
the structure in the golden layout while the shaded area is the interconnect to a different layer every other grid (metal
the structure in the RE image for the ICUT. In both cases, 1, metal 2, metal 1, metal 2, . . . ). However, such abnormal
A(Y ) is the same. But in Figure 5(b), Y is more biased to patterns will be easily agged suspicious by a rule-based
the left which indicates malicious deletion of the right portion. classier. The rule can be simply to check if there exists
In Figure 5(c), Y is more towards the center which indicates a global interconnect that changes its layer (such as from

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
5

metal1 to metal2) every grid. Such interconnect will be agged


suspicious. If the cell it connects to is also suspicious, we i = arg min ||x ci ||2 (7)
i=1,...,k
would classify the chip as Trojan-infected.
Solving the above problem is computationally difcult (NP-
V. T HE K-M EANS C LUSTERING A PPROACH hard) and people have proposed the following heuristic [17]:
The SVM approach introduced above is a parametric clas- Dene number of clusters k
sication approach so its performance depends heavily on the Initialize the k cluster centroids.
choice of several algorithm parameters. If these parameters are For all data points in the dataset, compute the distances
not chosen properly, SVM may suffer from the problem of to the the centroids of all clusters. Assign each data point
over-tting which means it will learn the noise in the training to the cluster with the nearest centroid.
samples and has a very poor generalization ability. Moreover, Recalculate k new cluster centroids resulting from the
the SVM approach only classies each grid as Trojan-free or previous step
Trojan-infected. It really does not give any specic information Repeat step 3-4 until the centroids stop changing.
about Trojan-infected grids like is there a malicious removal Note that unlike SVM approach which has two
of structures or is there a malicious addition of elements. phases:training and classication, K-Means does all the
To tackle these problems, we will investigate the problem things in one-shot. It groups all the data points into k clusters
as a clustering problem and introduce another powerful non- and each data point will automatically be assigned to the
parametric clustering method to solve this problem. cluster with the nearest centroid. In this sense, all data points
can be viewed as training data.
A. Revisit the Problem as A Clustering Problem Several challenges need to be addressed when applying the
We have formulated the problem as a classication problem standard K-Means approach to our problem:
in Section IV and apply one-class SVM to solve this problem. The number of clusters need to be determined rst.
In this subsection, we will investigate this problem and for- Like SVM, relevant features are needed for accuracy.
mulate it in a clustering problem frame. K-Means clustering approach is very sensitive to the
The clustering algorithms are used to group unlabeled data choice of the initial centroids. We need to select these
into different clusters in the following way. Data belonging centroids carefully.
to different clusters should be as different as possible while We will address these challenges in the next subsection.
data of the same cluster should be as close as possible. In
our proposed method, we want to group each grid of the IC C. Our K-Means Clustering based Approach
based on types of intrusions it has (no modications, malicious
The overall ow of our proposed approach is shown in
addition, malicious deletion, etc.). The objective is to obtain
Figure 6. Like what we did in the SVM approach, we need
a clustering machine that can correctly group grids with no
to divide the image of layout into grids and extract features
modications into one cluster and group grids with different
from each grid to form feature vectors. Next we apply K-
types of malicious inclusions into other different clusters. After
Means clustering approach to group these feature vectors into
the clustering is done, we could apply the technique introduced
k clusters. As a nal step, we apply the same technique
in Section IV-C to determine the label for the whole IC.
introduced in Section IV-C. We say that grids which are in the
cluster that represents Trojan-free (TF) case TF grids. All the
B. General K-Means Clustering Approach
rest grids are Trojan-infected (TI) grids. We count the number
K-Means is a clustering technique that attempts to nd of connected TI grids. If it exceeds a certain threshold, we say
a user-dened number (k) of clusters represented by their that the chip is TI. We determine several key aspects of our
centroids such that all data can be grouped into these clusters. K-Means clustering approach as follows:
The K-Means algorithm takes as input the parameter k and The number of clusters. As mentioned in Section V-A, we
partitions a set of n data points into k clusters in such a way would like to group the grids based on the types of intrusions
that the resulting intra-cluster similarity is high but the inter- each grid has. Fundamentally there will be two kinds of
cluster similarity is low. intrusions in each grid: the Trojan will either add or delete
To put it in a more rigorous way, K-Means clustering ap- some structures (note that parametric Trojans, which change
proach K-Means approach partitions a dataset DST consisting the parameters of a structure such as wire-width, is a special
 represented by feature vectors into k clusters:
of data points case of one of these two cases). Considering that the grid can
DST = i=1,...,k Si , Si Sj = , i = j such that the also be Trojan-free, this gives a total of three clusters. That is,
following criterion is minimized: we would like to group the grids of each IC into 3 clusters: one
k  represents Trojan-free case, one represents malicious addition

E= ||x ci ||2 (6) case and one represents malicious removal case.
i=1 xSi
Feature selection. As mentioned above, there are two funda-
 mental modications that Trojans might make: addition and
x
where ci = xS |Si |
i
is the centroid of all data in cluster i [16]. deletion. All modications that Trojans make can be seen as
Then each data point x is assigned a label i if x is closest to a combination of these two. So we would like two features to
ci . That is, assign x label i dened by: capture these two basic modications: the amount of addition

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
6

Fig. 6: Block diagram of our K-Means based Trojan detection approach.

TABLE I: Benchmarks used and classication accuracy rate averaged over 500
and the amount of deletion. Since features dened by Eqn (1) trials using SVM.
and (3) in Section IV-B give exactly what we want, we will Benchmark #gates Source TF TA TD TP
use these two features as our K-Means clustering features. We s27 57 ISCAS89 100% 100% 100% 99.8%
exclude other features described in Section IV-B from our K- s298 283 ISCAS89 100% 100% 100% 99.6%
s280 3455 ISCAS89 100 % 100% 100% 100%
Means clustering features because they are irrelevant. s15850 10984 ISCAS89 100% 100% 100% 99.8%
Initial centroids selection. Let x = (f1 , f3 ) be the feature s38417 30347 ISCAS89 100% 100% 100% 100%
b18 122559 ITC99 99.4% 100% 100% 100%
vector where f1 and f3 are dened by Eqn (1) and (3)
respectively. As discussed in Section IV-B, when there is no 
  
 
malicious deletion, f1 should be as close to 1 as possible.  

When there is no malicious addition, f3 should be as close to  

 
1 as possible. Thus our initial choice of the centroid of the





 

cluster that represents the Trojan-free case is (1,1). If there is  
 
some malicious deletion, f1 would deviate signicantly from  

1. We choose (0.5, 1) as the initial centroid of the cluster that 
       


       




represents the malicious deletion case. Similarly, we choose (a) Golden layout (b) Real layout
(1,0.5) as the initial centroid of the cluster that represents the
malicious addition case. Fig. 7: Simulation of process variations in reverse-engineering process

D. Merits of K-Means Clustering based Approach


This le was later parsed by a Matlab script and used to
Note that like SVM approach, K-Means based approach is generate a binary image for each layer. Each pixel in the
still a feature vector based layout-level comparison approach. image represents 5nm in reality. 1 in the image denotes there
Therefore, it has all the advantages that SVM has over are structures at that position in the golden layout while 0
traditional approaches. To name a few, it eliminates RE steps denotes that there is nothing in the golden layout.
4 and 5, allows for parallel extraction of features and accounts Trojan insertion. For each benchmark, we implemented three
for noise in the RE ICs. Besides, K-Means clustering based kinds of malicious modications. We randomly duplicated one
approach has some additional advantages: component (a component is a collection of randomly selected
K-Means clustering approach is a non-parametric method. gates and the number of the gates in different components
Its performance does not rely on the choice of parameters varies from 1 to 10), deleted one component and selected one
as heavily as SVM. So K-Means is very easy to work gate and doubled its gate width. We will refer to these three
with. kinds of modications as Trojan addition (TA), Trojan deletion
K-Means is a clustering approach so the cluster label of (TD) and Trojan parametric (TP). We will refer to Trojan-
each grid give an idea of what malicious modications free chip as TF. For each class of the Trojan, we repeated
there are in the grid. For example, if a grid is in the cluster the component selection step 50 times to generate 50 Trojan
that represents the malicious addition case, we know designs respectively for TA, TD and TP. We then simulated
that there might be malicious additions inside this grid. fabrication and reverse-engineering noise (see Figure 7) and
Therefore, unlike SVM which could only classify the grid generated 10 sample chips for each Trojan design. In total,
as TF or TI, K-Means based approach allows more ne- 500 TA, 500 TD, and 500 TP sample chips were generated.
grained classication and gives more information about We also generated 500 sample chips for TF.
the chip. ICUT generation and noise. Using the same method as
A thorough comparison between SVM and K-Means based golden layout extraction, we generated binary images for these
approach will be shown later in Section VI-D. modied designs. To simulate process variations in fabrication
and reverse-engineering, we added some random noise to these
VI. E XPERIMENTS AND R ESULTS binary images. Figure 7 shows the noise. Those images with
A. Experiment Setup noise would be used as SEM images of ICUT.
Benchmarks. We tested our approaches on 6 publicly available
benchmarks (see Table I). They were all synthesized using
B. One-Class SVM based Approach
Cadence RTL Compiler with Synopsys 90nm Generic Library
and placed and routed with Cadence Encounter. We refer the readers to [1] for detailed experimental setup
Golden layout extraction. The golden layout was then ob- and results. Here, we only show the classication accuracy
tained by GDSII le generated by Cadence Encounter tool. rate (dened in Eqn (8)) of the SVM-based approach for

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
7

TABLE II: Chip classication accuracy rate averaged over 500 trials using K-Means TABLE III: Chip classication accuracy percentage averaged over 500 trials using
clustering based approach SVM and K-Means clustering based approach under different noise levels

Benchmark TF TA TD TP Noise Level Small


s27 100% 100% 100% 98.8% TF TA TD TP

s298 100% 100% 100% 97.6% #Training Chips K S K S K S K S
s280 99.2% 100% 100% 99.6% 5 100 100 100 100 100 100 100 100
s15850 97.2% 100% 100% 98.4% 4 100 100 100 100 100 100 100 100
s38417 100% 100% 100% 100% 3 100 100 100 100 100 100 96.4 98.8
b18 99.0% 100% 100% 98.8% 2 100 92.4 85.2 100 100 100 82.8 98.2
1 92.8 90.4 45.8 100 100 100 40.4 94.6
Noise Level Medium
5 28.6 100 100 100 100 100 100 100
comparison purpose (see Table I). Note that different from [1], 4 17.4 93.8 100 100 100 100 100 100
3 12.6 96.4 100 100 100 100 100 100
the results are averaged over 500 trials. 2 13.8 91.2 88.2 100 100 97.6 86.4 99.6
1 9.6 89.2 86.2 100 100 93.2 81.2 100
#mislabeled chips
racc = (8) Noise Level Large
#chips under test 5 0 87.4 100 100 100 4.2 100 100
4 0 77.2 100 100 100 18.6 100 97.2
3 0 75.8 100 100 100 23.2 100 98.4
C. K-Means Clustering based Approach 2 0 71.2 100 100 100 28.6 100 97.4
1 0 79.6 100 100 100 30.4 100 96.2

1) Experiments and Results Recorded: We generated 500
K stands for K-Means clustering based method
S stands for SVM based method
TF, 500 TA, 500 TD and 500 TP chips. K-Means clustering
approach introduced in Section V was then applied and each
chip was classied as Trojan-free or Trojan-infested. The into K-Means clustering approach. During this step, training
algorithm consumes the most time in extracting features from ICs are used to obtain k centroids and these k centroids are
each grids. All other things are almost instantly done, which xed after the training step is done. Then when a new IC needs
is the same as SVM (thus the total run time is almost the same to be classied, each grid of this IC is assigned to the cluster
as SVM). Accuracy rate dened in Equation (8) was recorded with nearest centroid and nal classication step is done to
for each case. This whole process was repeated for 500 trials classify the whole IC as Trojan-free or Trojan-infected.
and accuracy rate was averaged over these 500 trials. We also vary the amount of noise in the reverse-engineering
2) Results and Discussion: Table II demonstrates that our process (shown in Figure 7) . We choose three different noise
K-Means clustering based method can detect three kinds of levels and test the performance of two methods under these
malicious modications, including malicious addition, dele- three noise levels. Note that we introduce the noise margin
tion and parametric changes, with high accuracy rate while in Section IV-B. Thus large noise means there is a large
recognizing Trojan-free chips reliably. difference between our estimated noise margin and the true
value of this parameter while small noise means that our
D. A Comparison of Two Approaches estimation is pretty close to its true value. The results in
Table I and Table II show that both SVM based approach Table III show the following:
and K-Means clustering based approach can achieve very high When the noise level is small, both methods can classify
accuracy rate on all benchmarks while giving very few false the chip correctly with very high accuracy rate given
positives. To see the limitations of each method, we x s298 as enough training samples. However, as the number of
our benchmark and test the performance of each method with training samples decreases, the performance of one-class
different number of training chips under different noise levels. SVM degrades slightly while K-Means clustering breaks
We have previously stated that one huge advantage of our down quickly. This implies that one-class SVM needs
methods is that we do not require a golden chip to be available much less training samples than K-Means clustering ap-
to classify all the chips. However, in some cases, such a golden proach and thus has a much better generalization ability.
chip might indeed be available. Thus during this subsection, When the noise level increases, the performance of
we will distinguish between two cases where a golden chip is both methods degrades and K-Means clustering approach
available and where no golden chips are available. breaks down faster. When the noise level increases even
1) No Golden Chips Are Available.: This is the initial further, K-Means clustering approach completely lost its
motivation of this paper: to verify a chip is Trojan-free when efcacy (its performance is the same as a naive classier
no golden chips are available. In this case, it is reasonable which always classies a chip as Trojan-infected) while
to assume that each chip is from TF/TA/TD/TP class with SVM approach can still make some right classications.
an equal probability without any prior knowledge (such as This implies that SVM approach is more resistant to the
the trustworthiness of the foundry). We vary the number of noise in the dataset than K-Means.
training chips from 1 to 5 and the training process assumes that 2) A Golden Chip Is Available: This is a very strong
the chips belong to any of the four cases with equal probability. assumption and is very often not true. We only make this
Note that K-Means clustering approach does not need assumption to see whether the availability of a golden chip will
training steps, instead it uses all the chips available and does help improve the performance of the two methods. Note that
clustering in one shot. Therefore, to gain a fair comparison, we have shown that our proposed two methods will classify
we modify K-Means clustering approach slightly to x the the chip correctly without this assumption.
number of training chips. To do this, we add a training step In this experiment, we will use only one chip, which is a

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
8

TABLE IV: Chip classication accuracy rate averaged over 500 trials using SVM
and K-Means clustering based approach with one training chip more information, like what kind of malicious modications
TF TA TD TP
are made, about a chip besides the only fact that it is Trojan-
Noise Level K S K S K S K S infected or when there it is very hard to tune the parameters
Small 84.8 88.2 95.4 100 100 100 96.4 99.2
Medium 36.2 61.4 81.8 100 100 100 88.2 98.2
of SVM, we should use K-Means clustering based approach.
Large 0 66.4 100 100 98.2 39.4 100 100 When it is very hard for us to estimate the exact value
of noise margins (when the noise is large), we should use
TABLE V: A comparison between SVM and K-Means clustering approach SVM approach. In all other cases where both approaches are
SVM K-Means applicable, we should use SVM as often as possible since it
Performance depends on parameter? Heavily No
Number of training samples needed Small Many
shows a better performance in general.
Generalization ability Good Not as good as SVM
Training speed Fast Comparable
Sensitive to noise No Yes VII. C OMPARISON W ITH OTHER A PPROACHES
Allow ne-grained classication? No Yes
In this section, we go over some of the existing detection
approaches in the literature and argue why our approach is
favored over others.
Trojan-free chip as the training chip to train SVM/K-Means
Functional testing based approaches may fail to work when:
clustering machine. We will then generate 500 TF chips,
a Trojan is not triggered during testing; the effect of the
500 TA chips, 500 TD chips and 500 TF chips and test the
Trojan is not observable from primary outputs. The side-
classication accuracy rate over these test chips. We also vary
channel analysis approaches suffer from process variations and
the amount of noise in the reverse-engineering process.
perform poorly on the detection of small Trojans. Reverse-
Note that one issue when training K-Means clustering
engineering based approaches, on the other hand, are arguably
machine using one Trojan-free chip is that all data points will
among the strongest detection approaches. Our approach can
converge to only one cluster which represents the Trojan-free
detect Trojans that are hard to be detected by other approaches.
case. We cannot get the centroids of the other two groups. This
For example, attacks on the global interconnect such as wire
means we can and only can learn how much variation will be
sizing are very hard to be captured by side-channel analysis.
made by the reverse-engineering process. One way to get out
However, it is guaranteed that our approach will detect it.
of this dilemma is to introduce a threshold number which
The performance of functional testing strongly depends on
represents the amount of deviations acceptable. We use this
the coverage of automatic test pattern generation (ATPG). If
threshold together with the rst cluster center to generate the
the Trojan trigger is not covered by ATPG, then the Trojan will
cluster center of the other two clusters. For example, we get
most likely remain undetected. Even with advanced techniques
a cluster center (0.98, 0.97) during training. We consider =
such as [4], the coverage for the Trojan is only 68.35% for
50% amount of noise to be reasonable. We can generate the
benchmark s15850 for 4 trigger nodes, while our approaches
second cluster center as (0.98 (1 ), 0.97) = (0.49, 0.97)
can achieve over 98.4% detection accuracy.
and the third cluster center as (0.98, 0.97 (1 )) =
Some side-channel analysis based approaches try to enhance
(0.98, 0.485). After obtaining these cluster centers, we can
the signal to noise ratio during detection, and can achieve
proceed using the modied K-Means clustering approach as
100% accuracy on s15850 [18]. However, they require the
described in Section VI-D1.
existence of a golden chip which is very hard to verify or
Throughout this experiment, we set = 50%. The results
obtain. Other side-channel analysis approaches try to eliminate
are listed in Table IV. Compared with III, we see that the
the golden chip assumption by using self-referencing, but due
availability of golden chips help improve the accuracy rate of
to process variations, the performance is not very good (85%
K-Means clustering approach a lot while it does not help the
for s15850 in [19]). On the contrary, our approaches eliminate
SVM approach. This is because the availability of a golden
the golden chip assumption and perform very well. They can
chip will help K-Means clustering approach gure out the
be used to verify that a chip is golden for other approaches.
center of the Trojan-Free cluster accurately. This will improve
Recently a novel side-channel analysis approach based on
the overall classication accuracy. On the other hand, one-
gate-level characterization (GLC) has been proposed [20].
class SVM does not have a way to employ the fact that the
GLC is the process of characterizing each gate of an integrated
training chip is golden thus its performance does not improve.
circuit (IC) in terms of its physical properties. It eliminates
the need for a golden chip and achieves very high accuracy.
E. Final Discussion However, their work cannot detect attacks on the global
interconnect while ours can.
We now give a thorough comparison of two approaches in
Table V. We can conclude that when SVM usually performs
better than K-Means clustering approach. This is expected VIII. C ONCLUSION
because SVM is a more sophisticated approach. However, In this paper, we applied K-means clustering to RE based
SVM needs several parameters to be tuned and can be hard Trojan detection approach. It is efcient in storage space, do
to train. K-Means clustering approach, on the other hand, is not require the existence of a golden chip and is robust to
a less complexed model and easy to train. Besides, it gives variations in fabrication and RE process. The experimental
extra information about Trojan-infected grids. However, it is results on several publicly available benchmarks show that
more sensitive to noise. Therefore, when we need to know very high Trojan detection accuracy can be achieved. A

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/TCAD.2015.2488495, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
9

thorough comparison of the proposed approach and [1] is Chongxi Bao Chongxi Bao (S14) received his B.S.
conducted and suggested application scenarios are provided. degree in Mechanical Engineering from Tsinghua
University, Beijing, China in 2008. He is currently
pursuing his Ph.D. degree in the ECE department at
R EFERENCES University of Maryland, College Park.
His current research interests include trusted hard-
[1] C. Bao, D. Forte, and A. Srivastava, On application of one-class ware design, IC anti-counterfeiting, and security
SVM to reverse engineering-based hardware trojan detection, in Quality issues in 3D Integrated Circuits.
Electronic Design (ISQED), 2014 15th International Symposium on.
IEEE, 2014, pp. 4754.
[2] R. Karri, J. Rajendran, and K. Rosenfeld, Trojan taxonomy, in Intro-
duction to Hardware Security and Trust, M. Tehranipoor and C. Wang,
Eds. Springer New York, 2012, pp. 325338.
[3] Xuehui Zhang and M. Tehranipoor, Case study: Detecting hardware
trojans in third-party digital IP cores, May, pp. 6770.
[4] R. Chakraborty, F. Wolff, S. Paul, C. Papachristou, and S. Bhunia,
MERO: a statistical approach for hardware trojan detection, in Cryp-
tographic Hardware and Embedded Systems - CHES 2009, ser. Lecture
Notes in Computer Science, C. Clavier and K. Gaj, Eds. Springer
Berlin Heidelberg, 2009, vol. 5747, pp. 396410.
[5] Y. Jin and Y. Makris, Hardware trojans in wireless cryptographic
integrated circuits, Design & Test, IEEE, vol. PP, no. 99, pp. 11,
2013. Domenic Forte Domenic Forte (S09M13) re-
[6] S. Narasimhan and S. Bhunia, Hardware trojan detection, in Introduc- ceived the B.S. degree in Electrical Engineering
tion to Hardware Security and Trust. Springer, 2012, pp. 339364. from Manhattan College, Riverdale, NY, USA, in
[7] R. Torrance and D. James, The state-of-the-art in semiconductor reverse 2006, and the M.S. and Ph.D. degrees in Electri-
engineering, in Proceedings of the 48th Design Automation Conference. cal Engineering from the University of Maryland,
ACM, 2011, pp. 333338. College Park, MD, USA, in 2010 and 2013, respec-
[8] A. Baumgarten, M. Steffen, M. Clausman, and J. Zambreno, A case tively.
study in hardware trojan design and implementation, International From 2013 to 2015, he was an Assistant Professor
Journal of Information Security, vol. 10, no. 1, pp. 114, 2011. of the Department of Electrical and Computer Engi-
[9] M. Tehranipoor and F. Koushanfar, A survey of hardware trojan neering, University of Connecticut in Storrs, CT. He
taxonomy and detection, Design & Test of Computers, IEEE, vol. 27, is currently an Assistant Professor with the Electrical
no. 1, pp. 1025, 2010. and Computer Engineering Department, University of Florida, Gainesville,
[10] Y. Jin and Y. Makris, Proof carrying-based information ow tracking FL, USA, where he has been since July 2015. His research is primarily focused
for data secrecy protection and hardware trust, in VLSI Test Symposium on the domain of hardware security and includes investigation of hardware
(VTS), 2012 IEEE 30th. IEEE, 2012, pp. 252257. security primitives, hardware Trojan detection and prevention, security of the
[11] H. Salmani, M. Tehranipoor, and J. Plusquellic, A novel technique electronics supply chain, and anti-reverse engineering. He has served on the
for improving hardware trojan detection and reducing trojan activation program committees of several workshops and conferences in addition to
time, Very Large Scale Integration (VLSI) Systems, IEEE Transactions serving as session chair in many technical events.
on, vol. 20, no. 1, pp. 112125, Jan. 2012. Dr. Forte was a recipient of the Northrop Grumman Fellowship and the
[12] S. Narasimhan, X. Wang, D. Du, R. Chakraborty, and S. Bhunia, George Corcoran Memorial Outstanding Teaching Award by the Electrical and
TeSR: a robust temporal self-referencing approach for hardware trojan Computer Engineering Department at University of Maryland. His work has
detection, in Hardware-Oriented Security and Trust (HOST), 2011 been recognized through several best paper awards and nominations, including
IEEE International Symposium on, Jun. 2011, pp. 71 74. Adaptive Hardware Systems (AHS) 2011 and Design Automation Conference
[13] S. Narasimhan, Dongdong Du, R. Chakraborty, S. Paul, F. Wolff, (DAC) 2012.
C. Papachristou, K. Roy, and S. Bhunia, Multiple-parameter side-
channel analysis: A non-invasive hardware trojan detection approach,
pp. 1318.
[14] Y. Shiyanovskii, F. Wolff, A. Rajendran, C. Papachristou, D. Weyer, and
W. Clay, Process reliability based trojans through nbti and hci effects,
in Adaptive Hardware and Systems (AHS), 2010 NASA/ESA Conference
on. IEEE, 2010, pp. 215222.
[15] S. M. Plaza and I. L. Markov, Solving the third-shift problem in ic
piracy with test-aware logic locking, 2015.
[16] D. Fradkin and I. Muchnik, A study of k-means clustering for im-
proving classication accuracy of multi-class SVM, Technical Report.
Rutgers University, New Brunswick, New Jersey 08854, Tech. Rep.,
2004.
[17] A. Chandrasekhar and K. Raghuveer, Intrusion detection technique Ankur Srivastava Ankur Srivastava (S00M02)
by using k-means, fuzzy neural network and SVM classiers, in received his B.Tech in Electrical Engineering from
Computer Communication and Informatics (ICCCI), 2013 International Indian Institute of Technology Delhi in 1998, M.S.
Conference on. IEEE, 2013, pp. 17. in ECE from Northwestern University in 2000 and
[18] M. Banga and M. S. Hsiao, A novel sustained vector technique for the Ph.D. in Computer Science from UCLA in 2002. He
detection of hardware trojans, in VLSI Design, 2009 22nd International is currently a Full Professor in the ECE department
Conference on. IEEE, 2009, pp. 327332. with joint appointment with the Institute for Systems
[19] M. Li, A. Davoodi, and M. Tehranipoor, A sensor-assisted self- Research at University of Maryland, College Park.
authentication framework for hardware trojan detection, in Proceedings He is the associate editor of IEEE Transactions
of the Conference on Design, Automation and Test in Europe. EDA on VLSI and INTEGRATION: VLSI Journal.
Consortium, 2012, pp. 13311336.
[20] S. Wei and M. Potkonjak, Scalable hardware trojan diagnosis, Very
Large Scale Integration (VLSI) Systems, IEEE Transactions on, vol. 20,
no. 6, pp. 10491057, 2012.

0278-0070 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

You might also like