Elliptic curve cryptography on FPGAs: How fast can we go with a - - PowerPoint PPT Presentation

elliptic curve cryptography on fpgas how fast can we go
SMART_READER_LITE
LIVE PREVIEW

Elliptic curve cryptography on FPGAs: How fast can we go with a - - PowerPoint PPT Presentation

Elliptic curve cryptography on FPGAs: How fast can we go with a single chip? Kimmo Jrvinen Department of Information and Computer Science Aalto University, Finland kimmo.jarvinen@aalto.fi ERSA 2011, Las Vegas, NV, USA, July 1821, 2011


slide-1
SLIDE 1

Elliptic curve cryptography on FPGAs: How fast can we go with a single chip?

Kimmo Järvinen

Department of Information and Computer Science Aalto University, Finland kimmo.jarvinen@aalto.fi ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011

slide-2
SLIDE 2

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 2/20

Introduction

Contents

  • 1. What we are computing
  • 2. How we do it and what kind of optimizations are used
  • 3. The results which show that this is the fastest published

ECC implementation

slide-3
SLIDE 3

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 2/20

Introduction

Contents

  • 1. What we are computing
  • 2. How we do it and what kind of optimizations are used
  • 3. The results which show that this is the fastest published

ECC implementation

◮ Explaining ECC requires some math but I try to keep it in

minimum; See the paper for exact definitions and equations if you’re interested

slide-4
SLIDE 4

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 2/20

Introduction

Contents

  • 1. What we are computing
  • 2. How we do it and what kind of optimizations are used
  • 3. The results which show that this is the fastest published

ECC implementation

◮ Explaining ECC requires some math but I try to keep it in

minimum; See the paper for exact definitions and equations if you’re interested

◮ Work that is based on several of my previous publications.

Especially, K. Järvinen: “Optimized FPGA-based elliptic curve cryptography processor for high-speed applications,” Integration—the VLSI Journal, to appear

slide-5
SLIDE 5

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 3/20

Introduction

Fast cryptography with FPGAs

◮ FPGAs very good platforms for cryptography1

Example

Architecture efficiency: Reprogrammability allows optimizing for specific parameters because if parameters change, we can change the design

1Wollinger et al., ACM Trans. Embed. Comput. Syst. 3(3):534-574, 2004

slide-6
SLIDE 6

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 3/20

Introduction

Fast cryptography with FPGAs

◮ FPGAs very good platforms for cryptography1

Example

Architecture efficiency: Reprogrammability allows optimizing for specific parameters because if parameters change, we can change the design

◮ In this work, we fix the curve to a standardized curve NIST

K-163 (both the curve and the underlying finite field is fixed)

1Wollinger et al., ACM Trans. Embed. Comput. Syst. 3(3):534-574, 2004

slide-7
SLIDE 7

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 4/20

Preliminaries (mathematical background)

slide-8
SLIDE 8

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

slide-9
SLIDE 9

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

slide-10
SLIDE 10

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

slide-11
SLIDE 11

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5

slide-12
SLIDE 12

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15

slide-13
SLIDE 13

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7

slide-14
SLIDE 14

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2

slide-15
SLIDE 15

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6

slide-16
SLIDE 16

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18

slide-17
SLIDE 17

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16

slide-18
SLIDE 18

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10

slide-19
SLIDE 19

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11

slide-20
SLIDE 20

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14

slide-21
SLIDE 21

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4

slide-22
SLIDE 22

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12

slide-23
SLIDE 23

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12 17

slide-24
SLIDE 24

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12 17 13

slide-25
SLIDE 25

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12 17 13 1

slide-26
SLIDE 26

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12 17 13 1

g18

slide-27
SLIDE 27

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 5/20

Public-key cryptography

◮ The encryption key y is derived from the decryption key x

in a one-way manner

◮ Hence, y can be public if x remains private

Example

◮ Exponentiation: y = gx mod p ◮ y = 3x mod 19 ◮ Discrete logarithm problem (DLP): x = logg(y) mod p

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3

g = 3

9

g2

8

g3

5 15 7 2 6 18 16 10 11 14 4 12 17 13 1

g18

11

gx What is x?

slide-28
SLIDE 28

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

slide-29
SLIDE 29

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P

slide-30
SLIDE 30

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P

slide-31
SLIDE 31

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P

slide-32
SLIDE 32

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-33
SLIDE 33

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-34
SLIDE 34

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-35
SLIDE 35

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-36
SLIDE 36

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-37
SLIDE 37

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-38
SLIDE 38

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-39
SLIDE 39

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-40
SLIDE 40

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-41
SLIDE 41

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-42
SLIDE 42

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-43
SLIDE 43

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-44
SLIDE 44

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-45
SLIDE 45

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-46
SLIDE 46

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-47
SLIDE 47

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-48
SLIDE 48

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P

slide-49
SLIDE 49

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P 21P = −P

slide-50
SLIDE 50

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 6/20

Elliptic curve cryptography

◮ Points on E form an

additive Abelian group

◮ We can compute additions:

R = P + Q so that P, Q, R are points on E

◮ EC DLP: Given P and

Q = kP determine k

◮ Elliptic curve

cryptosystems analogous to systems based on DLP

◮ DLP is much harder in EC

groups ⇒ Shorter keys!

E : y 2 = x3 + 2x − 4 (mod 23)

P P + P = 2P 2P + P = 3P 3P + P = 4P 21P = −P Q = kP

slide-51
SLIDE 51

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 7/20

What are we actually computing?

◮ Scalar multiplication: Q = kP

slide-52
SLIDE 52

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 7/20

What are we actually computing?

◮ Scalar multiplication: Q = kP ◮ Point operations: Point addition and point doubling

Example (point addition): (x3, y3) = (x1, y1) + (x2, y2) x3 = y2 − y1 x2 − x1 2 −x1 −x2; y3 = y2 − y1 x2 − x1

  • (x1 −x3)−y1
slide-53
SLIDE 53

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 7/20

What are we actually computing?

◮ Scalar multiplication: Q = kP ◮ Point operations: Point addition and point doubling

Example (point addition): (x3, y3) = (x1, y1) + (x2, y2) x3 = y2 − y1 x2 − x1 2 −x1 −x2; y3 = y2 − y1 x2 − x1

  • (x1 −x3)−y1

◮ Field operations: Multiplication, addition, subtraction,

inversion Example (multiplication) c = a × b mod p, where a, b, c ∈ [0, p − 1] and p is prime The width of the operands is typically [160, 600]

slide-54
SLIDE 54

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 7/20

What are we actually computing?

◮ Scalar multiplication: Q = kP ◮ Point operations: Point addition and point doubling

Example (point addition): (x3, y3) = (x1, y1) + (x2, y2) x3 = y2 − y1 x2 − x1 2 −x1 −x2; y3 = y2 − y1 x2 − x1

  • (x1 −x3)−y1

◮ Field operations: Multiplication, addition, subtraction,

inversion Example (multiplication) c = a × b mod p, where a, b, c ∈ [0, p − 1] and p is prime The width of the operands is typically [160, 600]

◮ Binary fields ⇒ No carry!

slide-55
SLIDE 55

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒

slide-56
SLIDE 56

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ P = P

slide-57
SLIDE 57

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 23P + P = 9P

slide-58
SLIDE 58

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 27P + 23P + P = 137P

slide-59
SLIDE 59

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 210P + 27P + 23P + P = 1161P

slide-60
SLIDE 60

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 211P + 210P + 27P + 23P + P = 3209P

slide-61
SLIDE 61

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 214P + 211P + 210P + 27P + 23P + P = 19593P

slide-62
SLIDE 62

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 8/20

Scalar multiplication

◮ Scalar multiplication is the main operation in all EC

cryptosystem: Q = kP

◮ Double-and-add algorithm:

Point doubling P ← 2P for all ki; and Point addition Q ← Q + P if ki = 1

Example

Q = 19593P = (100110010001001)2P ⇒ 214P + 211P + 210P + 27P + 23P + P = 19593P Only 14 point doublings and 5 point additions

◮ In practice, k is 100–600 bits long; in our case,

log2(k) ≈ 160 and we need ∼160 point doublings and ∼80 point additions

slide-63
SLIDE 63

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 9/20

Hierarchy

Scalar multiplication Point addition Point doubling Addition in finite field Multiplication/ squaring in finite field Inversion in finite field

slide-64
SLIDE 64

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 10/20

Koblitz curves

◮ Special elliptic curves over binary fields (binary

polynomials modulo an irreducible polynomial)

slide-65
SLIDE 65

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 10/20

Koblitz curves

◮ Special elliptic curves over binary fields (binary

polynomials modulo an irreducible polynomial)

◮ If the point (x, y) is on the curve, then also (x2, y2) is on

the curve ⇒ Point doublings can be replaced with φ(P) = (x2, y2)

  • perations! Squaring is cheap in binary fields!

◮ But, k must be represented in τ-adic form: k = kiτ i

where τ ∈ C (instead of binary form ki2i)

slide-66
SLIDE 66

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 10/20

Koblitz curves

◮ Special elliptic curves over binary fields (binary

polynomials modulo an irreducible polynomial)

◮ If the point (x, y) is on the curve, then also (x2, y2) is on

the curve ⇒ Point doublings can be replaced with φ(P) = (x2, y2)

  • perations! Squaring is cheap in binary fields!

◮ But, k must be represented in τ-adic form: k = kiτ i

where τ ∈ C (instead of binary form ki2i)

◮ Scalar multiplication: kℓ−1φℓ−1P + . . . + k1φP + k0P

◮ Compute φ(P) (very cheap!) instead of point doublings ◮ Otherwise, the algorithm is similar

◮ We need a converter!

slide-67
SLIDE 67

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 11/20

Hierarchy (Normal curves)

Scalar multiplication Point addition Point doubling Addition in finite field Multiplication/ squaring in finite field Inversion in finite field

slide-68
SLIDE 68

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 11/20

Hierarchy (Koblitz curves)

Scalar multiplication Point addition Frobenius map, φ(P) Addition in finite field Multiplication/ squaring in finite field Inversion in finite field Conversion

slide-69
SLIDE 69

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 12/20

Processor architecture

slide-70
SLIDE 70

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 13/20

Elliptic curve processor for Koblitz curves

Computations on Koblitz curves are performed with:

◮ Conversion for k ◮ Scalar multiplication

Converter Main processor k P Q = kP

slide-71
SLIDE 71

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 13/20

Elliptic curve processor for Koblitz curves

Computations on Koblitz curves are performed with:

◮ Conversion for k ◮ Precomputations with the base point P ◮ Scalar multiplication with the precomputed points

Converter Main processor k P Q = kP Precomputation

slide-72
SLIDE 72

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 13/20

Elliptic curve processor for Koblitz curves

Computations on Koblitz curves are performed with:

◮ Conversion for k ◮ Precomputations with the base point P ◮ Scalar multiplication with the precomputed points in

projective coordinates (P = (X, Y, Z))

◮ Mapping from (X, Y, Z) back to (x, y)

Converter Main processor k P Q = kP Precomputation

  • Coord. mapping
slide-73
SLIDE 73

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 14/20

Main processor: Interleaving point additions

◮ 8 multiplications, critical path 4 multiplications

Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Point addition: Q ← Q + P = (X, Y, Z) + (x, y)

slide-74
SLIDE 74

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 14/20

Main processor: Interleaving point additions

◮ 8 multiplications, critical path 4 multiplications

Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Point addition: Q ← Q + P = (X, Y, Z) + (x, y)

slide-75
SLIDE 75

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 14/20

Main processor: Interleaving point additions

◮ 8 multiplications, critical path 4 multiplications ◮ With 4 multipliers, critical path 2 multiplications / p. addition

Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Point addition: Q ← Q + P = (X, Y, Z) + (x, y)

slide-76
SLIDE 76

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 14/20

Main processor: Interleaving point additions

◮ 8 multiplications, critical path 4 multiplications ◮ With 4 multipliers, critical path 2 multiplications / p. addition

Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Z1 X1 Z2 X2 Y1 Y2 Y3 Y4 Point addition: Q ← Q + P = (X, Y, Z) + (x, y)

slide-77
SLIDE 77

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-78
SLIDE 78

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-79
SLIDE 79

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-80
SLIDE 80

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-81
SLIDE 81

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-82
SLIDE 82

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 15/20

Balancing the pipeline

Time Area

Converter Precomp. Scalar mult.

  • Coord. map

Total area Total time Throughput Throughput/area

slide-83
SLIDE 83

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 16/20

Parallelization

◮ The strategy is to

replicate T processors with maximum throughput / area ratio

◮ For example, we can fit

T = 5 processors in a Stratix IV GX230 FPGA

Processor 1 Processor 2 Processor 3 Processor T k P Q

slide-84
SLIDE 84

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 17/20

Results & conclusions

slide-85
SLIDE 85

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 18/20

Results

Table: Results on Stratix IV GX EP4SGX230KF40C2.

ALUTs 78,695 (43 %) Regs 61,871 (34 %) ALMs 74,750 (82 %) M9K 105 (9 %) Clock, converter 120 MHz Clock, others 266 MHz Time 8.3 µs Throughput 1,693,000

slide-86
SLIDE 86

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 19/20

Summary

FPGA-based implementation of ECC that. . .

  • 1. . . . is the fastest published implementation

(almost 1,700,000 scalar multiplication / sec.)

  • 2. . . . is optimized for a specific curve on every level
  • 3. . . . uses a lot of parallelism
  • 4. . . . relies on reprogrammability of FPGAs

(fixed and highly optimized implementations would be impractical without reprogrammability)

slide-87
SLIDE 87

Kimmo Järvinen: How fast is elliptic curve cryptography with a single FPGA? ERSA 2011, Las Vegas, NV, USA, July 18–21, 2011 20/20

Thank you!2 Questions?

  • 2. . . and thanks to Emil Aaltonen Foundation for a grant covering the

expenses of this trip!