Week 10
Week 10
Topic
Lecture 46: Elements of Hardware Security
q A(acks on hardware
q Typical countermeasures
1
11/08/19
IntroducFon
AJacks on Hardware
• Physical AJacks
• Carried out on the actual device using hardware tools.
• Planned AJacks
• Some vulnerability can be deliberately included in the hardware.
2
11/08/19
Types of AJacks
b) Physical Probing
• The a(acker plants a probe into the chip itself and reads data off the chip.
• This is an invasive a(ack, and requires sophisRcated instrumentaRon.
3
11/08/19
Types of AJacks
• Reverse Engineering
• The a(acker acquires the device (say, smart card) and physically exposes the circuit.
• Each layer of the circuit is removed and high resoluRon photographs are taken.
• Invasive approach, and also requires very sophisRcated instrumentaRon.
4
11/08/19
Hardware Trojan
• Malicious logic inserted into a circuit without the knowledge of the designer / user.
• Carries a trigger condiRon and a payload (may be malicious).
• Very difficult to detect.
To Summarize …
10
5
11/08/19
11
6
11/08/19
Topic
Lecture 47: Side Channel AFacks (Part I)
1
11/08/19
Why Important?
• A developer of a secure product has to defend it against all possible a0ack paths.
• In side channel a0ack:
• The mathemaCcal security of the cryptographic algorithms is not being quesConed.
• It is the implementaCon of these algorithms that is at risk to be broken.
2
11/08/19
Timing Cryptographic
Heat
Device
Scan Data
During Test Data
Coupling
3
11/08/19
IntroducKon
• Basic concept
• The first side-channel based a0ack to be published [Paul Kocher, 1995].
• A0acker tries to break a cryptosystem by analyzing the execuCon Cme for the overall
cryptographic operaCon.
An Example
4
11/08/19
• Square-and-add exponenKaKon.
• How to calculate xn ?
Power (x,n) = x, if n = 1
= Power (x2, n/2), if n is even
= x . Power (x2, (n-1)/2), if n>2 is odd
• Advantage:
• Simple implementaCon requires (n-1) mulCplicaCons.
• This algorithm uses only O(log2n) mulCplicaCons.
• IllustraCon:
x13 = x1101
= x(1*2^3 + 1*2^2 + 0*2^1 + 1*2^0)
= x2^3 * x2^2 * 1 * x2^0
= x8 * x4 * x1
= (x4)2 * (x2)2 * x
= (x4 * x2)2 * x
= ((x2)2 * x2)2 * x
= ((x2 * x)2)2 * x
10
5
11/08/19
11
No Yes
Bit = 1?
MulKply
Squaring Squaring
12
6
11/08/19
13
• Timing analysis can reveal the number of 1’s in the secret key.
Time = n * tsquare + k * tmul
n : number of bits in the key
k: number of one bits in the key
tsquare : time to compute square
tmul : time to compute multiplication
• The suggested countermeasure can make the Cme independent of the key.
Time = n * (tsquare + tmul)
14
7
11/08/19
What it means?
• If the device carrying out the cryptographic operaCon is available for analysis …
• We can gain valuable insight into the internal execuCon.
• For RSA, the complexity of brute-force a0ack can be drasCcally reduced.
• Security implicaCons:
• We use various sorts of smart cards in our daily life.
• Side-channel a0ack can pose a serious threat.
• Secure side-channel a0ack resistant implementaCons are necessary.
15
16
8
11/08/19
17
9
11/08/19
Topic
Lecture 48: Side Channel AFacks (Part II)
q Countermeasures
1
11/08/19
IntroducJon
• Basic concept:
• A much more effec:ve form of side channel a2ack [Paul Kocher et al, 1998].
• Analyzes the power consumed by a device during the processing of some cryptographic
opera:on.
4 4
2
11/08/19
Current
or
R
Power
Measurement
AFacker’s Point
Cryptographic
Device
5 5
3
11/08/19
• Can iden:fy:
– Big features like rounds of DES/AES, square vs. mul:ply in RSA exponen:a:on.
– Small features, like bit value.
0 1 0 1 1
With “Dummy” OperaJons
Power Traces
4
11/08/19
• More complex.
• Par::on the data and related curves into two sets according to selected bits.
• Take the difference, and look for peaks or differences.
DPA
curve
0
SelecJon bit
1
=
C031A0...
185D04D...
B688EE...
Average
10
5
11/08/19
Power ConsumpJon
DifferenJal Curve
With Correct Key Guess
Power ConsumpJon
DifferenJal Curve
With Incorrect Key Guess
Power ConsumpJon
DifferenJal Curve
With Incorrect Key Guess
11 11
Countermeasures
6
11/08/19
IntroducJon
13 13
a) Hardware-based countermeasures:
• Special logic styles that minimizes data-dependent leakage.
• Implementa:on of masking schemes.
• Addi:on of noise with noise-generators.
• Random process interrupts that provide for an internal :ming de-synchroniza:on.
14 14
7
11/08/19
b) Soaware-based countermeasures:
• Aim to avoid the occurrence of predictable intermediate results.
• Introduce redundant computa:ons.
• Internal randomiza:on used to mask the data representa:on used.
v A random value, not known to the a2acker, is added or mul:plied with intermediate
values.
15 15
Conclusion
16 16
8
11/08/19
17
9
11/08/19
Topic
Lecture 49: Physical Unclonable FuncGons
q Applica6ons of PUF
q PUF implementa6on
1
11/08/19
What is a PUF?
2
11/08/19
3
11/08/19
Another AVempt
• This design has the non-determinism as expected!
• We can also design using NAND primi6ves.
module SR (in, Q, Qbar);
input in;
output Q, Qbar; Qbar
in OR
wire w1, w2;
nand N1(Q, ~in, w1); w1
nand N2(Qbar, ~in, w2);
assign w1 = Qbar; w2
assign w2 = Q;
endmodule Q
OR
the gates.
(x6,y6) (x7,y7) (x8,y8) (x9,y9) (x10,y10)
• Difference in rou6ng delays of the
feedback path.
(x11,y11) (x12,y12) (x13,y13) (x14,y14) (x15,y15)
• A latch cell will give either 0 or 1 as
output.
(x16,y16) (x17,y17) (x18,y18) (x19,y19) (x20,y20)
• Depends on the (x,y) posi6on of the
silicon area.
(x21,y21) (x22,y22) (x23,y23) (x24,y24) (x25,y25)
4
11/08/19
PUF as Security
Advantages PrimiGve
of PUF
Reduce Cost Increase Security
10
5
11/08/19
Private key
Seed
Key
ECC + PUF Public key
GeneraGon
11
12
6
11/08/19
13
14
7
11/08/19
15
Summary
16
8
11/08/19
17
9
11/08/19
Topic
Lecture 50: Hardware Trojan
q Types of trojans
q Trojan detec:on
1
11/08/19
2
11/08/19
55
Std.
IP Tools Cells Models
Offshore
Trusted Wafer
Deploy
Package Dice and Wafer
Either and
Test Package Probe
Monitor
Untrusted
Not really Trusted!!
3
11/08/19
4
11/08/19
Trojan Taxonomy
Hardware Trojans
Digital Trojans
A C
B Cmodified
Trigger CombinaMonal Trojan
(simplest)
Payload
ER ER*
Trigger
Sequential (Synchronous) Trojan
(“Time Bomb”)
0 1 2 k-1
Payload
CLK
10
5
11/08/19
ER ER*
Trigger
Sequential (Asynchronous)
Trojan
0 1 2 k-1
p Payload
q
ER ER*
k1-bit
CLK CLK Counter
Hybrid Trojans
k2-bit
CLK Counter
11
Analog Trojans
Analog Trojan
(acMvity-triggered)
12
6
11/08/19
Logic-value Based
Side-channel Leakage Based
13
Trojan Detection
Approaches
Mainstream Non-mainstream
Non-destructive Destructive
Approaches to
Trojan
DetecMon
Invasive Non-
invasive
Logic Test
Side-
channel
14
7
11/08/19
• High overhead.
• Trojans are stealthy.
• Trigger nodes have very low observability.
• Extremely large number of Trojan types possible.
• No single method can detect all types of Trojans.
15
MulM-Level A]ack
16
8
11/08/19
17
Conclusion
• IC design/manufacturing prac:ces are insecure.
• Third-party IPs and off-shore manufacturing.
• Poten:ally untrusted par:es pay a major role.
• Hardware Trojans are malicious circuit modifica:ons.
• Small overhead, hugely destruc:ve impact.
• Difficult to detect by tradi:onal tes:ng means.
• State-of-the-art:
• Both design and test techniques have been proposed.
• Effec:veness of the proposed techniques limited to the par:cular types of
Trojans.
18
9
11/08/19
19
10