Docsity

Hardware Implementations of Cryptography: Software vs. Hardware and FPGA Vendors, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Hardware Implementations of Cryptography: Software vs. Hardware and FPGA Vendors and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 746: Lecture 9

Hardware Implementations

of Cryptography

Software or hardware?

SOFTWARE HARDWARE

security of data

during transmission

flexibility

( new cryptoalgorithms,

protection against new attacks )

speed

random key

generation

access control

to keys

tamper resistance

( viruses, internal attacks )

low cost

  • designs must be sent

for expensive and time

consuming fabrication

in semiconductor foundry

  • bought off the shelf

and reconfigured by

designers themselves

Two primary ways of implementing

cryptography in hardware

ASIC

A pplication S pecific

I ntegrated C ircuit

FPGA

F ield P rogrammable

G ate A rray

  • designed all the way

from behavioral description

to physical layout

  • no physical layout design;

design ends with

a bitstream used

to configure a device

Block RAMs Block RAMs

Configurable

Logic

Blocks

I/O

Blocks

FPGA components

Block

RAMs

Xilinx

Primary products: FPGAs and the associated CAD software

Main headquarters in San Jose, CA

Fabless* Semiconductor and Software Company  UMC (Taiwan) {Xilinx acquired an equity stake in UMC in 1996}*  Seiko Epson (Japan)  TSMC (Taiwan)

Programmable Logic Devices (^) ISE Alliance and Foundation

Series Design Software

Xilinx FPGA Families

 Old families  XC3000, XC4000, XC  Old 0.5μm, 0.35μm and 0.25μm technology. Not recommended for

modern designs.

 Low Cost Family  Spartan/XL – derived from XC  Spartan-II – derived from Virtex  Spartan-IIE – derived from Virtex-E  Spartan-3, Spartan 3E, Spartan 3L

 High-performance families  Virtex (220 nm)  Virtex-E, Virtex-EM (180 nm)  Virtex-II, Virtex-II PRO (130 nm)  Virtex-4 (90 nm)  Virtex 5 (65 nm)

Source: [Xilinx Inc.]

FPGA families

Spartan 3 Virtex 4 LX / SX / FX

Spartan 3E Virtex 5 LX

Spartan 3L

Low-cost High-performance

Xilinx

Altera

Cyclone II Stratix II

Stratix II GX

Prices of the most recent families of

Xilinx FPGAs

Spartan 3 Virtex II, Virtex II-Pro

< $130* < $3,000*

Spartan 3E Virtex 4

< $35* < $3,000*

  • approximate cost of the largest device per unit for

a batch of 10,000 units

Low-cost High-performance

LUT (Look-Up Table) Functionality

  • Look-Up tables

are primary

elements for

logic

implementation

  • Each LUT can

implement any

function of 4

inputs

x 1 x 2 x 3 x 4

y

x 1 x 2

y

LUT

x 1 x 2 x 3 x 4

y

0

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 0 1 0 0 0 1 0 1 0 1 0

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 1 1 1 1 1 1 1 1 1 1 1

x 1 x 2 x 3 x 4

y

x 1 x 2 x 3 x 4

y

x 1 x 2

y

x 1 x 2

y

LUT

x 1 x 2 x 3 x 4

y

0

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 0 1 0 0 0 1 0 1 0 1 0

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 0 1 0 0 0 1 0 1 0 1 0

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 1 1 1 1 1 1 1 1 1 1 1

x 1 0

x 2 x 3 x 4 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

y 1 1 1 1 1 1 1 1 1 1 1

Possible Applications of

Cryptographic Hardware

Why are cryptographic chips needed?

  • hardware accelerators for web servers

SSL (Secure Socket Layer) – cryptographic protocol

used by majority of today’s web servers

to protect credit card numbers for on-line transactions

such as buying a book on the amazon.com

Why are cryptographic chips needed?

  • hardware accelerators for

Virtual Private Networks (VPNs)

IPSec (Secure Internet Protocol) – cryptographic protocol

used to support VPNs (Virtual Private Networks), i.e., secure

communication between remote Local Area Networks (LANs)

using Internet

IPSec optional in IP ver. 4, required in emerging IP ver. 6

Acceleration can be provided using:

  • secure gateways
  • secure client PCMCIA cards.

Why are cryptographic chips needed?

  • secure satellite communications
  • secure phones
  • secure storage
  • secure XML supply chain communication
  • cipher breaking
  • secure PDAs

So how is it all done today?

Selected ASIC Security Chips (1)

In-line IPsec

processing.

On-chip SA database.

RNG.

SHA-1 4,800 none

MD

3DES-CBC

AES-CBC

AES-CTR

Broadcom

BCM

DH On-chip RNG

RSA

SHA-1 500

MD

DES-CBC

3DES-CBC

AES-CBC

AES-CTR

Broadcom

BCM

Public key Other

algorithms

Data rate

[Mbps]

HMAC

algorithms

Encryption

algorithms

Chip name

In-line IPsec

processing.

On-chip SA database.

IKE processing.

RNG

DH

RSA

SHA-1 4,

MD

AES-XCBC

DES-CBC

3DES-CBC

AES-CBC

AES-CTR

ARC

HiFn 8350

HIPP III

IPsec header and

trailer processing. IKE support. On-chip SA

database. LZS and MPPC compression.

RNG

DH

RSA

SHA-1 632

MD

DES-CBC

3DES-CBC

AES-CBC

AES-CTR

ARC

HiFn 7956

Public key Other

algorithms

Data rate

[Mbps]

HMAC

algorithms

Encryption

algorithms

Chip name

Selected ASIC Security Chips (2)

And many others …

Among them the following encryption chipmakers …

AEP Systems

Cavium

Corrent

Motorola

Layer N Networks

NetContinuum

NetOctave

Philips Semiconductors

......

Broadcom

HiFn

Intel

SafeNet

FPGAs – an emerging

alternative to ASICs

Secret-key Cryptosystems Hash Functions

Public-Key Cryptosystems

  • Triple DES
  • AES-Rijndael
  • other AES finalists

(Mars, RC6, Serpent, Twofish)

Cryptographic Transformations

Most Often Implemented

  • SHA-
  • SHA-2 (256, 384, 512)
  • MD
  • RSA
  • DH, DSA
  • ECC (Elliptic Curve Cryptosystems)

0

50

100

150

200

250

300

350

400

450

500

Speed [Mbit/s]

Serpent

I

Rijndael (^) Twofish Serpent RC6 Mars

I

431

444

414

353

294

177 173

104

149

62

143

112 88

102

61

Worcester Polytechnic Institute

University of Southern California

George Mason University

Implementations of AES candidates

using Xilinx, Virtex 1000

Implementations of AES candidates

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

Serpent

I

Twofish RC6 RijndaelMars Serpent

I

Area=Cost [CLB slices]

Worcester Polytechnic Institute

University of Southern California

George Mason University

1250

5511

1076

2809 2666

1137

1749

2638

2507

4312

3528

2744

4621 4507

7964

using Xilinx, Virtex 1000

Fully pipelined / Ultra fast architecture

round #rounds

= k pipeline stages

....

round 1

= k pipeline stages

round 2

= k pipeline stages

.... .... ....

k registers

0

2

4

6

8

10

12

14

16

18

Full mixed pipelining in Virtex FPGAs

Throughput [Gbit/s]

Serpent Twofish RC6 Rijndael

16.

15.

13. 12.

Gaj & Chodowiec, RSA Conf. 2001

Amphion IP cores (1)

Standard 1,256 + 18 BRAM 930 49.3K 2,

Compact 799 + 6 BRAM 290 25K 581

Simplex AES Encryption / Decryption

3,998 + 100 9,344 283K 25,

BRAM

Ultra fast

Fast 778 + 10 BRAM 1,064 34K 2,

Standard 746 + 4 BRAM 290 – 426 19.2K 426 – 581

Compact 549 + 4 BRAM 290 16.4K 581

AES Decryption

2181 + 100 10,880 203K 25,

BRAM

Ultra fast

Fast 573 + 10 BRAM 1,323 27K 2,

Standard 696 + 4 BRAM 250 – 341 18.2K 426 - 581

Compact 403 + 4 BRAM 350 14.8K 581

Size [Slices] Data rate [Mbps] Size [gates] Data rate [Mbps]

Virtex-II FPGA ASIC TSMC 180nm

AES Encryption

ASIC/ FPGA

1.

1.

1.

2.

2.

1.

2.

2.

2.

2.

Amphion IP cores (2)

390 52K

SHA–256 2,

SHA-256 1,122 420 26K 1,

SHA-1 854 626 17K 1,

SHA-1 & SHA-2 cores

Ultra fast 4,305 1,941 56.7K 4,

Fast 1,367 430 21.8K 1,

Compact 803 240 11.8K 533

Ultra compact 527 128 7.9K 266

Size [Slices] Data rate [Mbps] Size [gates] Data rate [Mbps]

Virtex-II FPGA ASIC TSMC 180nm

DES / 3DES Encryption / Decryption

2.

2.

2.

2.

2.

3.

3.

3.

ASIC/

FPGA

Helion Technologies cores

613 + 1 744 16K 1,

BRAM

MD

SHA-1 573 874 20K > 1,

640 < 6K

DES 888 LUT

3DES

Hash functions

849 + 1 685 < 22K 1,

BRAM

SHA-

DES & 3DES

Pipelined? > 10,000? > 25,

899 LUT + 1,699 < 31 K > 2,

10 BRAM

Fast

392 LUT + 223 < 11K > 500

3 BRAM

Standard

Tiny? < 25? < 30

Data rate Size [gates] Data rate [Mbps]

[Mbps]

Size [Slices]

Virtex-II FPGA ASIC TSMC 180nm

AES Encryption or Decryption

ASIC/

FPGA

1.

2.

1.

2.

1.

1.

1.

2.

2.