Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 39, NO.

1, JANUARY 2020 25

PMTP: A MAX-SAT-Based Approach to Detect


Hardware Trojan Using Propagation of
Maximum Transition Probability
Ahmad Shabani and Bijan Alizadeh , Senior Member, IEEE

Abstract—Hardware Trojan attacks have emerged as a major is the malicious effect or Payload where the Trojan deviates
security issue for hardware at different level of abstractions, an internal circuit net from its desired value leading to mal-
which relate to malicious tampering of a hardware during design function when the triggering condition is fulfilled [2]. Existing
or fabrication process. In this paper, a new low overhead and
high speed design for trust methodology for increasing both full nondestructive Trojan detection-based methods can be broadly
activation and side channel sensitivity of Trojan is proposed. The classified into logic testing and side channel analysis. In logic
main idea is that the increase in transition probability of individ- testing, the underlying challenge is to satisfy the rare condi-
ual nets does not necessarily increase the transition probability of tion of Trigger unit besides to manifest the injected erroneous
the succeeding nets of the circuit. Accordingly, the rules and con- logic by applying special test patterns [5], [6]. Meanwhile,
flicts of the propagation of maximum transition probability for
individual gates have been presented to ensure that a full transi- vast majority of researches developed till date inspect the
tion path is constructed between each low transition probability anomaly in the side channel parameters (e.g., delay, transient,
net and primary inputs of the circuit. The results show that and leakage power) of the circuit with inserted Trojan [7], [8].
the proposed methodology achieves superior efficiency in Trojan However, these approaches mainly suffer from detection inac-
full activation by more than 4× through logic testing approach curacy for Trojans with small size in the presence of process
besides higher sensitivity averagely around 20× for power-based
side channel analysis compared to existing methods. variations.
The main concept of multiple excitation of rare occur-
Index Terms—Boolean satisfiability (SAT), hardware secu- rence (MERO), as a prominent approach in logic testing, is
rity, hardware Trojan (HT), maximum Boolean SAT (Max-SAT)
solver, Trojan detection. to derive an optimal test patterns in order to activate a set of
candidate nets individually to their rare logic values multiple
times [5]. Later, Saha et al. [6] proposed an enhanced version
I. I NTRODUCTION of MERO scheme, which in turn can more effectively activate
UE TO remarkable growth in globalization of inte- and propagate the malicious impact of Trojan by combining
D grated circuits (ICs), and widespread outsourcing of ICs
manufacturing to untrusted fabrication facilities or foundries
the genetic algorithm and Boolean satisfiability (SAT) test gen-
erations. Nevertheless, these generated test patterns are only
located across the world, a new emerging thread known well designed to further trigger the rare condition of Trojan’s
as hardware Trojan (HT) brought to light just a decade inputs, and have a limited applicability for side channel anal-
ago [1], [2]. An adversary can introduce HTs with the aim ysis. So, Huang et al. [8] proposed another scheme named
of causing disruption in the normal functional behavior or as MERS specially for power-based side channel aware test
leaking vital information from a chip to an unauthorized generation. Another alternative to the Trojan detection meth-
party [3]. ods is to employ design modification techniques to either
Over the past decade, different types of Trojan attack mod- facilitate detection or to prevent insertion of Trojans, which
els and counteraction methods have been reported [2], [4]. are also commonly referred as design for trust (DFT) tech-
A Trojan in its simplest form, can be mounted by incorpo- niques. In [9] and [10], DFT schemes were developed aiming
rating two distinct parts: 1) Trigger unit and 2) the Payload. at shortening activation generation time by inserting scan flip-
In order to activate a Trojan, the rare triggering condition real- flops and multiplexers. The insertion procedure tries to ensure
ized by Trigger unit must be satisfied. The other part of Trojan that all the circuit nets are switched to a transition probabil-
ity above a threshold. However, such DFT methods introduce
Manuscript received April 6, 2018; revised July 13, 2018 and large area and power overheads imposed by complex insertion
October 19, 2018; accepted December 13, 2018. Date of publication
December 25, 2018; date of current version December 23, 2019. This paper points [2].
was recommended by Associate Editor Y. Makris. (Corresponding author: In this paper, we develop a new low overhead and high
Bijan Alizadeh.) speed DFT methodology together with special test-vector gen-
The authors are with the Design, Verification and Debugging of Embedded
Systems Laboratory, School of Electrical and Computer Engineering, eration to rise the transition of low controllable nets to the
College of Engineering, University of Tehran, Tehran 14399-57131, Iran maximum transition probability (MTP). The key idea relies
(e-mail: ah.shabani@ut.ac.ir; b.alizadeh@ut.ac.ir). on the fact that recklessly increasing transition probability
Color versions of one or more of the figures in this paper are available
online at http://ieeexplore.ieee.org. of individual nets does not necessarily increase the number
Digital Object Identifier 10.1109/TCAD.2018.2889663 of transition of the succeeding nets in logical fan-out cone.
0278-0070 c 2018 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.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
26 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 39, NO. 1, JANUARY 2020

(a) (b) (c)

Fig. 1. Probability distribution versus signal probability of being “1” of fan-ins (P1a and P1b ). a) AND/NAND. b) OR/NOR. and c) XOR/XNOR.

Regarding this matter, the main contributions of this paper are Definition 3 (Shared Forbidden Net): A shared forbidden
as follows. net (Sf n ) is an fn which is shared by multiple basic gates.
1) The rules and conflicts of the propagation of Definition 4 [Forbidden Fan-Out (FOF) Hash]: FOF is
MTP (PMTP) for individual gates are presented in such a hash that contains all the X fan-outs of an Sf n . In other
a way that a full transition path is constructed between words, this hash receives an Sf n as its key, and generates all
each low transition probability net and primary inputs the X fan-outs sharing Sf n .
of the circuit during a backward process.
2) We successfully adapt the PMTP requirements to the
A. Proposed PMTP Rules and Conflicts
form of maximum Boolean SAT (Max-SAT) problem
leading to a fast and easily implemented methodology In order to reach the MTP, we need to analyze the tran-
so as to satisfy the constraints imposed by PMTP rules. sition probability distribution at the output of basic gate as
3) Besides, deterministic test generation and special inser- illustrated in Fig. 1. By inspecting the probability distribution
tion points have been introduced ensuring that all the versus signal probability of being 1 of fan-ins, we can simply
nets with low transition probability below a certain extract the required PMTP rules, as will be presented in the
threshold are switched to the MTP. following.
The rest of this paper is organized as follows. The basic Rule 1: The MTP at the output of the AND/NAND gate
concepts of the proposed methodology are presented in is when transition probability of one of its input is in the
Section II. Next, the proposed methodology will be discussed maximum level (X net) and that of the other input (fn ) is zero
in detail in Section III, which will be analyzed to extract results sticking at 1 (ST1), as shown in Fig. 1(a).
in Section IV. Finally, a comprehensive conclusion will be Rule 2: In OR/NOR gate, the MTP at the output of gate is
presented in the last section. achieved when one of its input is in the MTP (X net), while
the other one is sticking at 0 (ST0) as shown in Fig. 1(b).
Rule 3: The MTP condition for XOR/XNOR gate can be
achieved in several controllable ways which are illustrated
II. M AX SAT-BASED M ETHODOLOGY U SING PMTP in Fig. 1(c). One controllable way to reap the benefits of
RULES AND C ONFLICTS the MTP in XOR/XNOR gate is to keep both its inputs
According to the static probability analysis, we can obtain in MTP.
a signal with MTP, i.e., 0.25, only when its signal probabili- Rule 4: For NOT gate, the MTP condition simply requires
ties being “0” and “1” are equal to 0.5. However, the transition the MTP in its input.
probability at the output of a basic gate, such as NAND and It is worth mentioning that these PMTP conditions are not
NOR will not be maximized (close to 0.18) even when the gate singular, which means that there exist other valid combina-
is supplied with two inputs with the MTP. As a result, reck- tions to satisfy MTP as well. However, only the controllable
lessly increasing transition probability of individual nets yields conditions have been selected as four PMTP rules. After apply-
nonmaximal or even degraded transition probability of suc- ing PMTP rules in backward manner, there is possibility that
ceeding nets in the fan-out cone. Accordingly, we will develop some nets of the circuit violate the above PMTP rules in differ-
the PMTP rules and conflicts to propagate maximum transi- ent forms of conflict. Thus, it is crucial to understand how to
tion probability. Before any further explanation, let us define extract these conflicts and resolve them to avoid any erroneous
some terms that are frequently used in the rest of this paper. transition propagation. In summary, conflicts are classified into
Definition 1 (X Net): An X net (net with X label) is a net three different types: X, SFN, and unsatisfiability (UNSAT)
of the circuit which is expected to switch into MTP. conflicts, as will be explained in the following.
Definition 2 (Forbidden Net): A forbidden net (fn ) is a non- Conflict 1 (X Conflict): The X conflict occurs at the output
X input of a basic gate (AND/NAND/OR/NOR) whose output of a basic gate only when both its inputs have X label so that
has been already marked by X net. the output of gate is in the nonmaximal transition probability

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
SHABANI AND ALIZADEH: MAX-SAT-BASED APPROACH TO DETECT HT USING PMTP 27

(a) (b)

Fig. 2. Examples of arising conflicts. a) X conflict. b) SFN conflict.

(i.e., close to 0.18) indicating violation in the first or the second


PMTP rule as shown in Fig. 2(a).
Conflict 2 (SFN Conflict): The SFN conflict occurs if
multiple basic gates with opposing PMTP requirements share
the same fn . The reason is that the gate with type AND/NAND
desires to stick the Sf n net at logic 1 based on PMTP Rule 1,
whereas the OR/NOR gate has an opposing requirement based
on PMTP Rule 2 as shown in Fig. 2(b).
Conflict 3 (UNSAT Conflict): The main objective of Max-
Fig. 3. Proposed integrated methodology using PMTP rules and conflicts.
SAT solver is to find an optimum assignment that satisfies
all Hard clauses together with the maximum number of Soft
clauses [11]. In this paper, the required constraints related to
the PMTP rules are imposed as unit Hard clauses on Max-SAT the PMTP rules are appended to the CNF file, then updated
solver. Therefore, it is expected that some Soft constraints are CNF file is given to the MAX-SAT solver. Finally, in the last
violated so that they breach the PMTP rules. This situation is step, existing conflicts are resolved by employing special inser-
referred to as UNSAT conflict. tion points in the circuit. The final outcomes of the proposed
integrated methodology are optimized test patterns generated
B. Partial Maximum Satisfiability from MAX-SAT solver and a modified circuit netlist.
Propositional logic formula F can always be written in
a conjunctive normal form (CNF) as the conjunction of A. X-Backpropagation Stage
clauses. Each clause of CNF comprises of some literals, where The main goal of X-backpropagation step is to provide
each literal is either a variable or the negation of the variable. a direct full transition path between each low transition proba-
Boolean SAT problem is the problem of determining a truth bility net and a net with the MTP which can be either a primary
assignment which guarantees all the clauses of a given CNF input or a scan flip-flop. This approach is accomplished by
to be satisfied [12]. However, in another variation, referred applying PMTP rules to each low transition probability net
to as partial Max-SAT (PM-SAT), the clauses of the instance during a backpropagation process, as described in Algorithm 1.
are separated in two parts: 1) the Soft and 2) Hard clauses. The algorithm is fed with the circuit netlist and a given transi-
The final solution of PM-SAT is to find an optimum truth tion probability threshold (Pth ). First of all, the circuit netlist
assignment that satisfies all the Hard clauses besides maxi- is analyzed to extract signal and transition probability as well
mizing (minimizing) the number of satisfied (falsified) Soft as logic depth of internal nets (line 1). Then, the nets with
clauses [11], [13]. transition probability below Pth threshold are identified and
initially assigned to X set (line 2). As a basic assumption,
III. P ROPOSED I NTEGRATED M ETHODOLOGY in most of the scenarios of Trojan attacks, a careful attacker
In this section, we develop the proposed DFT methodol- will likely select from this initial list to employ a Trojan with
ogy together with special test pattern generation so as to a rare triggering condition. Thus, a primary objective is to rise
increase the full activation time and side channel sensitiv- the transition probability of these nets to MTP.
ity (SCS) for both logic testing and side channel detection Before any additional process, the initial X set is sorted in
approaches. The proposed methodology consists of three descending order of logic depth (line 3). If the gate type of
stages: 1) X-backpropagation; 2) PM-SAT solver; and 3) con- the processing X net (xi ) is AND/NAND/OR/NOR, the PMTP
flict resolution steps as shown in Fig. 3. Rules 1 or 2 is applied to the X net (lines 6–9). In this case, one
In summary, in X-backpropagation step, circuit netlist is of the fan-ins of the gate with lower logical depth is selected
analyzed to extract transition probabilities and logical depth as candidate X net (Selx) and that of the other (i.e., non-X fan-
information. Then, the four PMTP rules are applied to the in) is defined as forbidden net (fn ) (lines 16 and 17). If the
candidate X nets of the circuit in backward manner to rise gate type of the processing X net (xi ) is XOR/XNOR/NOT/BUF,
the switching activity of the nets with transition probability all the fan-ins of the gate must be selected as Selx, and there
below a given threshold (Pth ) toward the MTP. Besides, exist- will be no fn based on PMTP Rules 3 and 4 (lines 10–13).
ing conflicts, including X and SFN are also identified during Otherwise, the X net is either primary input or scan flip-flop.
the backward process. In the next step, constraints related to These primary inputs of the circuit should be supplied by test

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
28 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 39, NO. 1, JANUARY 2020

Algorithm 1 X Back-Propagation Procedure


/* Generate X nets and identify existing conflicts */
Input: Circuit netlist, transition probability threshold (Pth )
Output: List of X nets (X ), list of arising conflicts (C)
1. Calculate probability & logic depth of circuit netlist.
2. Fill X with nets so that 0 < NetsProbability <= Pth
3. Sort X in descending order of logic depth.
4. Set FN ← ∅ : (FN , List of all forbidden nets)
5. Set FOF {} ← ∅ : (FOF , Forbidden fan-out hash) Fig. 4. Example of circuit showing the proposed X-backpropagation.
6. for each net xi ∈ X do
7. Switch (GateType(xi )) TABLE I
8. Case:: AND | NAND | OR | NOR then A PPLYING X-BACKPROPAGATION S TEP FOR AN E XAMPLE C IRCUIT
9. Apply Rule #1 and Rule #2
10. Case:: XOR|XNOR then
11. Apply Rule #3
12. Case:: NOT|BUF then
13. Apply Rule #4
14. Default: Null
15. end sw
16. Set Selx ← Choose selected net from above PMTP rules
17. Set fn ← Select current forbidden net, if any.
18. Update C with extracted conflicts (Algorithm 2).
19. Update FN with current forbidden net fn .
20. Update FOF {fn } with key fn and value xi . previously been selected as forbidden net, all the basic gates
21. Update X with Selx and Sort it again. with opposing requirements in PMTP rules that have shared
22. end for
this net are considered as SFN conflict (CSFN ).
Next, we will illustrate the X-backpropagation procedure
Algorithm 2 X and SFN Conflicts Extraction through a simple example as shown in Fig. 4. Assume the nets
/* Extraction of X and SFN Conflicts occurred during G13 and G14 have low transition probability for a given Pth .
X-backpropagation step */ Regarding Algorithm 1, we first fill the X set with these two
Input: Selected X net (Selx), List of forbidden nets (FN ),
Forbidden fan-out hash (FOF {}), Current forbidden net (fn ), nets and sort it in descending order of logic depth as listed in
Current X net (xi ) Table I. Then, the PMTP Rule 1 is applied to G13 of gate F so
Output: List of X-Conflicts (CX ), List of SFN-Conflicts (CSFN ) that the input with lower logic depth (G10) is selected as Selx
1. /* Extract X-conflict */ and that of the other (G12) is defined as fn . Next, the X set is
2. if Selx ∈ FN then updated with G10 and reordered again. In the next iteration,
3. for each f Of i ∈ FOF {Selx} do
4. Update CX with f Of i the PMTP Rule 2 is applied to G14, resulting in selection of
5. end for G11 as Selx and G12 as fn . Since the forbidden net G12 is
6. end if selected multiple times and the corresponding gates F and G
7. /* Extract SFN-conflict */ have opposing PMTP requirements, the SFN conflict occurs
8. if fn ∈ FN then at G14. Similarly, the same procedure will be applied to other
9. for each f Of i ∈ FOF {fn } do
10. if Type(f Of i ) has inconsistency with Type(xi ) in PMTP gates until reaching the primary inputs G3 and G4. As a result,
11. Update CSFN with f Of i the full transition paths (blue lines in Fig. 4) are constructed
12. end if between inputs G3, G4 and low transition nets G13, G14.
13. end for The time complexity of Algorithm 1 is O(N×L), where N is
14. end if the number of low transition nets and L is the number of circuit
levels. To consider the worst case, we assume that all the low
transition nets are at the highest logic depth, and the MTP
patterns with high switching activity (e.g., random test pat- paths do not have overlap in between. Also, the complexity of
terns). Next, the possibility of conflict occurrence (e.g., X Algorithms 2 and 3 is O(F) and O(N×L), respectively, where
and SFN) is examined and the corresponding conflict lists F represents the maximum fan-out of the circuit.
are updated based on the procedure presented in Algorithm 2.
Finally, the list of X nets (X ), the list of forbidden nets (FN ),
and FOF hash (FOF{}) with the key fn will be updated by B. PM-SAT Solver Stage
Selx, fn , and xi , respectively (lines 19–21). After updating the X set and identifying conflicts during
Algorithm 2 identifies the existing conflicts that violate the X-backpropagation, the constraints imposed by PMTP rules
PMTP rules. The results of the algorithm are all the conflicts are appended to the CNF file in the form of unit hard clauses,
arising during X-backpropagation step. Lines 1–6 are dedi- as described in Algorithm 3. The algorithm is fed with the
cated to extract X conflicts (CX ). If the selected X net (Selx) updated X and conflict sets. Also, the main CNF file gener-
has already been chosen as forbidden net, all the basic gates ated from the gate level netlist is required. The outputs of the
sharing Selx (all the outputs of FOF hash with Selx as key) algorithm are an updated CNF file besides a list of violated
are defined as X conflict. Lines 7–14 present the procedure of gates (D), which certainly require to be resolved by special
SFN conflict identification. If the current forbidden net (fn ) has insertion points during conflict resolution stage.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
SHABANI AND ALIZADEH: MAX-SAT-BASED APPROACH TO DETECT HT USING PMTP 29

Algorithm 3 Procedure of Updating CNF File


/* Appending PMTP constraints to CNF file */
Input: List of X nets (X ), List of conflicts (C), CNF file
Output: List of candidate insertion (D), Updated CNF file
1. Set D ← 
2. for each xi ∈ X do
3. Substitute all soft clauses of NAND/NOR/NOT/XNOR gates
with complementary clauses. (a) (b)
4. Write (CNF file, Unit Hard,  xi )
5. Switch (ConflictType(xi )) Fig. 5. Special insertion points; Type A and B.
6. Case:: X-Conflict|SFN-Conflict
7. Update D with xi
8. Case:: No Conflict
9. if GateType(xi ) = AND|NAND then authentication enable (AE) which switches the normal func-
10. Write (CNF file, Unit Hard, NonXInp(xi )) tional mode (AE = 0) of the circuit into authentication mode
11. else if GateType(xi ) = OR|NOR then (AE = 1).
12. Write (CNF file, Unit Hard,  NonXInp(xi ))
13. end if
To avoid occurrence of X conflict, based on PMTP Rule 1,
14. end sw if the violated gate type is AND/NAND gate, one of the fan-
15. end for ins must stick at logic 1 by using Type A insertion. In the
same way, the X conflict at OR/NOR gate can be resolved by
using insertion point of Type B. To resolve the SFN conflict,
Although the PMTP rules are actually identical for a gate the insertion point of Type A is applied to the forbidden net
and its complementary (e.g., AND and NAND), Boolean logic of the violated gate with type AND/NAND. However, if the
propagations of those gates are not the same. Thus, we should gate with SFN conflict is OR/NOR gate, the insertion point of
first substitute all soft clauses of NAND/NOR/NOT/XNOR Type B is required. And finally, to resolve UNSAT conflicts,
gates with the complementary clauses to avoid inconsistency the output of the violated gate must stick at either 1 or 0 logic
between PMTP and propagation of Boolean logic (line 2). according to its truth-value which has already been determined
Regardless of conflict and gate types, all the X nets impose by PM-SAT solver.
a constraint on CNF in the form of a unit hard clause with a lit-
eral, including negation of the corresponding variable (line 4). IV. E XPERIMENTAL R ESULTS
Later, if the gate type is AND/NAND gate and it does not To better analyze the prominent features of the proposed
belong to any conflict lists, the non-X fan-in of the gate must methodology, we have implemented the entire methodology
be stuck at 1 based on PMTP Rule 1. Thus, a unit hard clause using Perl language according to Fig. 3 and applied it to
with a literal, including variable of the non-X fan-in is required a subset of ISCAS-85 and ISCAS-89 benchmark circuits. The
to be added to CNF file (line 10). In the case that a net belongs sequential circuits are converted into full scan mode. To eval-
to the X or SFN conflict, the net is defined as violated net and uate transition probability of internal nets, the analysis has
must be resolved, thus these nets are assigned to candidate been carried out by using a simulation-based approach for
insertion list (D). At the end, the updated CNF file is ready to a large test vectors (10 000 random tests). Moreover, an open
be applied to PM-SAT solver. The solver will try to generate source PM-SAT solver called Open-WBO [13] is utilized as
an optimum truth assignment that satisfies all the hard con- our decision procedure engine.
straints imposed by PMTP rules. Next, we extract the UNSAT
soft clauses from CNF file and map them to the corresponding
UNSAT gates. A. Maximum Transition Probability
As mentioned in X-backpropagation stage, some of the pri- In the first experiment, we analyze the distribution of tran-
mary inputs of the circuit are selected as random test patterns sition probability before and after applying the proposed
(i.e., inputs with X label) while the rest of the inputs should methodology. Fig. 6(a) shows the distribution of transition
be stuck at either 1 or 0 value. The choice of sticking value probability of the nets for benchmark c7552 with Pth equal
for a primary input is simply determined by inspecting truth- to 0.035 before applying proposed methodology. We classified
values of the corresponding variable from result of MAX-SAT the nets of the circuit into three categories from activity point
solver. of view: 1) the nets with transition probability (TP) below
a given Pth (LT, green dots); 2) the nets with TP higher than
Pth (HT, blue dots); and 3) the nets with zero TP sticking at
C. Conflict Resolution Stage either 0 or 1 (red dots). After applying the proposed method-
In this stage, all the conflicts that violate the PMTP rules ology, all the nets related to LT list are switched to the MTP
(e.g., X, SFN, and UNSAT) must be resolved by employing around 0.25 while some of the HT nets are stuck to either 0
special insertion points. For doing so, two insertion points or 1 logic, and the rest of them also reach the MTP, as shown
of Type A and B have been introduced to impose logic in Fig. 6(b).
1 and 0, respectively, on special location of the circuit, as The proposed probability distribution during authentication
shown in Fig. 5. All the insertion points in the circuit are mode can ensure that the Trojan’s inputs, which are likely
simultaneously controlled by a common control signal called selected among the LT nets, have MTP. However, if this

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
30 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 39, NO. 1, JANUARY 2020

TABLE II
O PTIMUM PTH FOR D IFFERENT C IRCUITS W ITH α = 10%, β = 2%

TABLE III
T IME C OMPLEXITY AND C IRCUIT OVERHEADS A FTER A PPLYING THE
P ROPOSED M ETHODOLOGY U SING O PTIMUM PTH
(a) (b)

Fig. 6. Transition probability distribution; (a) before and (b) after applying
proposed methodology to c7552 circuit (Pth = 0.035).

assumption on selection of Trojan’s triggers is violated, the


mounted Trojans no longer have stealthy nature, and con-
sequently will be easily detected during post-manufacturing
tests [4]. Furthermore, a careful attacker would never mount
a Trojan by incorporating the nets with zero TP since such
a Trojan will always be either quiet or active [5].
TABLE IV
S PECIFICATION OF F OUR C OMBINATIONAL T ROJANS
B. Exploration of Pth Threshold
In order to explore the optimum value of Pth , there are
several parameters that should be considered. They can be
grouped into two categories of authentication and circuit
parameters. The authentication parameters mainly depend on
the Trojan detection approach which can be either logic testing
or side channel analysis, and the circuit parameters repre-
sent the circuit overheads in area and power imposed by
methodology. Assume the Trojan’s trigger is composed of all total circuit activity (Cractivity ). The Tractivity is almost indepen-
AND/OR gates, the transition probability of Trigger output can dent of Pth since all the Trojan’s inputs are in the MTP level
be expressed as (1), where n is the number of triggers and TP during authentication. Nevertheless, as the Pth value increases,
represents the average transition probability of Trojan’s inputs, the number of nets with MTP will also increase leading to
respectively, increase in Cractivity and reduction in the SCS. Moreover,
 √ n   √ n  employing insertion points will increase the area and power so
1 − 1 − 4TP 1 − 1 − 4TP they also increase with the increase in Pth value. As a result,
TPTrigger = × 1− .
2 2 the Pth threshold should be selected as low as possible to incur
the minimum circuit overhead besides to magnify TCA param-
(1)
eter. However, a lower bound on threshold is also required to
In the proposed methodology, all the LT nets, that are ensure that the Trojan detection is reliable. Therefore, we sug-
the potential candidate for Trojan’s inputs, are switched into gest two constraints to determine upper and lower bounds of
MTP. Thus, the TP value in (1) is around 0.25, and TPTrigger threshold value, termed α and β, given by the designer. The
can be rewritten as (1/2)n − (1/2)2n . To estimate the average α defines the maximum tolerable overhead in gate or power
number of clock cycles required to generate a transition on while the β represents the percentage of circuit’s nets which
Trigger
Trigger output (Tclk ), the transition probability is modeled are expected to switch into MTP.
using geometric distribution [9], resulting in Table II lists the optimum Pth values for different circuits
  by considering α = 10% and β = 2%. Unlike the upper
−1 1 1 −1
Trigger
Nclk = TPTrigger − 1 = − 2n − 1. (2) bound Pth (α  β), the lower bound Pth (α  β) signifies
2n 2 the higher priority () of lower area overhead than detec-
From (2), the number of clock cycles, on overage, required tion reliability. In order to moderate the significance of α and
to activate a Trojan, is independent of Pth value and only β (α <> β) constraints, we have introduced another metric,
depends upon the number of Trojan’s inputs (n). So, the termed LT to insertion number (LINS), which is the ability
authentication time of the proposed method would not be much to maximize transition of more LT nets by using less inser-
affected by the choice of Pth . However, the larger Pth values tion points. The LINS is defined as the ratio of the number
ensure that the large number of LT nets are switched into MTP, of LT nets over the number of insertion points. After specify-
leading to more reliability in Trojan activation. Moreover, one ing optimum upper and lower bounds of Pth using α and β,
metric to measure the SCS is trojan to circuit activity (TCA), the third constraint is considered so that the moderated Pthm
which is the ratio of the Trojan activity (Tractivity ), over the should have the maximum LINS value as reported in Table II.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
SHABANI AND ALIZADEH: MAX-SAT-BASED APPROACH TO DETECT HT USING PMTP 31

TABLE V
T ROJAN ACTIVATION AND D ETECTION A NALYSIS B EFORE A PPLYING THE P ROPOSED M ETHODOLOGY U SING 1000 T EST PATTERNS

TABLE VI
T ROJAN ACTIVATION AND D ETECTION A NALYSIS A FTER A PPLYING THE P ROPOSED M ETHODOLOGY U SING 1000 T EST PATTERNS

TABLE VII
R ESULTS OF THE P ROPOSED M ETHODOLOGY (POC AND TCA) U SING O PTIMUM PTHM

TABLE VIII TABLE IX


C OMPARISON OF THE P ROPOSED M ETHODOLOGY IN C IRCUIT C OMPARISON OF THE P ROPOSED M ETHODOLOGY IN T ROJAN ACTIVATION
OVERHEADS AND T IME C OMPLEXITY AND D ETECTION S ENSITIVITY FOR S 5378, Pth = 0.02

Table III reports the effect of the optimum Pthm on cir-


cuit overheads after applying the proposed methodology to
as reported in Table IV. The difficulty of Trojan activation
different benchmarks and synthesizing with TSMC 130-nm
is defined as the number of clock cycles required to gener-
technology. The results imply that the gate and power over- Trigger
heads of circuits are approximately less than 10%. The only ate a transition at Trigger’s output (Tclk ). Meanwhile, the
limitation of the proposed method is high delay overhead in Trojan’s inputs have randomly been selected with the nets hav-
some cases since we have not considered the effect of tim- ing low transition probability below Pthm . The Payload output
ing overhead on selection of optimum Pth . One way to avoid of a Trojan depends on values of both Trigger output and
such timing degradation is to skip the insertion procedure on data input. If both are the same, the result of Payload output
the critical path of the circuit since the smart attacker would will be similar to its inputs; otherwise, a Payload with different
never use the nets in critical path as Trojan’s inputs [9]. input values, assuming the Trojan is active, would result in full
activation of Trojan since the payload output change (POC)
can cause disruption in normal activity of the circuit [9].
C. Trojan Activation and Detection Table V lists the transition statistics for benchmark
In order to directly exhibit the superior efficiency of the s5378 without applying the proposed method with 1000 ran-
PMTP method, two different designs have been considered: dom test patterns. In this table, columns 2 and 3 indicate
1) design without applying the proposed methodology and the total Cractivity and the number of transition on LT list,
2) design with applying the proposed methodology. Then, each respectively. The number of transitions at the Trojan’s output
design has been tampered by four combinational Trojans of represents the number of times that the Trigger output can
different size, number of trigger, and difficulty of activation change from dominant to nondominant value and vice versa.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
32 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 39, NO. 1, JANUARY 2020

TABLE X
C OMPARISON OF D IFFERENT T ROJAN D ETECTION AND P REVENTION S CHEMES BASED ON DFT

The seventh column is dedicated to represent the Tractivity This increase is also attained by factor of 1.3, 4.4, and 2.6 in
which is defined as the sum of the transitions inside and at comparison with the method presented in [10]. Moreover,
Payload
the output of Trojan circuit. The next two columns indicate the Nclk of the proposed method is prominently reduced
the number of Trojan full activations (POC) and the num- around 67% and 72%, in average, compared with the methods
ber of average clock cycles required to generate a transition presented in [9] and [10], respectively, so the number of test
Payload
at Trojan’s Payload (Nclk ), respectively. Finally, TCA has patterns required to detect the malicious activity of Trojan can
been presented. be significantly reduced, and the authentication time per chip is
Table V shows that before applying the proposed method shortened as well. In spite of the increase in Trojan activity, the
none of the Trojans is fully activated (i.e., POC = 0). Next, we total Cractivity is significantly reduced in the proposed method-
apply our proposed method and test patterns to the s5378 cir- ology so that the noticeable improvement in TCA parameter is
cuit using the optimum PTH = 0.04, as shown in Table VI. achieved, indicating that the proposed method is more suitable
According to Table VI, the proposed method indicates the for power-based side channel analysis.
favorable increase in LT set transitions, Trojan inputs, Trojan Finally, Table X reports the comparison of different DFT
output, and Trojan activity besides the reduction in the total methods in terms of detection type, ATPG scheme insertion
Cractivity , leading to remarkable increase in the TCA param- type, complexity of insertion points, time complexity, and
eter. Consequently, the higher sensitivity and robustness are area overhead. It is concluded from Tables X and VIII that
achieved. Moreover, unlike the design without modification, the proposed methodology incurs less area overhead in aver-
the proposed method can fully activate (i.e., higher POC rate) age compared to that of the other methods [9], [10], [14]–[17].
Trojans 1, 2, and 3 around 127, 58, and 12 times, respec- The reason behind the reduction in area is to employ insertion
tively. It is evident from Table VI that the POC rate of points with simple complexity comprising only one AND/OR
Trojan 4 (large Trojan) is still zero for 1000 test patterns. gate. However, this requirement entails the use of more
According to Table IV, we need more than 4000 test patterns, complex and area-intensive gates (XORs), multiplexers, and
on average, to generate a transition at Trigger unit. However, flip-flops for other existing methods [9], [10], [14]–[17], as
larger Trojans have more sensitivity through power-based side the area of a flip-flop is often 4 to 6 times larger than a sim-
channel approaches. More results about the POC rate and ple AND/OR gate [17]. The average area overhead imposed
TCA parameter have been listed in Table VII after applying the by proposed methodology after synthesizing with TSMC
proposed method to different benchmarks using the optimum 130-nm technology is about 10.17%. Results of Table X
Pthm presented in Table II. To expose the superior efficiency also signify that, compared to the similar detection methods
of the proposed method, we have also implemented the other in [9], [10], and [14], our approach has lower time complex-
known DFT methods presented in [9] and [10] for s5378 cir- ity. Note that the time complexity of both [9] and [10] in
cuit with Pth = 0.02, as reported in Table VIII. It is obvious worst case is O(M 2 ), where M is the total number of cir-
that the proposed method does not impose any area overhead cuit nets, indicating higher complexity compared to O(N × L)
on flip-flops, while this overhead is around 12.84% and 10% in the proposed methodology. Moreover, the proposed method
for design presented in [9] and [10], respectively. Besides, the leverages the Max-SAT-based ATPG to generate efficient test
results in Table VIII show that the proposed method is far patterns. Unlike random [9], [10] and weighted random [14]
faster than [9] and [10] by factors of 30 and 4, respectively. ATPGs, the Max-SAT-based ATPG accompanied by PMTP
To further analyze the number of full activation and methodology can effectively relieve the stealthy nature of
SCS, Table IX reports a relative comparison in terms of Trojans by allowing the MTP to propagate from primary inputs
Payload
POC, Nclk , and TCA parameters for s5378 circuit with toward low controllable nets.
Pth = 0.02, and by mounting different Trojan instances.
Regarding Table IX, achieving the MTP at Trojan’s inputs
yields more transitions at Trigger’s output compared with the V. C ONCLUSION
other methods. As a result, the POC rate in the proposed In this paper, a new low area overhead and high speed
method indicates a favorable increase by factor of 1.9, 8.9, and DFT methodology was proposed. In this method, the rules
4 in comparison with [9] for Trojan 1, 2, and 3, respectively. and conflicts of PMTP were developed for individual gates.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app
SHABANI AND ALIZADEH: MAX-SAT-BASED APPROACH TO DETECT HT USING PMTP 33

After satisfying PMTP rules, resolving conflicts by means of [13] R. Martins, V. Manquinho, and I. Lynce, “Open-WBO: A modular
simple insertion points, and applying the efficient test patterns MaxSAT solver,” in Proc. Int. Conf. Theory Appl. Satisfiability Test.,
2014, pp. 438–445.
generated by Max-SAT solver, the full transition paths are con- [14] B. Zhou et al., “Cost-efficient acceleration of hardware Trojan detection
structed between each low transition net and primary inputs. through fan-out cone analysis and weighted random pattern technique,”
The results for different benchmark circuits implied that the IEEE Trans. Comput.-Aided Design Integr. Circuits Syst., vol. 35, no. 5,
pp. 792–805, May 2016.
proposed method provides the higher full activation rate by [15] A. Nejat, D. Hely, and V. Beroulle, “ESCALATION: Leveraging
a factor of four, in average, through logic testing besides more logic masking to facilitate path-delay-based hardware Trojan detection
sensitivity averagely around 20× for power-based side channel methods,” J. Hardw. Syst. Security, vol. 2, no. 1, pp. 83–96, Mar. 2018.
[16] S. Wei, K. Li, F. Koushanfar, and M. Potkonjak, “Provably complete
analysis. hardware Trojan detection using test point insertion,” in Proc. Int. Conf.
Comput. Aided Des. (ICCAD), San Jose, CA, USA, 2012, pp. 569–576.
[17] S. Wei and M. Potkonjak, “Malicious circuitry detection using fast tim-
R EFERENCES ing characterization via test points,” in Proc. IEEE Int. Symp. Hardw.
[1] S. Bhunia, M. S. Hsiao, M. Banga, and S. Narasimhan, “Hardware Orient. Security Trust (HOST), Austin, TX, USA, 2013, pp. 113–118.
Trojan attacks: Threat analysis and countermeasures,” Proc. IEEE,
vol. 102, no. 8, pp. 1229–1247, Aug. 2014.
[2] S. Bhunia and M. M. Tehranipoor, The Hardware Trojan War: Attacks,
Myths, and Defenses. New York, NY, USA: Springer, 2017.
[3] L. Lin, W. Burleson, and C. Paar, “MOLES: Malicious off-chip leakage Ahmad Shabani received the B.S. degree in electri-
enabled by side-channels,” in Proc. Int. Conf. Comput.-Aided Design, cal engineering from Shiraz University, Shiraz, Iran,
San Jose, CA, USA, 2009, pp. 117–122. in 2014 and the M.S. degree in digital electronic
[4] M. Tehranipoor, H. Salmani, and X. Zhang, Integrated Circuit systems from Shahid Beheshti University, Tehran,
Authentication: Hardware Trojans and Counterfeit Detection, Cham, Iran, in 2016. He is currently pursuing the Ph.D.
Switzerland: Springer, 2014. degree in digital systems with Tehran University,
[5] R. S. Chakraborty, F. Wolff, S. Paul, C. Papachristou, and S. Bhunia, Tehran.
“MERO: A statistical approach for hardware Trojan detection,” in Since 2016, he has been a member of
Cryptographic Hardware and Embedded Systems—CHES 2009. Berlin, Design, Verification and Debugging of Embedded
Germany: Springer, 2009, pp. 396–410. Systems Laboratory, Tehran University. His current
[6] S. Saha, R. S. Chakraborty, S. S. Nuthakki, and D. Mukhopadhyay, research interests include hardware security, Trojan
“Improved test pattern generation for hardware trojan detection using countermeasure, medical image processing, and low-power and high-speed
genetic algorithm and Boolean satisfiability,” in Proc. Cryptograph. digital circuits.
Hardw. Embedded Syst., 2015, pp. 577–596.
[7] R. Rad, J. Plusquellic, and M. Tehranipoor, “A sensitivity analysis of
power signal methods for detecting hardware Trojans under real process
and environmental conditions,” IEEE Trans. Very Large Scale Integr.
(VLSI) Syst., vol. 18, no. 12, pp. 1735–1744, Dec. 2010.
[8] Y. Huang, S. Bhunia, and P. Mishra, “MERS: Statistical test generation Bijan Alizadeh (SM’13) received the Ph.D. degree
for side-channel analysis based Trojan detection,” in Proc. ACM Conf. in electrical and computer engineering from the
Comput. Commun. Security, Vienna, Austria, 2016, pp. 130–141. University of Tehran, Tehran, Iran, in 2004.
[9] H. Salmani, M. Tehranipoor, and J. Plusquellic, “A novel technique He was with the School of Electrical Engineering,
for improving hardware Trojan detection and reducing Trojan activa- Sharif University of Technology, Tehran, as an
tion time,” IEEE Trans. Very Large Scale Integr. (VLSI) Syst., vol. 20, Assistant Professor from 2005 to 2007 and VDEC,
no. 1, pp. 112–125, Jan. 2012. University of Tokyo, Tokyo, Japan, as a Research
[10] B. Zhou, W. Zhang, S. Thambipillai, and J. K. J. Teo, “A low cost Associate from 2007 to 2010. He has been an
acceleration method for hardware Trojan detection based on fan-out cone Assistant Professor with the School of Electrical and
analysis,” in Proc. Int. Conf. Hardw. Softw. Codesign Syst. Synthesis, Computer Engineering, University of Tehran since
New Delhi, India, 2014, pp. 1–10. 2011, where he is currently an Associate Professor.
[11] Z. Fu and S. Malik, “On solving the partial MAX-SAT problem,” in He has authored or co-authored over 100 publications in international sci-
Proc. Int. Conf. Theory Appl. Satisfiability Test., Seattle, WA, USA, entific journals and conferences. He has been engaged in the research
2006, pp. 252–265. and development of very large-scale integration systems, field-programmable
[12] A. Biere, M. Heule, H. van Maaren, and T. Walsh, Handbook of gate array-based reconfigurable computing, formal verification and debug,
Satisfiability, vol. 185. Amsterdam, The Netherlands: IOS Press, 2009. post-silicon debug, and high-level synthesis.

thorized licensed use limited to: AMRITA VISHWA VIDYAPEETHAM AMRITA SCHOOL OF ENGINEERING. Downloaded on September 15,2021 at 06:48:00 UTC from IEEE Xplore. Restrictions app

You might also like