34
Altera vs. Xilinx which one keeps your design hidden? 22. Aug. 2013 Amir Moradi Embedded Security Group Ruhr University Bochum, Germany

Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

Altera vs. Xilinx which one keeps your design hidden?

22. Aug. 2013

Amir Moradi

Embedded Security Group

Ruhr University Bochum, Germany

Page 2: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

2

Embedded Security Group

Acknowledge

Alessandro Barenghi

Markus Kasper

Timo Kasper

David Oswald

Pawel Swierczynski

Christof Paar

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 3: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

3

Embedded Security Group

SCA on Bitstream Encryption Feature

PCB board

E2PROM

Power-up DEC

VCC-IO VCC-AUX VCC-INT

E2PROM unencrypted bitstream

IEEE CASS| Singapore | 03. Apr. 2013 Amir Moradi

Page 4: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

4

Embedded Security Group

Broken Families

Virtex-II Pro, SASEBO

Virtex-4, Xilinx DevBoard

Virtex-5, SASEBO-GII

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 5: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

5

Embedded Security Group

Broken Families

Spartan-6, SASEBO-W

Stratix-II, SASEBO-B

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 6: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

6

Embedded Security Group

New Targets

Stratix-III, Altera DevKit

Kintex-7, SASEBO-GIII

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 7: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

7

Embedded Security Group

EM Analysis

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 8: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

8

Embedded Security Group

EM Analysis

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 9: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

9

Embedded Security Group

EM Analysis

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 10: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

10

Embedded Security Group

EM Analysis

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 11: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

11

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 12: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

12

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 13: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

13

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 14: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

14

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 15: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

15

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 16: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

16

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 17: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

17

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 18: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

18

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 19: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

19

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 20: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

20

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 21: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

21

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 22: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

22

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 23: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

23

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 24: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

24

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 25: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

25

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 26: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

26

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 27: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

27

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 28: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

28

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 29: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

29

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 30: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

30

Embedded Security Group

Decapping

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 31: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

31

Embedded Security Group

Altera’s Key Derivation

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Key1, Key2

FPGA

AES Key

Page 32: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

32

Embedded Security Group

AES Key=ENCKey1(Key2)

Selecting an arbitrary Key1’

Key2’=DECKey1’(AES Key)

(Key1’,Key2’) works the same as (Key1,Key2)

no added security!

Altera’s Key Derivation

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Key1, Key2

FPGA

f AES Key ENC

Counter

Bitstream Encrypted Bitstream

AES Key

Page 33: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

33

Embedded Security Group

Altera:

– AES-128 is replaced by AES-256

• Key derivation stays the same

– Counter is not increased arithmetically

• much heuristics + proprietary schemes

– revealed by reverse engineering the PC software

Old vs. New Generations

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi

Page 34: Altera vs. Xilinx · 8/22/2013  · Aug 2013 Amir Moradi Key1, Key2 FPGA f AES Key ENC Counter Encrypted Bitstream Bitstream AES Key . 33 Embedded Security Group Altera: –AES-128

34

Embedded Security Group

Altera:

– AES-128 is replaced by AES-256

• Key derivation stays the same

– Counter is not increased arithmetically

• much heuristics + proprietary schemes

– revealed by reverse engineering the PC software

Xilinx:

– AES-256 in CBC mode (as before)

– HMAC is introduced (Virtex-6 and all 7 series)

• no place in FPGA to save the HMAC key!

• The first block of the encrypted bitstream is the HMAC key!

Old vs. New Generations

CHES 2013| Ramp Session | Santa Barbara | 22. Aug 2013 Amir Moradi