Side-Channel & Fault Attacks
Ruggero Susella System Research & Applications – Security Rodmap STMicroelectronics 2018/12/06
Side-Channel & Fault Attacks Ruggero Susella System Research - - PowerPoint PPT Presentation
Side-Channel & Fault Attacks Ruggero Susella System Research & Applications Security Rodmap STMicroelectronics 2018/12/06 2 ST Who are we ? STMicroelectronics 3 A global semiconductor leader 2017 revenues of $8.35B
Ruggero Susella System Research & Applications – Security Rodmap STMicroelectronics 2018/12/06
2
3
Front-End Back-End Research & Development Main Sales & Marketing
As of December 31, 2017
Borsa Italiana, Milan
Smart Things Smart Home & City Smart Industry Smart Driving
4
The leading provider of products and solutions for Smart Driving and the Internet of Things
5
The leading provider of products and solutions for Smart Driving and the Internet of Things Portfolio delivering complementarity for target end markets, and synergies in R&D and manufacturing
Dedicated Automotive ICs Analog, Industrial & Power Conversion ICs General Purpose & Secure MCUs EEPROM MEMS & Specialized Imaging Sensors Discrete & Power Transistors Digital ASICs
6
Advanced research and development centers around the globe ~ 17,000 patents; ~9,500 patent families; ~ 500 new filings (in 2017) ~ 7,400 people working in R&D and product design
As of December 31, 2017
7
Very-high and sustained growth potential
10 20 30 40 50 60 70 80
Number of IoT connected devices worldwide 2015- 2025 (in billions)
A broad range of secure solutions for different applications
8
Secure storage: Encryption Key generation and management Credential / Device life Cycle management Platform integrity Assurance Roots of trust Secure updates: Software & firmware Secure communications Authentication
Security should comply to a challenging mix requirements to match the targeted applications
9
Ultra low power devices Compact electronics Always connected solutions Cost effective platform Limited memory Physical access
10
Cryptography might be expensive for resource-constrained devices
low RAM and ROM usage
Challenging requirements
11
available
halved round-trip time during the key generation
removed, most recent added (e.g. Ed25519, RSA PSS) TLS 1.3
Cloud Things Without end-to-end security, someone might gain access to your IoT commands, notifications and other data
12
analysing side channels
countermeasures
Side Channel Attacks Most devices are under control of the users, side channel becomes feasible!
13
Italy (Agrate Brianza) France (Rousset)
Strong synergy with University
“Backbone” Security R&D Deliveries to ST divisions System Security Anticipation System Expertise System Architectures Proposals Expertise Support HW & SW Security IPs Platform Security Functionality & Performance Security Robustness
14
15
16
18
19
20
21
The first official information related to SCA attack dates back to the year 1965.
intelligence agency, was trying to break a cipher used by the Egyptian Embassy in London, but their efforts were stymied by the limits of their computational power. Wright suggested placing a microphone near the rotor-cipher machine used by the Egyptian to spy the click-sound the machine produced. By listening to the clicks of the rotors as cipher clerks reset them each morning, MI5 successfully deduced the core position of 2 or 3 of the machine’s rotors. This additional information reduced the computation effort needed to break the cipher, and MI5 could spy on the embassy’s communication for years. On the other hand, the original seminal works, as well as many subsequent pioneering ideas, on SCA attacks in public cryptography research community are all due to Paul Kocher, and start appearing from 1996 on.
[1] YongBin Zhou, DengGuo Feng. Side-Channel Attacks: Ten Years After Its Publication and the Impacts on Cryptographic Module Security Testing. IACR Eprint archive, 2005. [2] P. Wright. Spy Catcher: The Candid Autobiography of a Senior Intelligence Officer. Viking Press, 1987. 22
23
24
25
26
27
28
consumption and what it’s doing
30
crypto algorithm
the secret key (patterns)
31
RSA square RSA multiplication
analysis
consumption and measurement
32
execution with different input/plaintext values but same key
33
values processed
34
35
consumption and a target “sensitive variable”
36
different inputs
37 HW(Input0[0] XOR 0) HW(Input0[0] XOR 1) HW(Input0[0] XOR …) HW(Input0[0] XOR m) HW(Input1[0] XOR 0) HW(Input1[0] XOR 1) HW(Input1[0] XOR …) HW(Input1[0] XOR m) HW(Input…[0] XOR 0) HW(Input…[0] XOR 1) HW(Input…[0] XOR …) HW(Input…[0] XOR m) HW(Inputn[0] XOR 0) HW(Inputn[0] XOR 1) HW(Inputn[0] XOR …) HW(Inputn[0] XOR m)
Key Guess Input
with every column in the guess table
38 Time/Samples per trace n Time/Samples per trace Key Guess
Corr
intermediate variables which are never computed
intermediate variables that are actually computed
towards 1
39 Time/Samples per trace Key Guess
41
New Resistance R in series to SoC Power Supply GPIO used for trigger
42
measurement on a resistor
42
43
44
45
wavepro 40 GS/s 6Ghz bandwidth
0.1µm)
+Femto)
+handmade)
46
a cryptosystem by analyzing the time taken to execute cryptographic algorithms
48
computational steps depend on data values
algorithm (variable-time) or with Square&Multiply Always (constant-time)
accesses into the cache (greater computational time for cache miss)
Sbox)
attacks
49
50
51
attacker
53
54
Encryption Decryption Encryption key is also used for decryption It must be kept secret !
competition about symmetric algorithm, which has been requested by NIST for replacing the DES.
algorithm has been selected, named Rijndael, designed by two Belgian cryptographer Vincent Rijmen and Joan Daemen
56
57
58
58
128 bits 128 bits 128 or 192 or 256 bits
00 04 12 08 01 05 13 09 02 06 14 10 03 07 15 11
Plaintext = 0x00010203040506070809101112131415
59
AddRoundKey SubBytes ShiftRows MixColumns AddRoundKey SubBytes ShiftRows AddRoundKey
Key Schedule
Round Last Round
PLAINTEXT CIPHERTEXT KEY
Key Schedule is a separate part of the AES algorithms which, given a key (128,192,256 bit) generates (10,12,14) 128 bit round keys. Each round key is used in a different round
61
62
63
64
AddRoundKey is a XOR between the 128 bit state and the 128 bit round key
65
66
the Key
67
AddRoundKey SubBytes PLAINTEXT KEY
different Plaintexts P
68 HW(P0[0] XOR 0) HW(P0[0] XOR 1) HW(P0[0] XOR …) HW(P0[0] XOR m) HW(P1[0] XOR 0) HW(P1[0] XOR 1) HW(P1[0] XOR …) HW(P1[0] XOR m) HW(P…[0] XOR 0) HW(P…[0] XOR 1) HW(P…[0] XOR …) HW(P…[0] XOR m) HW(Pn[0] XOR 0) HW(Pn[0] XOR 1) HW(Pn[0] XOR …) HW(Pn[0] XOR m)
Key Guess Input
with every column in the guess table
69 Time/Samples per trace n Time/Samples per trace Key Guess
Corr
intermediate variables which are never computed
intermediate variables that are actually computed
towards 1
70 Time/Samples per trace Key Guess
71
72
73
74
76 Ground Nuclear Testing Anomalies in electronic monitoring equipment Aerospace Industry Problems in space electronics Super Computers Errors appear in large memories Critical systems Problems in cars, health, voting devices Smaller systems Half of embedded designs safety relevant Random bit flips in memory Random errors in logic as transistor size decreases
device at the right time
77
Is PIN OK? Continue Increment Counter Error yes no Skip check Bad result
78
Source https://wp-systeme.lip6.fr/jaif/wp-content/uploads/sites/8/2018/05/KH-29-05-2018-JAIF.pdf
location & timing
diagnostics
79 source: https://www.cosic.esat.kuleuven.be/summer_school_sardinia_2015/slides/Balasch.pdf
Temperature Voltage Undersupply Clock glitch Voltage glitch Electromagnetic Pulses Laser (FIB)
80
81 source: https://www.cosic.esat.kuleuven.be/summer_school_sardinia_2015/slides/Balasch.pdf
82
Clock ins N-1 ins N ins N+1 ins N+2 ins N-2 CLOCK
83
VCC ins N-1 ins N ins N+1 ins N+2 ins N-2 VCC
84
85
duration
polarity)
probe(analysis)
Discovery board
86
87
88
IR(1064nm)
89
90
derive information about the secret key
92
round
93
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
94
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝜻
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
95
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝜻 𝜻′
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
96
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝜻 𝜻′ 𝜻′
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
97
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝜻 𝜻′ 𝜻′ 𝜻′
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
98
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
SB SR ARK
4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15
𝜻 𝜻′ 𝜻′ 𝜻′
𝑩 𝑪 𝑫 𝑬 𝑳𝑶𝒔
99
For each 𝒘𝒃𝒎 = (0𝑦00: 0𝑦𝐺𝐺) of the byte For each fault 𝜻 = (0𝑦01,0𝑦02,0𝑦04,0𝑦08,0𝑦10,0𝑦20,0𝑦40,0𝑦80) Compute 𝜠 = 𝑇𝑣𝑐𝐶𝑧𝑢𝑓𝑡(𝑤𝑏𝑚) ⊕ 𝑇𝑣𝑐𝐶𝑧𝑢𝑓𝑡(𝑤𝑏𝑚 ⊕ 𝜁)
average
100
101
voltage) out of range
precision of the fault
103
compared
is equal to the input
104
105
106
107