Top Banner
Hardware Side Channel Attacks .. on the cheapiest! Albert Spruyt Alyssa Milburn
76

Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

Sep 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

Hardware Side Channel Attacks.. on the cheapiest!

Albert SpruytAlyssa Milburn

Page 2: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

2

About Us

Alyssa

PhD student

@noopwafel

Albert

Unemployed

Page 3: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

3

Today

● Side Channel Analysis● (Cheap) Hardware● Demos!● A bit of Fault Injection

Page 4: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

4

Side Channel Analysis is full of...

● Scary math● Complicated words

● You can talk to us later to learn more!

Page 5: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

5

High-level overview

Commands

● Attackers need:– Physical access– Some input

(or output)

Page 6: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

6

The context

● Smartcards– credit cards, access cards, passports

● Secure microcontrollers– crypto wallets, U2F/YubiKey

● Random IoT devices– lightbulbs, ...

Page 7: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

Why care aboutside channels?

Page 8: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

8

PIN check

for (n: 1 → 4)

if (secret_pin[n]!= input[n])

fail();

Page 9: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

9

PIN check

if (secret_pin[n]!= input[n])

fail();

Page 10: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

10

PIN check

n=1

n=1 and n=2

Page 11: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

11

How do we measure power?

Oscilloscope

Page 12: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

12

Power cut!

Vin

(+5V)

in+

in-

shuntresistor

oscilloscope

Page 13: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

13

Today’s target

Arduino Nano

● 16 Mhz● ~3-5 euro● Not secure

Page 14: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

14

Real power cuts

Page 15: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

15

Real power cuts

Page 16: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

16

Big picture

CommunicationMeasurements

Trigger

Signal..?Oscilloscope

Target

PC

Page 17: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

17

DEMO

Page 18: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

18

What’s going on?

1 / 0 / 1 / 0

Page 19: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

19

Hamming weight

0x00: 00000000

→ hamming weight 0

0xFF: 11111111

→ hamming weight 8

0x05: 00000101

→ hamming weight 2

0x11: 00010001

→ hamming weight 2

Page 20: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

20

Leakage?

● Calculate with (random) bytes● Take power traces

Can we match the Hamming Weight of the byte

to the power traces?

Page 21: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

21

Hamming weight

● Power profiles based on different data

● Averaged● We can see the data

being processed!

Source: Side channel analysis, practice and a bit of theory. Ilya Kizhvatov

Page 22: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

23

Keys

● We’re going to steal encryption keys– Everyone needs to have keys

Page 23: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

24

Super secure encryption

● AES-128: unbroken and secure

Input

Initia

l rou

nd

Round 1

Round 2

Rou

nd 3

Rou

nd 4

Round

5

Round 8

Round

6

Round 7

Rou

nd 9

Final R

oun

d

Output

Page 24: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

25

AES trace

Page 25: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

26

Early AES

Key addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition Sbox

Key addition Sbox

Key addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition Sbox

Key addition Sbox

Key addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition Sbox

Key addition Sbox

Key addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition SboxKey addition Sbox

Key addition Sbox

Byte 1

Byte 16

Page 26: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

27

Single byte only

● We can look at each byte separately!

KeyAddition

Input byte

Sbox

Keybyte

Page 27: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

28

Single byte only

● Only 256 possible key bytes– Try them all!

KeyAddition

Input byte

Sbox

Keybyte Hamming weight?

Page 28: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

29

The master plan

● For every key guess:– For each input:

● Calculate Hamming Weight after the S-box● Compare that with the actual leakage

● Pick the guess with the best fit!

Page 29: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

30

CorrelationPower

Analysis

Page 30: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

32

We’re lazy!

● Open source: JLSCA– Does CPA for us– Also supports fancier attacks– Runs fast on a cheap laptop

(Thanks Cees!)

Page 31: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

33

New plan

MCU(processor)

Random inputs

Power measurements

JLSCA keys

Page 32: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

34

Oscilloscope?

Page 33: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

35

Oscilloscopes

LeCroy WaveRunner $17 000

PicoScope 3406D $2 500

Rigol DS1054Z $500

Page 34: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

36

Previous Work

ChipWhisperer $250

Hantek USB oscilloscope $60

ChipWhisperer Nano..? $50

Page 35: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

ChipWhispererNano

Page 36: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

39

Solving our hardware woes

Let’s build an awesome, cheap scope!

Let’s hack something together!

Page 37: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

40

What do we need?

● GPIO to trigger● ADC to measure● Memory to store measurements

Page 38: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

41

HorrorScope

Atmel XMEGA – USB 2.0– 12-bit ADC @2 MSPS

Page 39: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

42

Bill of Materials (BOM)

~5 euro ex. VAT

Xmega: 2.50eur

PCB: 1eur

Page 40: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

43

Funny story 1

Page 41: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

44

More problems Design considerations

Sampling below Nyqist frequency

Source: http://blog.teledynelecroy.com/2013/06/back-to-basics-sampling-rate.html

Nano: 16MhzOur ADC: 2Mhz

Page 42: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

45

Xmega datasheet

● Just a suggestion

Page 43: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

46

More problems Design considerations

No analog front-end

DC offset, resolution, noise, ...– AC coupling, use AREF

Page 44: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

47

Funny story 2

Coding is hard

Page 45: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

48

More traces!

100 traces averaged: A wild AES appears!

Page 46: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

49

Acquisition

So: let’s try it!

Page 47: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

50

Setup

CommunicationMeasurements

Trigger

Power usageOscilloscope

Target

PC

Page 48: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

52

Real world setup

We have:

“Target”: Arduino Nano + AES

“Oscilloscope”: HorrorScope

Page 49: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

53

Triggering

How does the scope know when to measure?– Not enough SRAM to sample all the time– We need to sync the scope to the target

So, whats the last thing we control?– Sending the input

Page 50: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

54

Triggering plan

● HorrorScope measuring procedure– Send command to Scope (arm)– GPIO pin turns high– Actually start measuring

– Connect Scope GPIO pin to RX on Nano

Page 51: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

55

When to start measuring …

Time

Start

Send input

Arm sc

ope

Send last

input byt

e

Scope tr

iggers

Targ

et does A

ES

Save d

ata +

power tra

ce

Page 52: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

56

Collect traces...

We need a lot of traces– Make sure the first/or last round is in view– Select a high Sample speed

● Ensure there’s a margin before/after the round

Page 53: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

57

Take Traces

● AES: initial round, 9 rounds, a final round

Page 54: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

58

Acquiring Traces …

…. Here’s one we made earlier

Page 55: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

59

Traces are bad

● Why are they bad?

Page 56: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

60

What’s wrong?

● Misalignment

Page 57: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

61

Signal spread

Source: Side channel analysis, practice and a bit of theory. Ilya Kizhvatov

Page 58: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

62

Aligned

Aligned Not aligned!

Thank you JLSCA!

Page 59: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

63

Why is alignment important?

Before after

Page 60: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

64

Let’s get keys

● DEMO– Jupyter notebook

Page 61: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

66

Comparing the scopes

Vds1022 ($70):

~1.5k traces

HorrorScope: ~30k traces

Page 62: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

67

Funny Story 3

● How many mistakes can we make before it doesnt work?

● Silkscreen-Off-By-One

Page 63: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

68

Funny story 3

● People told us the Xmega ADC was bad

Page 64: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

69

Funny story 3

● 1000 averaged, no alignment

Page 65: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

70

Strength in numbers

● Side Channel Attacks require overcoming the noise● Noise can be reduced through taking more traces,

but not in every case

Page 66: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

71

Fault Injection

HorrorScope can sort of power the Nano● The Nano wants 5v● Xmega GPIO pins provide 3.2v

Page 67: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

72

Powering the Nano

Vin

(+5V)

PORT CPIN 0,1,2,3,4,5,6,7

Page 68: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

73

Ok faults, now what?

● Perform Fault Injection and Differential Fault Analysis

● Inject faults into AES and recover the key

Page 69: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

74

What can you do about it?

● Threat model– Do you need to resist physical attacks?

Best defense: make sure it doesn’t matter!

● Basic steps– Use hardware with built-in countermeasures

.. and check it with a (Horror)scope :)

(or a ChipWhisperer)!

Page 70: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

75

Conclusion

● Hardware attacks are cheaper than we thought

● Side Channel Analysis is something you can do at home – and you should try it

Page 71: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

76

Special Thanks

● Cees-Bart ‘ceesb’ Breunesse– https://github.com/Riscure/Jlsca

● Rafa Boix Carpi– For saying it can’t be done

● Ilya Kizhvatov– Letting us steal his pictures

● Workshop attendees– For their feedback and love

Page 72: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

77

Homework

https://github.com/albert-spruyt/HorrorScope/

Provided: power traces and Jlsca notebook.

You should now be able to get the key!

(Also in the repo: schematics/source/etc)

.. we’re hoping for a port to the STM32 – SCA for $2?

Page 73: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

78

Page 74: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

79

Hamming weight

● Power profiles based on different data

● Averaged● We can see the data

being processed!

Source: Side channel analysis, practice and a bit of theory. Ilya Kizhvatov

Page 75: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

80

Power cut: easy?

Page 76: Hardware Side Channel Attacks .. on the cheapiest! · 2019. 9. 3. · AES-128: unbroken and secure Input I n i t i a l r o u n d R o u n d 1 R o u n d 2 R o u n d 3 R o u n d 4 R

81

Power cut: UFO