analysis of a fault injection mechanism related to voltage...

46
Analysis of a fault injection mechanism related to voltage glitches using an on-chip voltmeter Loïc ZUSSA Jean-Max DUTERTRE Jessy CLEDIERE Bruno ROBISSON

Upload: others

Post on 28-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

Analysis of a fault injection mechanism related to voltage glitches using an on-chip voltmeter

•Loïc ZUSSA •Jean-Max DUTERTRE

•Jessy CLEDIERE •Bruno ROBISSON

Page 2: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

“Cryptanalysis  of secure circuits by physical fault injections”

• Analysis of fault injection mechanisms related to non-invasive physical disturbances

2

Thesis subject

In this presentation

• Analysis of fault injection mechanism related to voltage glitches

• Injection temporal resolution improving

Page 3: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

3

D Q

clk

data n n

Dffi

vdd : core voltage

D Dffi+1

Q

Under-powering a synchronous circuit make its calculation time longer

If the calculation time is longer than the clock period => faults are injected ¾ DFFs sample data which are not up-to-date

The longest calculation time is called the critical time

Previous work

Page 4: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

4

Static under-powering leads to timing constraint violation by increasing the calculation times of all the calculation rounds

¾ Identical faults injected on an AES using overclocking and underpowering

Previous work

Note :

Underpowering the circuit make the calculation times longer A fault is injected in the most critical one due to timing constraint violation

Page 5: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

5

Transient under-powering also leads to timing constraint violation by increasing the calculation time of a specific round

¾ Identical faults injected on an AES using clock and negative voltage glitches

Previous work

Note :

Most of the time a fault is injected in the targeted round due to timing constraint violation Low temporal accuracy due to signal filtering ?

Page 6: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

6

Transient over-powering also leads to FAULTS injection But it seems inconsistent with timing constraint violation

Motivations

?

On-chip Voltmeter : • To observe the voltage inside the circuit • To understand the fault injection mechanism related to positive

voltage glitches

“Sensing nanosecond-scale voltage attacks and natural transients in FPGAs” - FPGA 2013

ZICK Kenneth M. ; SRIVASTAV, Meeta ; ZHANG, Wei

Page 7: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

• Voltmeter Principle and implementation

• Internal disturbances observation Fault injection characterization

• Internal disturbances shaping

Fault injection improvement

• Conclusion

7

Agenda

Page 8: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

8

CLK

1,2 Volt = core voltage : vdd delay

A delay-meter

Propagation times increase when the core voltage decreases

Measuring a propagation time is equivalent to measuring the core voltage

Page 9: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

9

CLK

1,0 Volt = core voltage : vdd delay

Propagation times increase when the core voltage decreases

Measuring a propagation time is equivalent to measuring the core voltage

A delay-meter

Page 10: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

10

CLK

1,2 Volt = core voltage : vdd ∆d delay

Time to digital converter

The time-to-digital converter measures a phase distance between two signals

delay + 1 * ∆d  < clock period

Page 11: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

11

CLK

1,2 Volt = core voltage : vdd ∆d delay

The time-to-digital converter measures a phase distance between two signals

delay + 2 * ∆d  < clock period

∆d

Time to digital converter

Page 12: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

12

CLK

1,2 Volt = core voltage : vdd

∆d

∆d

∆d delay

Time to digital converter

The time-to-digital converter measures a phase difference between two signals

delay + 3 * ∆d  > clock period

Page 13: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

13

CLK

1,2 Volt = core voltage : vdd

∆d

∆d

∆d delay

When undergoing a glitch injection

delay + 2 * ∆d  < clock period delay + 3 * ∆d  > clock period

code  =  ‘1110’

Page 14: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

14

CLK

1,0 Volt = core voltage : vdd

delay + 1 * ∆d  < clock period delay + 2 * ∆d  > clock period

∆d

∆d

∆d code  =  ‘1100’

delay

When undergoing a glitch injection

Page 15: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

15

D Q CLK 1 1

D Q 1

D Q 1

D Q 1

vdd

Library : voltage <> code binary code

voltage variations from 0,7V to 2,5V step 0,05V

0,5 volt voltage

0,7 volt

2  “linear”  zones  =>  resolution ~ 0,07V 1  “blind”  zone

Page 16: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

16

4 voltmeters implemented : different delays due to within-die process variations

Only  one  “linear”  zones   => resolution improving

No  “blind”  zone

binary code

voltage

Library : voltage <> code

Page 17: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

17

spartan 3A FSM

Voltmeter

1 1 0 0 0

Shift Register

200 MHz core voltage

nominal voltage

x4

Acquisition setup

Page 18: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

18

spartan 3A FSM

Voltmeter

1 1 1 0 0

Shift Register

200 MHz ??? Volt

Known injected glitch

x4

Acquisition setup

Page 19: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

19

spartan 3A FSM RS-232

Voltmeter

1 1 1 0 0

Shift Register

200 MHz ??? Volt

Computer

Library Code Ù Voltage

Waveform

Known injected glitch View of the effective

disturbance

x4

Acquisition setup

Page 20: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

20

Pulse generator variables :

1. DC offset (Volts) 2. Amplitude (Volts) 3. Width (ns) 4. Delay (ns)

voltage

time

4

2

3 1

Glitches injection setup

Page 21: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : -14V width : 400ns

21

Expectation : Filtered signal due to the input capacitances

Negative voltage glitch : what I expected

400 ns

Page 22: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : -14V width : 400ns

22

Observation :

2 sets of damping oscillations

Effective disturbances are due to the rising/falling edges of the injected voltage

400 ns

Negative voltage glitch : what it is !

0,4 Volt

Page 23: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : +14V width : 400ns

23

Observation :

Positive glitches injection also produce negative disturbances due to the rising/falling edges of the injected voltage Fault injection mechanism could also be related to timing constraint violation ?

400 ns

Glitches injection setup Positive voltage glitch

Page 24: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

24

spartan 3A

AES

110ns 330ns

Glitches injection setup Fault injection target

Target

AES 128bit - 100MHz Fault injection synchronization

Trig signal 330 ns before the AES calculation

Page 25: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

25

spartan 3A

trigger

AES

110ns 330ns

Glitch generator

Injected glitch

Amplitude (Volts) Width (ns)

Variables

DC offset from 1,4 to 1,1 Volts Delay from 170 to 330 ns

Glitches injection setup Fault injection protocol

AES 128bit : 11 rounds - 100MHz

Page 26: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

26

FPGA : spartan 3A

AES

110ns 330ns

expected cipher text

AES

delay

DC offset

Glitches injection setup Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

Page 27: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

27

FPGA : spartan 3A

AES

AES

delay

DC offset

110ns 330ns

Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

expected cipher text

Page 28: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

28

FPGA : spartan 3A

AES

AES

delay

DC offset

110ns 330ns

Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

unexpected cipher text

Page 29: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

29

FPGA : spartan 3A

AES

110ns 330ns

expected cipher text

AES

delay

DC offset

Glitches injection setup Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

Page 30: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

30

FPGA : spartan 3A

AES

AES

delay

DC offset

110ns 330ns

Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

expected cipher text

Page 31: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

31

FPGA : spartan 3A

AES

AES

delay

DC offset

110ns 330ns

Fault injection protocol

AES 128bit : 11 rounds - 100MHz

DC offset from 1,4 to 1,1 Volts

Delay from 170 to 330 ns

trigger

Glitch generator

unexpected cipher text

Page 32: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

32

delay

DC offset

faulted round

Negative voltage glitch characterization

amplitude : -14V width : 400ns

AES

delay

DC offset

Page 33: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

33

amplitude : -14V width : 400ns

AES

delay

DC offset

Observation :

R3  wasn’t  faulted The negative disturbance is too large Faults were injected in R2 or R4 first

?

Negative voltage glitch characterization

Page 34: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

34

amplitude : +14V width : 400ns

AES

delay

DC offset

Observation :

R3  was  faulted  BUT  R6  wasn’t  !

Positive voltage glitch characterization

?

Page 35: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

35

� Same injected faults

� Same fault injection mechanism

(-14V | 400ns) (+14V | 400ns)

Injected faults comparison

� Different temporal accuracy

Page 36: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

36

Positive voltage glitches - Fault injection mechanism

Effective disturbances are damping oscillations due to the rising and falling edges of the injected glitch

For different plaintexts and keys of the AES, positive and negative voltage glitches induced exactly the same faults

Negative and positive glitches share the same fault injection mechanism : timing constraint violation

Due to their different shape, positive and negative voltage glitches have slightly different temporal accuracy

Page 37: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : -14V width : 100ns

37

Observation : Positive oscillations due to the rising edge negative oscillations due to the falling edge ¾ Only one significant

negative spike

COMPENSATE

100 ns

Offsetting

Page 38: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : +8V width : 50ns

38

Observation : Negative oscillations due to the rising edge and due to the falling edge are ¾ More efficient glitch

injection

SYNCHRONIZED

50 ns

Addition

Page 39: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

39

(-14V | 100ns) : compensation (+8V | 50ns) : synchronization

� Same injected faults � Same temporal accuracy

Injected faults comparison

? ?

Page 40: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : -22V width : 10ns

40

Observation : Negative oscillation due to the falling edge is by the positive oscillation due to the rising edge ¾ More accurate glitch

injection

SHORTEN

10 ns

Sharping

Page 41: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

amplitude : -22V width : 10ns

41

Observation : Negative oscillation due to the falling edge is by the positive oscillation due to the rising edge ¾ More accurate glitch

injection

SHARPED

! Two significant oscillations

• unexpected faults can be  injected…

Sharping

Page 42: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

42

(-22V | 10ns) : sharping

Injected faults comparison

� Same injected faults � Very good temporal accuracy

Page 43: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

43

~90 ns

~90 ns

(-22V | 10ns) : sharping

Injected faults comparison

� Same injected faults � Very good temporal accuracy

Page 44: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

44 time

injected voltage

• A short glitch to shorten the first oscillation

• A long glitch to compensate the remaining oscillations

core voltage

Fault injection mechanism

Page 45: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

45

Fault injection mechanism & glitch shaping

Effective disturbances are damping oscillations due to the rising and falling edges of the injected glitch

Negative and positive glitches share the same fault injection mechanism : timing constraint violation

Damping oscillations due to the rising and falling edges of one or several injected glitches can  be  “superimposed”  to shape the effective disturbance

Page 46: Analysis of a fault injection mechanism related to voltage ...dutertre/doc_recherche/P_2014_2_talk_ZUSSA… · 45 Fault injection mechanism & glitch shaping Effective disturbances

ZUSSA Loïc PhD Student

Secure integrated circuits and physical fault injections

[email protected] +33 (0)4.42.61.67.12 880 route de Mimet 13541 Gardanne - FRANCE

Presentation available on loic.zussa.fr/publications