• Aucun résultat trouvé

J¨orn-MarcSchmidtChristophHerbst APracticalFaultAttackonSquareandMultiply

N/A
N/A
Protected

Academic year: 2022

Partager "J¨orn-MarcSchmidtChristophHerbst APracticalFaultAttackonSquareandMultiply"

Copied!
22
0
0

Texte intégral

(1)

A Practical Fault Attack on Square and Multiply

J ¨orn-Marc Schmidt Christoph Herbst

Institute for Applied Information Processing and Communications (IAIK) Graz University of Technology

Inffeldgasse 16a, A-8010 Graz, Austria

{joern-marc.schmidt,christoph.herbst}@iaik.tugraz.at

(2)

1 Introduction Motivation

Square and Multiply Recent Work

Our Fault Model

2 Our Attack 3 Practical Issues

Fault Injection Problems

4 Outlook and Conclusion

(3)

Motivation

Square and multiply is a common stragegy for implementing modular exponentiation

Modular exponentiation is used in public key cryptography RSA is based on modular exponentiation

Fault attack on RSA implementations without CRT

(4)

Other Modular Exponentiation Methods

Left-to-right square and multiply Right-to-left square and multiply k-ary exponentiation

Sliding window method

Montgomery powering ladder

(5)

Square and Multiply

Function 1 Left-to-Right Square and Multiply Algorithm Input: Message m, Exponent e = (e t , . . . , e 0 ) 2 , Modulus N

R = 1

for i = t downto 0 do R = R · R mod N if e i = 1 then

R = R · m mod N end if

end for

return R

(6)

Recent Work

Different attacks on square and multiply - assuming Bit flip

Dan Boneh et al. (1997) Feng Bao et al. (1997) Marc Joye et al. (1997) Safe errors

Sung-Ming Yen and Marc Joye (2000) Random fault in intermediate value

Michele Boreale (2006)

(7)

Our Fault Model

Manipulation of the program flow Skip instruction

Not always successful

Motivated by spike attacks

(8)

1 Introduction Motivation

Square and Multiply Recent Work

Our Fault Model

2 Our Attack 3 Practical Issues

Fault Injection Problems

4 Outlook and Conclusion

(9)

Skip a Squaring Operation

Exponent e = (e t , . . . , e 0 ) 2 , leading zeros are neglected (t − k + 1)-th square operation skipped

⇒ Sig k , k ∈ {0, . . . , t}

Sig t = Sig as R = 1

Sig k =

t

Y

i=k+1

m e

i

2

i−1

·

k

Y

i=0

m e

i

2

i

mod n.

(10)

Iterative Attack

For k = 0 Sig =

(Sig 0 ) 2 mod n for e 0 = 0 (Sig 0 ) 2 · m −1 mod n for e 0 = 1 For k ∈ {1, . . . , t − 1}

Sig k =

Sig k−1 for e k = 0

m 2

k−1

· Sig k−1 mod n for e k = 1

Results in (1, e t−1 , . . . , e 0 ).

(11)

1 Introduction Motivation

Square and Multiply Recent Work

Our Fault Model 2 Our Attack

3 Practical Issues Fault Injection Problems

4 Outlook and Conclusion

(12)

Device Under Test (DUT)

AVR microcontroller

Straight forward left-to-right square and multiply Montgomery for modulo multiplication

Spikes in the power supply

(13)

Spike Generation

Circuit Board for DUT and Spike generation (low cost) Controlled by PC over serial interface

Spike offset precision 0.5 clock cycles

Spike length 0.5-5 clock cycles

(14)

Setup for the performed spike attack

(15)

Spike (black) and power consumption (gray)

-2 -1 0 1 2 3 4

Supply Voltage (V)

Time

0 1 2

Power Consumption (A)

(16)

Searching the right spike parameters

Right spike positions and length unknown Calculate expected values for e k = 0 and e k = 1

Sweep over the whole computation starting from the end

If e k found, calculate expected values for e k+1

(17)

Problems

Fine sweep may lead to double detections

Store precomputed values indicating a 1 as long as 0 e detected

Compare all following results to these values and repair detected exponent if match found

Another Solution: Use power trace to guess positions

⇒ requires more knowledge and equipment

Afterwards add a 1 to the detected exponent

Test result by calculating a signature

(18)

1 Introduction Motivation

Square and Multiply Recent Work

Our Fault Model 2 Our Attack

3 Practical Issues Fault Injection Problems

4 Outlook and Conclusion

(19)

Attack in the presence of DPA Countermeasures

Square and Always Multiply Message Blinding

Exponent Blinding

Further Countermeasures

(20)

Outlook

Mount attack on ECC double and add

Attack Montgomery powering ladder in modified fault model

Investigate existing countermeasures in more detail

(21)

Conclusion

We presented a new attack on square and multiply Based on program flow manipulation

Possible to check whether or not fault injection was successful

Practical implementation at low cost

(22)

Thank you for your attention.

Questions?

J ¨orn-Marc Schmidt Christoph Herbst

Institute for Applied Information Processing and Communications (IAIK) Graz University of Technology

Inffeldgasse 16a, A-8010 Graz, Austria

{joern-marc.schmidt,christoph.herbst}@iaik.tugraz.at

Références

Documents relatifs

The aggregate level findings regarding prudence are considered inconsistent with standard models of expected utility, and while the potential for non-EU models

From the results on monotone and left- monotone deterministic RL -automata mentioned above it follows quite easily that each left-to-right regular language is accepted by a

Let us define the Dyck path of length 2n (called Dyck path associated with π) obtained from this lattice path by reading an up-step U every time the path moves up, and a down-step

Methods: To determine whether true RL shunting causing hypoxemia is caused by intracardiac shunting, as classically considered, a retrospective single center study was conducted

Finite both right- and left-orderable, but not bi-orderable, monoids are given in Examples 3.4 (which is idempotent, that is, all of its elements are idempotent) and 3.5 (with

Toute utilisation commerciale ou impression sys- tématique est constitutive d’une infraction pénale.. Toute copie ou impression de ce fi- chier doit contenir la présente mention

- A l’aide de ce théorème, on peut donner une caractérisa- tion de l’équation fonctionnelle de la différence entre le calcul opérationnel.. dans un intervalle

Dans mes recherches sur les équations du premier ordre dont l’inté- grale ne prend qu’un nombre fini de valeurs autour des points critiques mo- biles, j’ai