Application
of
Physical
Attacks
to Real World Systems
to
Real
World
Systems
Workshop Provable Security against Physical Attacks Lorentz Center, Leiden
February 17, 2010 Christof Paar
i
Timo Kasper
Embedded Security Group
Horst Görtz Institute for IT Security Horst Görtz Institute for IT Security Ruhr‐University Bochum
Acknowledgement
• Thomas Eisenbarth • Thomas Eisenbarth • Markus Kasper • Timo Kasper • Amir Moradi • David Oswald Christof Paar, 17.02.2010A
d
Agenda
• Remote Access Control with
Remote
Access
Control
with
KeeLoq
KeeLoq
• Contactless Smartcards
with
3DES
• Contactless Payments with
Mifare Classic
• Positive Applications of SCA:
Watermarking
• Positive
Applications of SCA:
Watermarking
• Conclusions &
Auxiliary Stuff
Remote
Access
Control
with
KeeLoq
q
Christof Paar, 17.02.2010
KeeLoq
KeeLoq
• Introduction to Remote Keyless Entry (RKE) Systems • Introduction to Remote Keyless Entry (RKE) Systems • Phase 1 – Analysis & Frustration
• Phase 1 Analysis & Frustration
• Phase 2 – Breakthrough & EuphoriaPhase 2 Breakthrough & Euphoria • Phase 3 – Optimization &p Routine
KeeLoq
• Introduction to Remote Keyless Entry (RKE) Systems
KeeLoq
• Introduction to Remote Keyless Entry (RKE) Systems
• Phase 1 – Analysis & Frustration • Phase 1 Analysis & Frustration
• Phase 2 – Breakthrough & EuphoriePhase 2 Breakthrough & Euphorie • Phase 3 – Optimizationp & Routine
Remote
Keyless
Entry
Systems
Modern
Keyless Entry
Systems
advanced theft control: rolling code advanced theft control: rolling code
code = ek(ni)
rolling code (or hopping code) rolling code (or hopping code)
protects against replay attacks:
1. code = ek(n) ek() is often a block cipher k( ) 2. code = ek(n+1) 3. code = ek(n+2) 11 Christof Paar, 17.02.2010 ….
Popular Remote
Keyless Entry
Cipher:
KeeLoq
KeeLoq
• KeeLoq is used in rolling code mode or in a challenge-response protocol
• widely used for garage doors in US & Europe
• widely used for garage doors in US & Europe
• Wikipedia (?):
Chrysler, Daewoo, Fiat, GM, Honda, Toyota, Volvo, Jaguar, ...
Q: How secure is KeeLoq?
KeeLoq
• Introduction to Remote Keyless Entry (RKE) Systems • Introduction to Remote Keyless Entry (RKE) Systems • Phase 1 – Analysis & Frustration
• Phase 1 – Analysis & Frustration
• Phase 2 – Breakthrough & EuphoriaPhase 2 Breakthrough & Euphoria • Phase 3 – Optimizationp & Routine
Christof Paar, 17.02.2010
KeeLoq
+
Side
‐
Channel
Attacks
O th ht 2006 ( tl t) Our thoughts ca. 2006 (mostly correct)
G f l ld k
√
• Great target for real‐world attack ld h
√
√
• Old cipher
√
√
• Implementation probably also 10+ years old√
√
• SCA countermeasures very unlikely√
• Running DPA or SPA should be a piece of cake(a few weeks)
† † †
Christof Paar, 17.02.2010
Power
Analysis
of
a
Remote
Control
?
?
t k f t t l (HCS XXX Chi ) !
Christof Paar, 17.02.2010
secret key of remote control (HCS XXX Chip) !
Performing
the
Side
‐
Channel
Attack
1. Find a suited predictable
intermediate value in the cipher
2 M th ti
2. Measure the power consumption
3. Align and reduce size of acquired data
4. Correlate measurements with model
Christof Paar, 17.02.2010
KeeLoq
– Algorithm
State Register, y 0 2 1 3 1 1 7 2 4 0 0 NLF XOR Key Register, k 7 6 5 4 3 2 1 0 0 y g , k• 64 bit key, 32 bit block length
• NLFSR comprising a 5x1 non‐linear function
• Simple key management: key is rotated in every clock cycle
Christof Paar, 17.02.2010
p y g y y y
• 528 rounds, each round one key bit is read
Lightweight cipher – cheap and efficient in hardware
KeeLoq
– Attack
0 2 1 3 State Register, y 0 2 1 3 1 1 7 2 4 0 0 NLF XOR 7 6 5 4 3 2 1 0 XOR Key Register, k 7 6 5 4 3 2 1 0 0 Christof Paar, 17.02.2010 knowing the state directly reveals one key bit per clock cycle
Performing
the
Side
‐
Channel
Attack
1. Find a suited predictable
intermediate value in the cipher
2 M th ti
2. Measure the power consumption
3. Align and reduce size of acquired data
4. Correlate measurements with model
Christof Paar, 17.02.2010
Measuring
the
Power
Consumption
• Digital oscilloscope (max. 1 GS/s sample rate) • Measure electric current or electromagnetic field
Power
Trace
of
a
remote
control:
Finding the KEELOQ
‐
Encryption
Finding
the
KEELOQ
‐
Encryption
write EEPROM
send hopping code
KEELOQ
36 Christof Paar, 17.02.2010
Performing
the
Side
‐
Channel
Attack
1. Find a suited predictable
intermediate value in the cipher
2 M th ti
2. Measure the power consumption
3. Align and reduce size of acquired data
4. Correlate measurements with model
Christof Paar, 17.02.2010
Performing
the
Side
‐
Channel
Attack
Key
Recovery
1Recovery
C l t l ti 0.8 1• Correlate real power consumption Ii with predicted value D = f (Xi, Kh) • Divide‐and‐conquer approach
0.4 0.6 Co rre la tio n • Best‐matching
key candidates “survive“
0 0.2 0 10 20 30 40 50 60 70 80 90 round Christof Paar, 17.02.2010 40
KeeLoq
• Introduction to Remote Keyless Entry (RKE) Systems • Introduction to Remote Keyless Entry (RKE) Systems • Phase 1 – Analysis & Frustration
• Phase 1 Analysis & Frustration
• Phase 2 – Breakthrough & EuphoriaPhase 2 Breakthrough & Euphoria
• Phase 3 – Optimizationp & Routine
Christof Paar, 17.02.2010
…
15
months later
Side
‐
Channel
Attack
Results
for
KeeLoq
A) H d i l t ti (“ k “)
A) Hardware implementation (“car key“)
• Total attack time (for known device family): 5‐30 traces,, ≈ minutes
B) Software implementation (“car door“)
• Total attack time (for known device family): 1000 5000 traces ≈ hours
Christof Paar, 17.02.2010
1000‐5000 traces, ≈ hours
• reveals Manufacturer Key for ALL key derivation modes
So
what
can
we
do
now
(1)
?
1. If we have access to a remote: 1. If we have access to a remote:
Recover Device Key and clone the remote
2. If we have access to a receiver:
Recover Manufacturer Key & generate new remotesy g
Christof Paar, 17.02.2010
So
what
can
we
do
now
(2)
?
3. After step 2 ( i.e., possessing the Manufacturer Key):
Remotely eavesdrop on 1-2 communications & clone remote!
#ser KeeLoq(n+1) #ser, KeeLoq(n+1)
• works for all key derivation schemes
i t tl f k d i ti f i l b
• instantly for key derivation from serial number
• otherwise use PC (short seed) or COPACOBANA (long seed)
www.copacobana.org
Christof Paar, 17.02.2010
KeeLoq
q
• Introduction to Remote Keyless Entry (RKE) Systems • Phase 1 – Analysis & Frustration
• Phase 2 – Breakthrough & Euphoria • Phase 3 – Optimization & Routine
After
the
Attack
3 ti f i d t 3 reactions from industry
1 C i i ( )
1. Companies ignore us (many)
h ( l l )
2. Companies hate us (also popular)
3. Companies want to improve their products with us (few)
Christof Paar, 17.02.2010
Since
2008
• We analyze several KeeLoq products • All are breakable
• But efforts for manufacturing key recovery varies
f h k
from hours … weeks
• We gain much experience and start to improve
Christof Paar, 17.02.2010
Software
DPA:
needs 1000s of Measurements
C l ti f DPA d ith # d (b d)
needs 1000s
of Measurements
Correlation for DPA decreases with #rounds (bad)
Duration of one round seems to be dependent on input
Duration of one round seems to be dependent on input
SPA
Attack
against
KeeLoq
State Register,y 0 2 1 3 1 1 7 2 4 0 0 y NLF XOR 7 6 5 4 3 2 1 0 0 XOR Key Register, k 0 3 5 6
knowing the state directly reveals one key bit per clock cycle
A l i i ti f th t t ill l th t k
KeeLoq
Decryption
Program
Code
Data dependent code Data dependent code in red
SPA
by
CrossCorrelation
ern rence Patt e Refe r ation C rossCorrel CKeeLoq and SPA:
q
What can we do
now?
• Manufacturing key recovery with 1 single power trace
• No need to profile the leakage (unlike template attacks) • Countermeasure: fix execution time of rounds
But: Better alignment of traces will make DPA easier … • Further details: our Africacrypt `09 paper
Important lesson
Do not educate your attacker, i.e., build rock solid systems from the beginning
Christof Paar, 17.02.2010
Contactless Payments
with
Mifare Classic
Christof Paar, 17.02.2010
Case
Study
contactless
payments:
Let’s investigate one large scale system !
Let’s investigate
one
large
‐
scale
system
!
• contactless employee ID card, e.g., of a large corporate enterprise • more than 1 million users according to the manufacturer
• payments (max. 150 €), access control, recording of working time, … • Based on Mifare Classic 1K chip
Christof Paar, 17.02.2010
Mifare Classic
Mifare Classic
and its Security
Christof Paar, 17.02.2010
Mifare Classic 1K
Mifare Classic
1K
• “more than 1 billion“ cards used worldwide e g for public transport • “more than 1 billion“ cards used worldwide, e.g, for public transport • basically a (contactless) memory card with encryption, cheap (≈ 0,50 €)
• each card contains a factory‐programmed, read‐only Unique Identifier (UID)
• access to each sector can be secured with two cryptographic keys A and B
UID
Key A, sector 0 Key B, sector 0
Christof Paar, 17.02.2010
Key A, sector 15 Key B, sector 15
Security
Issues
of
Mifare Classic
1 Weak Cipher
1.
Weak
Cipher
i h k l
• proprietary stream cipher CRYPTO1 kept secret until 2007 • reverse engineering
small cipher state weak non‐linear functions small cipher state, weak non‐linear functions • cipher published on the Internet (CRAPTO1)
• researchers instantly reveal severe flawsresearchers instantly reveal severe flaws
Christof Paar, 17.02.2010
Security
Issues
of
Mifare Classic
2 Weak Random Number Generator
2.
Weak
Random
Number
Generator
• generates 32‐bit nonces nX and responses aX for the authentication • entropy: obviously only 16 bit instead of possible 32 bit
“ d “ d d l h l d !
• “randomness“ depends only on the time elapsed since power‐up ! AUTH (sector) nC nR || aR Christof Paar, 17.02.2010 aC 73
Security
Issues
of
Mifare Classic
3 Weak Implementation / Protocol
3.
Weak
Implementation
/
Protocol
• bad practice: keystream bits reused
i l l d l i i d f ll i d d
• parity calculated over plaintext instead of actually transmitted data • bug/feature: card replies with 4 encrypted bits (NACK 0x05) if the • bug/feature: card replies with 4 encrypted bits (NACK = 0x05), if the parity bits for the encrypted nR || aR are correct, but aR is wrong * can be used as covert channel to recover parts of the keystreamp y
Christof Paar, 17.02.2010
*) guess parity bits: 1 out of 28 tries will be successful 74
Analyzing a
Real
World
Contactless Payment System
Contactless Payment
System
Christof Paar, 17.02.2010
Special RFID Tools
Special
RFID
Tools
Special Reader: Precise control of the timing (accuracy: 75 ns)
Special Reader: Precise control of the timing (accuracy: 75 ns) FIX the the card’s random nonce to exactly one value!
Fake Tag:g Can completelyp y emulate anyy ISO14443 transponderp (e.g., Mifare cards) including an arbitrary UID
Christof Paar, 17.02.2010
Our Combined Attack
Our
Combined
Attack
1 diff ti l tt k t t t th 1st t k
1. differential attack to extract the 1st secret key
2. nested authentication attack for the remaining keys ! card nonce fixed to exactly one value !
! card nonce fixed to exactly one value !
crack all keys of a Mifare 1K card in < 10 Min
Christof Paar, 17.02.2010
Analysis of the ID Card 1/2
Analysis
of
the
ID
‐
Card
1/2
k d
• test our attack on one ID‐Card extraction of all secret keys • try ID‐Card of another employee
card contains the same keys
• try ID‐Card of a third employee card contains the same keys
...
...
• Surprising discovery:
All ID C d h
identical ke s
!
All
ID
‐
Cards
have
identical
keys
!
Christof Paar, 17.02.2010
Analysis of the ID Card 2/2
Analysis
of
the
ID
‐
Card
2/2
1. one‐time extraction of the secret keys ofy anyy ID‐Card
duration: < 10 minutes
2. reverse‐engineer the card’s content (repeated „pay‐and‐compare“ ) 2. reverse engineer the card s content (repeated „pay and compare )
• card number: integrity ”ensured“ with XOR checksum(UID&card number)
• credit balance: € in plain w/o any protection
h d d f d i l i l
• other data: date of card issuance, last payment terminal, …
3 kno ing the abo e wireless manip lating of all cards in the s stem 3. knowing the above: wireless manipulating of all cards in the system
from 10 … 25 cm (depending on antenna)
duration: milliseconds (!)
Christof Paar, 17.02.2010
Impersonation:
Duplicate an ID Card
Duplicate
an
ID
‐
Card
• read out relevant data in 100 milliseconds from a distance
• copy content of victim’s ID‐Card to blank Mifare Classic (ebay: < 0,50 € ) • card number and credit balance remain unchanged*
pay with a duplicate of a card that is known to the system
Christof Paar, 17.02.2010
*) note: funny XOR checkbyte has to be adapted
Impersonation:
Increase Credit Balance
Increase
Credit
Balance
+
• top‐up the credit balance of the cloned card
• or: restore previous content when money is used up
financial losses for the payment institution
(money is used that has never been paid into the system)
Christof Paar, 17.02.2010
Impersonation:
Wireless Pickpocketing
Wireless
Pickpocketing
+
‐
• attacker in addition lowers the credit on the victim’s card
• advantage: difficult to detect (no additional money in the system)
losses only on the side of the victims,
f d i d b h
fraud not noticed by the payment institution
Christof Paar, 17.02.2010
Selling Pre Charged Cards
Selling
Pre
‐
Charged
Cards
• dump the content of a valid ID‐Card to a PC
• generate new card number and write to new (blank) card • optionally: modify credit balance
ll h d ( )
• sell the cards (or top‐up service: pay 1€ get 3€)
poor issuing institution, rich criminal Christof Paar, 17.02.2010
Denial Of Service
Denial
‐
Of
‐
Service
• cards can be manipulated unnoticed by the owners
• disguised reader e g near a waiting line at the cash desk • disguised reader, e.g., near a waiting line at the cash desk
• automatically sets credit of any card in its proximity to 0€ (in 40 ms) financial losses for the concerned customers ; no direct damage but financial losses for the concerned customers ; no direct damage but
image loss and cost for customer service for the issuing institution
Christof Paar, 17.02.2010
Distributed All You Can Eat
Distributed
All
‐
You
‐
Can
‐
Eat
• disguised reader, this time charges cards of “victims” • will you complain about a 100€ ‐ voucher?
• will you complain about a 100€ voucher?
• in court: can you be sued for s.o. else charging your card?
very high losses for the issuing institution / happy customer
Christof Paar, 17.02.2010
Emulate an arbitrary ID Card
Emulate
an
arbitrary
ID
‐
Card
NFC ‐ mobile
• ID‐Card may stay in wallet when paying
• electronic emulation of an arbitrary card is possible
• generate a new UID, card number, and credit balance for each payment
d i / diffi l (bl kli i i ibl )
Christof Paar, 17.02.2010
• detection/countermeasures difficult (blacklisting impossible)
high losses for the issuing institution
Real
‐
World
Tests
with
the
ID
‐
Card
Contactless Payment System
Contactless
Payment
System
• Clone ID‐Cards (note: duplicates except for the UID)
Clone ID Cards (note: duplicates, except for the UID)
can payments be carried out with clones ?
! UID not checked !
• Modify the credit balances of the clones
Modify the credit balances of the clones
are payments with “counterfeit money” possible ?
! Iff shadow accounts exist,, theyy are not used !
• Production of “new” cards (new card number etc.)
( )
can we pay with arbitrary generated cards ?
b i
l
ff ti
i th b k
d
!
Christof Paar, 17.02.2010
obviously
no
effective
measures
in
the
back
‐
end
!
Summary of the Analyses
Summary
of
the
Analyses
• most efficient practical card‐only attack on Mifare to date • successful attacks on a real‐world system:
wirelessly manipulate any ID‐Card in milliseconds !
• worst realization of a contactless payment system ever
• worst realization of a contactless payment system ever
• unfortunately this is not a single occurence • realization on the system level does matter,
mistakes can become very painful for the issuing institution • system integrators:
please check your systems ask any cryptographer for help
Christof Paar, 17.02.2010 please check your systems, ask any cryptographer for help
Intermezzo
Intermezzo
Ah Mif
Cl
i i i
•
Aha.
Mifare Classic
is
insecure.
•
I’ve
heard
about
these
3DES
contactless
cards!
let’s exchange the cards of our payment
let s
exchange
the
cards
of
our
payment
system
&
make
the
same
errors
(identical
keys…)
Good
idea?
Christof Paar, 17.02.2010 98
SCA
on
secure Contactless
Smartcards
using
3DES
Christof Paar, 17.02.2010
RFID
Side
Channel
Measurement:
Mutual Authentication Protocol
Measure EM emanation
Mutual
Authentication
Protocol
Measure EM
emanation
??
Reader:
Send
protocol
Smartcard:
Encrypt
X
Send
protocol
value
X
yp
with 3DES
St
EM fi ld f RFID hi d
t i htf
d DEMA
Christof Paar, 17.02.2010 103Measurement
Setup
Christof Paar, 17.02.2010
Measurement
Setup
• ISO14443‐compatible • Freely Programmable • Low Cost (< 40 €) • Low Cost (< 40 €) Christof Paar, 17.02.2010 105Measurement
Setup
• 1 GS/s, 128 MB Memory • ± 100 mV • USB 2.0 Interface Christof Paar, 17.02.2010 106Measurement
Setup
Aim: Reduce Carrier Wave Influence
vs.
EM
leakage
Reader
of smartcard
Christof Paar, 17.02.2010
Side Channel Analysis
Side
Channel
Analysis
Step
1:
Raw
measurements
Christof Paar, 17.02.2010 110
EM
Trace
(
without
analogue filter)
(
without
analogue filter)
Christof Paar, 17.02.2010
EM
Trace
(
without
analogue filter)
(
without
analogue filter)
Christof Paar, 17.02.2010
EM
Trace
(
without
analogue filter)
(
without
analogue filter)
?
Christof Paar, 17.02.2010 113
Side Channel Analysis
Side
Channel
Analysis
Step 2 Analog e filter
Step
2:
Analogue
filter
Christof Paar, 17.02.2010 114
Carrier
Dampening
from
t tl
d
contactless card
after subtraction
after subtraction
from reader’s
oscillator
Christof Paar, 17.02.2010 115EM
Trace
(
with
analogue filter)
(
with
analogue filter)
Christof Paar, 17.02.2010
EM
Trace
(
with
analogue filter)
(
with
analogue filter)
Christof Paar, 17.02.2010
EM
Trace
(
with
analogue filter)
(
with
analogue filter)
?
Christof Paar, 17.02.2010
Side Channel Analysis
Side
Channel
Analysis
Step
p
3:
Digital
g
Demodulation
Christof Paar, 17.02.2010 119
Digital
Demodulation
Digital Demodulator
Rectifier
Digital
Filter
Christof Paar, 17.02.2010 120Digital
Demodulation
Christof Paar, 17.02.2010
Digital
Demodulation
?!
Christof Paar, 17.02.2010 122
Side Channel Analysis
Side
Channel
Analysis
Step
4:
Alignment
Christof Paar, 17.02.2010 123
Alignment
Pick
Reference
Pattern
Christof Paar, 17.02.2010
Alignment
Pick
Reference
Pattern
Christof Paar, 17.02.2010
Alignment
Christof Paar, 17.02.2010
Alignment
Varies
for
identical
Plaintext
Christof Paar, 17.02.2010
Side Channel Analysis
Side
Channel
Analysis
Step
5:
Location
of 3DES
(
fili
i h fi d k
k )
(Profiling with fixed,
known key)
Christof Paar, 17.02.2010 128
Data
Bus
Locate
Plain
‐
&
Ciphertext
Transfer
Christof Paar, 17.02.2010
Data
Bus
DPA:
Plaintext
8
Bit
Hamming
Weight
(5000 traces) Christof Paar, 17.02.2010 130Data
Bus
DPA:
Ciphertext
8
Bit
Hamming
Weight
(5000 traces) Christof Paar, 17.02.2010 131Trace
Overview
Plaintext 3DES Ciphertext ... Other processing
Christof Paar, 17.02.2010
Assumptions
?!
?
!
C
3DES
Christof Paar, 17.02.2010 133Side Channel Analysis
Side
Channel
Analysis
Step
6:
Attack
Christof Paar, 17.02.2010 134
3DES
‐
Engine
DPA
But:
Only
for
S
‐
Box
1
&
3
Christof Paar, 17.02.2010
3DES
Engine
DPA:
Peak
Extraction
Christof Paar, 17.02.2010
3DES
Engine
DPA:
Peak
Extraction
Christof Paar, 17.02.2010
3DES
Engine
DPA:
Binwise
Christof Paar, 17.02.2010
3DES
Engine
DPA:
Binwise
Apply
DPA
binwise
Christof Paar, 17.02.2010
DES Full Key Recovery
DES
Full
Key
Recovery
Summary
• Measurement
Setup
built
• Profiling
done
D t B
l d
• Data
Bus
revealed
•
Full 3DES
key revealed
y
Christof Paar, 17.02.2010
Conclusion
Conclusion
Ah Mif
Cl
i i i
•
Aha.
Mifare Classic
is
insecure.
•
I’ve
heard
about
these
3DES
contactless
cards!
let’s exchange the cards of our payment
let s
exchange
the
cards
of
our
payment
system
&
make
the
same
errors
(identical
keys…)
Good
idea?
NO.
Christof Paar, 17.02.2010 145
SCA
is so
destructive.
Can‘t we find some positive use ?
Can t we find
some positive
use ?
Christof Paar, 17.02.2010 147
Side
‐
Channel
based Watermarks
ffor IP
Protection
Christof Paar, 17.02.2010
Motivation:
IP Cores (Intellectual Property)
IP
Cores
(Intellectual
Property)
• Hardware blocks for certain functions (e.g., CPUs, coders…)Hardware blocks for certain functions (e.g., CPUs, coders…) • Increased re‐use of previous implementations
• Parts of the development can be bought from another partyParts of the development can be bought from another party
Faster and cheaper hardware designChristof Paar, 17.02.2010
Motivation:
IP Cores + Security?
IP
Cores
+
Security?
• Copyright
violations
of
IP
cores
• IP
cores
may
have
embedded
Trojans
Christof Paar, 17.02.2010
The question we want to solve:
The
question
we
want
to
solve:
Is our IP core in there?
(Did they pay the $0,10 royality?)
Christof Paar, 17.02.2010
Watermarks
Classical watermark
Digital watermark
Goal: Impossible to forge Goal: Impossible to remove
Christof Paar, 17.02.2010
Watermarking
for
IP
protection
G l f IP t ki Goals of IP watermarking:
1. Detectability: The owner can detect whether or not his code is used in an
IC.
2. Non–repudiation: The owner can prove towards a third party that his
code was used in an IC.
Possible attacks on IP watermarking:
1. Removing attack: The attacker removes the watermark from his IC design.
2. Impersonation attack: The attacker tries to detect a watermark in a
foreign design and claims that this watermark is his own. foreign design and claims that this watermark is his own.
Christof Paar, 17.02.2010
A
side
‐
channel
based
watermark
Main
idea
of
a
side
‐
channel
based
watermark:
• Insert an artificial side
‐
channel into the IP core
• Insert
an
artificial
side
‐
channel
into
the
IP
core
• This
side
‐
channel
leaks
out
a
unique
ID
f
IP
owner
can
check
ICs
for
their
unique
ID
IP
owner
can
proof
copyright
violations
Our spread spectrum based watermark
Our spread
spectrum
based
watermark
,
based
on
side
‐
channel
hardware
Trojan
from
CHES
2009
Christof Paar, 17.02.2010
Spread
spectrum
based
watermarks
Two Components that are added to the IP core: Two Components that are added to the IP core:
1. A PRNG that generates a pseudo-random bit sequence
sequence
2. A Leakage Circuit (LC) that is attached to the PRNG and that leaks out the bitstream
Christof Paar, 17.02.2010
Detecting
a
spread
spectrum
based watermark
based
watermark
1 Measure a single long power trace of the targeted device 1. Measure a single long power trace of the targeted device
2. From this power trace derive exactly one power‐value pi for each of the
n measured clock cycles. (e.g. by averaging the points of one clock cycle) 3. Compute the expected watermarking bit stream B=b1,…,bn
4. Generate different Hypotheses Hi by shifting the bit stream B:
b b
H1=b1,…,bn H2=b2,…,bn,b1
…
5. Correlate the Hypotheses Hi with the power‐values P=p1,…,pn
6. If the un‐shifted bit stream (H1) generates a significant correlation peak,
the watermark is embedded in the targeted device.
Christof Paar, 17.02.2010
Practical
results
I
l
t d
A 1
std
DPA
i t
t AES
Implemented
:
A
1
storder
DPA
resistant
AES
implementation
with
an
embedded
spread
‐
spectrum
watermark
watermark.
i
ili
i
Device
:
Xilinx Virtex
‐
2
PRO
XC2VP7
‐
5
FPGA
@
24MHz
Christof Paar, 17.02.2010
Practical
results
The
used
PRNG:
A 32
‐
bit LFSR with X
32+X
22+X
2+X
1and a fixed initial state.
A
32 bit
LFSR
with
X
32+X
22+X
2+X
1and
a
fixed
initial
state.
The
used
Leakage
g
Circuit:
• 16
‐
bit
Shift
‐
Register
• initialized with 0xAAAA
• initialized
with
0xAAAA
• shifted only if output of the PRNG
is „1“
Christof Paar, 17.02.2010
Measurements
Correlation for 500.000
Correlation for 500.000
clock cycles while the AES
clock cycles while the AES
implementation was
idle.
clock cycles while the AES
implementation was
constantly running
Christof Paar, 17.02.2010
constantly running.
Conclusions &
Auxiliary Stuff
Christof Paar, 17.02.2010
Conclusions
E
i
f
l
ld tt k
l
bl
• Experience
from real
‐
world attacks are very valuable
for the scientific community
• Real
‐
world impact of (physical)
attacks sometimes
hard to assess
• Evolution
of physical attacks are an
interesting (and
scary)
y p
phenomenon
• Is
there a
metric for measuring the hardness of
physical attacks?
physical attacks?
Related
Workshops
SECSI – Secure Component and Systems Identification
April 2010, Cologne, Germany
CHES – Cryptographic Hardware and Embedded Systems
A t 2010 UCSB August 2010, UCSB
escar – Embedded Security in Cars
Post
‐
Doc
Position
in
Embedded
Security Group @ U Bochum
Security
Group
@
U
Bochum
W k
th
ti l
d/
ti l
t
f
• Work
on
theoretical and/or practical aspect s
of
physical attacks
• 1+
year position
• Full scientific position,
p
great working atmosphere
g
g
p
• Please contact Christof
Paar,
[email protected]
…
and
yet
another
textbook
on
Cryptography
• Hopefully helpful for people without PhD`s in mathematics without PhD s in mathematics • Quite comprehensive