Towards the Automatic Applications of Side Channel Countermeasures - - PowerPoint PPT Presentation

towards the automatic applications of side channel
SMART_READER_LITE
LIVE PREVIEW

Towards the Automatic Applications of Side Channel Countermeasures - - PowerPoint PPT Presentation

Towards the Automatic Applications of Side Channel Countermeasures Francesco Regazzoni Francesco Regazzoni 23 October 2015, Chia, Italy P. 1 Contents 1 Motivations 2 DPA Resistant Synthesis 3 DPA Resistant Place and Route 4 DPA


slide-1
SLIDE 1

Towards the Automatic Applications of Side Channel Countermeasures Francesco Regazzoni

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 1
slide-2
SLIDE 2

Contents

1

Motivations

2

DPA Resistant Synthesis

3

DPA Resistant Place and Route

4

DPA Resistant Instruction Set Extension

5

Quick Note on Software Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 2
slide-3
SLIDE 3

Why Electronic Design Automation for security? Security is very often considered at later stages

  • f design

Cost and Time to Market Possible Security pitfalls

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 3
slide-4
SLIDE 4

Why Electronic Design Automation for security? Security is very often considered at later stages

  • f design

Cost and Time to Market Possible Security pitfalls

EXTRA CONSTRAINT

Use as much as possible “standard” EDA commodities!

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 3
slide-5
SLIDE 5

Motivating Example

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 4
slide-6
SLIDE 6

Contents

1

Motivations

2

DPA Resistant Synthesis

3

DPA Resistant Place and Route

4

DPA Resistant Instruction Set Extension

5

Quick Note on Software Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 5
slide-7
SLIDE 7

Simplified Hardware Design Flow (ASIC)

Algorithm Design C, Matlab, VHDL RTL (Architecture) Design Synthesizable HDL Gate

x y x XOR y

Layout

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 6
slide-8
SLIDE 8

Let’s focus on Synthesis

RTL (Architecture) Design Synthesizable HDL Logic Synthesis Gate Level

x y x XOR y

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 7
slide-9
SLIDE 9

Logic Synthesis Input and Output INPUT: HDL Description Technological Library (area, timing, power) Synthetic Library (multipliers...) Constraints OUTPUT: Gate Level Netlist Estimation of area, timing, power (!) Timing constraints

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 8
slide-10
SLIDE 10

Is it sufficient for DPA? Paul Kocher, Joshua Jaffe, and Benjamin Jun, “Differential Power Analysis”, in Proceedings of Advances in Cryptology-CRYPTO’99, Santa Barbara, California, USA, August 15-19, 1999. (Cited by 5177)

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 9
slide-11
SLIDE 11

Countermeasures Power consumption independent from processed key dependent data

Intermediate values of the cryptographic algorithm Intermediate values processed by the device Power consumption of the cryptographic device

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 10
slide-12
SLIDE 12

Countermeasures Power consumption independent from processed key dependent data

Intermediate values of the cryptographic algorithm Intermediate values processed by the device Power consumption of the cryptographic device Masking Countermeasures

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 11
slide-13
SLIDE 13

Countermeasures Power consumption independent from processed key dependent data

Intermediate values of the cryptographic algorithm Intermediate values processed by the device Power consumption of the cryptographic device Hiding Countermeasures Masking Countermeasures

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 12
slide-14
SLIDE 14

Countermeasures Power consumption independent from processed key dependent data

Intermediate values of the cryptographic algorithm Intermediate values processed by the device Power consumption of the cryptographic device Hiding Countermeasures Masking Countermeasures

They can be implemented in Software or in Hardware

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 12
slide-15
SLIDE 15

Approach One INPUT: HDL Description Technological Library (area, timing, power) Synthetic Library (multipliers...) Constraints OUTPUT: DPA resistant Gate Level Netlist Estimation of area, timing, power (!) Timing constraints

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 13
slide-16
SLIDE 16

Approach Two

INPUT:

HDL Description Technological Library (area, timing, power) Synthetic Library (multipliers...) Constraints (limit the gates)

OUTPUT:

Gate Level Netlist

“Cell Substitution”:

Replace cells with Reload the design for correct area and timing

  • K. Tiri and I. Verbauwhede, A digital design flow for secure integrated circuits, IEEE TCAD,

2006

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 14
slide-17
SLIDE 17

Contents

1

Motivations

2

DPA Resistant Synthesis

3

DPA Resistant Place and Route

4

DPA Resistant Instruction Set Extension

5

Quick Note on Software Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 15
slide-18
SLIDE 18

Place and Route

Gate

x y x XOR y

Place and Route Layout

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 16
slide-19
SLIDE 19

Place and Route Input and Output INPUT: Gate level description of the circuit Physical view of the library (pin placement, ...) Constraints from synthesis OUTPUT: Gate Level Netlist Position and interconnection of the gates Estimation of area, timing, power (!)

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 17
slide-20
SLIDE 20

This is not yet the end! Security Evaluation Chip Finalization Tape Out Security Evaluation

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 18
slide-21
SLIDE 21

Security Evaluation Toggle Count .... SPICE simulation Real measures on fabricated chip

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 19
slide-22
SLIDE 22

Reconfigurable Devices

Measure directly Less Freedom Tools more “closed”

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 20
slide-23
SLIDE 23

Contents

1

Motivations

2

DPA Resistant Synthesis

3

DPA Resistant Place and Route

4

DPA Resistant Instruction Set Extension

5

Quick Note on Software Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 21
slide-24
SLIDE 24

Protect PRESENT with secure hardware Lightweight block cipher 4 bit S-box addRoundKey, sBoxLayer

// Calculate S-box (plaintext XOR key) int PRESENT(int plaintext, int key) {

1 int result = 0; // initialize the result 2 plaintext = plaintext ^key; // perform the xor with the key 3 result = S[plaintext]; // perform the S-box 4 return result; }; // return the result

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 22
slide-25
SLIDE 25

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 23
slide-26
SLIDE 26

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 24
slide-27
SLIDE 27

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 25
slide-28
SLIDE 28

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 26
slide-29
SLIDE 29

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 27
slide-30
SLIDE 30

What can I do?

ALU ISE A B Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 28
slide-31
SLIDE 31

What can I do? Something easier?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 29
slide-32
SLIDE 32

Protected / Non Protected CO-Design!

ALU A B Memory Register File ISE ISE IMM. ISE

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 30
slide-33
SLIDE 33

Protected / Non Protected CO-Design!

B ALU ISE A Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 31
slide-34
SLIDE 34

Protected / Non Protected CO-Design!

B ALU ISE A Memory Register File ISE ISE IMM.

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 32
slide-35
SLIDE 35

Automatic design of DPA resistant ISE

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 33
slide-36
SLIDE 36

Needed “Basic Blocks”

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Generate useful power traces?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 34
slide-37
SLIDE 37

Needed “Basic Blocks”

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Generate useful power traces? Measure the DPA resistance?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 35
slide-38
SLIDE 38

Needed “Basic Blocks”

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Generate useful power traces? Measure the DPA resistance? Countermeasure and its design flow?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 36
slide-39
SLIDE 39

Needed “Basic Blocks”

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Generate useful power traces? Measure the DPA resistance? Countermeasure and its design flow? Partition the algorithm?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 37
slide-40
SLIDE 40

Needed “Basic Blocks”

identify sensitive parts Partition Sensitive / Non Sensitive Protect Sensitive Security Evaluation

Generate useful power traces? Measure the DPA resistance? Countermeasure and its design flow? Partition the algorithm?

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 38
slide-41
SLIDE 41

The CMOS Design Flow

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 39
slide-42
SLIDE 42

The Processor Customization

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 40
slide-43
SLIDE 43

The Protected Design Flow

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 41
slide-44
SLIDE 44

The Hybrid Design Flow

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 42
slide-45
SLIDE 45

The Simulation Environment

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 43
slide-46
SLIDE 46

The Design Evaluation

processor HDL code ISE HDL code Protected Library crypto.c software CMOS Library

0101001. 1100001. 1100001. 0101001.

Security Evaluaton ISE Extractor Protected Synth and P&R CMOS Synth and P&R crypto_ISE.c SPICE level simulation Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 44
slide-47
SLIDE 47

Partitioning of the PRESENT algorithm S-box

sbox result

Plain Text key Plain Text key

sbox result

Plain Text key

sbox result

Plain Text key

sbox result

Plain Text key

sbox result

full ISE XOR + S-box ISE S-box ISE XOR ISE Full CMOS

protected logic non protected logic Legend Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 45
slide-48
SLIDE 48

Security Evaluation

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 10

1

0.5 1 1.5 2 2.5 3 3.5 4

noise standard deviation mutual information [bit] full CMOS XOR ISE S-box ISE XOR + S-box ISE full ISE

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 46
slide-49
SLIDE 49

Contents

1

Motivations

2

DPA Resistant Synthesis

3

DPA Resistant Place and Route

4

DPA Resistant Instruction Set Extension

5

Quick Note on Software Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 47
slide-50
SLIDE 50

Overall Software Flow

Transformation Target Identification Code Transformation

sbci r21,0xfd ld r25,Y movw r18,r26 subi r18,0x4f

Input Software Implementation Sensitive Parts

sbci r21,0xfd lds r23,705 mov r25,r23 ld r25,Y lds r23,705 mov r18,r23 mov r19,r23 movw r18,r26 subi r18,0x4f Targets for Protection Example (A) Protected Implementation Example (A) Targets for Protection Example (B) Protected Implementation Example (B) sbci r21,0xfd ld r25,Y movw r18,r26 subi r18,0x4f sbci r21,0xfd ld r25,Y movw r18,r26 subi r18,0x4f

Information Leakage Analysis

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 48
slide-51
SLIDE 51

Example on Software

846 847 848 849 850 851 852 853 854 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

sbci r21,0xfd ld r25,Y movw r18,r26 subi r18,0x4f sbci r19,0xfd movw r28,r18 ld r30,Y Sensitivity (Mutual information) Clock cycle

Instruction - time mapping of unprotected implementation

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 49
slide-52
SLIDE 52

Example on Software

846 847 848 849 850 851 852 853 854 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

sbci r21,0xfd ld r25,Y movw r18,r26 subi r18,0x4f sbci r19,0xfd movw r28,r18 ld r30,Y Sensitivity (Mutual information) Clock cycle

Instruction - time mapping of unprotected implementation

1620 1622 1624 1626 1628 1630 1632 1634 1636 1638 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

sbci r21,0xfd lds r23,705 mov r25,r23 ld r25,Y lds r23,705 mov r18,r23 mov r19,r23 movw r18,r26 subi r18,0x4f sbci r19,0xfd movw r28,r18 lds r23,705 mov r30,r23 ld r30,Y Sensitivity (Mutual information) Clock cycle

Instruction - time mapping of protected implementation

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 49
slide-53
SLIDE 53

Conclusions and Tips Initial steps for power analysis are promising This is just the beginning... Don’t forget verification!

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 50
slide-54
SLIDE 54

Acknowledgments Paolo Ienne, Alessandro Cevrero, Yusuf Leblebici, Stéphane Badel, Johann Großschädl, Ali Galip Bayrak, Axel Poschmann, Zeynep Toprak, Marco Macchetti, Laura Pozzi, Christof Paar, Frank Gurkaynak, François-Xavier Standaert, Theo Kluter, Philip Brisk, Michael Schwander, Thomas Eisenbarth

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 51
slide-55
SLIDE 55

Questions? Thank you for your attention! mail: regazzoni@alari.ch

Francesco Regazzoni 23 October 2015, Chia, Italy

  • P. 52