The Elliptic Curves Discrete Logarithm Problem and an implementation - - PowerPoint PPT Presentation

the elliptic curves discrete logarithm problem and an
SMART_READER_LITE
LIVE PREVIEW

The Elliptic Curves Discrete Logarithm Problem and an implementation - - PowerPoint PPT Presentation

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. -Pollard and CUDA. Conclusions The Elliptic Curves Discrete Logarithm Problem and an implementation of parallelized Pollards algorithm for ECDLP Alberto


slide-1
SLIDE 1

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The Elliptic Curves Discrete Logarithm Problem and an implementation of parallelized Pollard’s ρ algorithm for ECDLP

Alberto Pizzirani

Università degli Studi di Napoli "Federico II"

slide-2
SLIDE 2

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Outline

1

What is an elliptic curve?

2

Elliptic Curves in Cryptography.

3

ECDLP resolution.

4

ρ-Pollard and CUDA.

slide-3
SLIDE 3

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Who wants to be a millionaire ?

In a similar way of what was done by RSA Security in the past, the society CERTICOM, in 1997, published ‘The Certicom Elliptic Curve Cryptography Challenge’. This is a list of instances of the discrete logarithm problem

  • n elliptic curves and the resolution of each problem is

awarded with a prize (ranging from a copy of the book The Handbook of Applied Cryptography and a copy of Maple V software to $100.000). The main reasons of this list are to enhance research on this topic and to test the security of the cryptographic systems based on elliptic curves.

slide-4
SLIDE 4

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Who wants to be a millionaire ?

In a similar way of what was done by RSA Security in the past, the society CERTICOM, in 1997, published ‘The Certicom Elliptic Curve Cryptography Challenge’. This is a list of instances of the discrete logarithm problem

  • n elliptic curves and the resolution of each problem is

awarded with a prize (ranging from a copy of the book The Handbook of Applied Cryptography and a copy of Maple V software to $100.000). The main reasons of this list are to enhance research on this topic and to test the security of the cryptographic systems based on elliptic curves.

slide-5
SLIDE 5

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Who wants to be a millionaire ?

In a similar way of what was done by RSA Security in the past, the society CERTICOM, in 1997, published ‘The Certicom Elliptic Curve Cryptography Challenge’. This is a list of instances of the discrete logarithm problem

  • n elliptic curves and the resolution of each problem is

awarded with a prize (ranging from a copy of the book The Handbook of Applied Cryptography and a copy of Maple V software to $100.000). The main reasons of this list are to enhance research on this topic and to test the security of the cryptographic systems based on elliptic curves.

slide-6
SLIDE 6

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic curves over reals.

y2 = x3 + Ax + B with x, y, A and B ∈ R without ‘singular’ points (cusps, knots)

slide-7
SLIDE 7

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic curves over reals.

y2 = x3 + Ax + B with x, y, A and B ∈ R without ‘singular’ points (cusps, knots)

slide-8
SLIDE 8

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic curves over reals.

y2 = x3 + Ax + B with x, y, A and B ∈ R without ‘singular’ points (cusps, knots)

slide-9
SLIDE 9

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic curves over reals.

y2 = x3 + Ax + B with x, y, A and B ∈ R without ‘singular’ points (cusps, knots)

slide-10
SLIDE 10

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The elliptic group.

Over the set E(R) := {(x, y) : y2 = x3 + Ax + B} ∪ {O∞} can be defined an addition + between points using the so-called ‘chord-tangent’ method. (E(R), +) is an abelian group, called elliptic group over R.

slide-11
SLIDE 11

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The elliptic group.

Over the set E(R) := {(x, y) : y2 = x3 + Ax + B} ∪ {O∞} can be defined an addition + between points using the so-called ‘chord-tangent’ method. (E(R), +) is an abelian group, called elliptic group over R.

slide-12
SLIDE 12

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The elliptic group.

Over the set E(R) := {(x, y) : y2 = x3 + Ax + B} ∪ {O∞} can be defined an addition + between points using the so-called ‘chord-tangent’ method. (E(R), +) is an abelian group, called elliptic group over R.

slide-13
SLIDE 13

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The elliptic group.

Over the set E(R) := {(x, y) : y2 = x3 + Ax + B} ∪ {O∞} can be defined an addition + between points using the so-called ‘chord-tangent’ method. (E(R), +) is an abelian group, called elliptic group over R.

slide-14
SLIDE 14

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Explicit formulas for points addition.

If P = (x1, y1),Q = (x2, y2) and R = (x3, y3), then:

P + Q = R: x3 =

  • y2−y1

x2−x1

2 − x1 − x2 , y3 = −y1 +

  • y2−y1

x2−x1

  • (x1 − x3)

2P = R: x3 =

  • 3x2

1 +A

2y1

2 − 2x1 , y3 = −y1 +

  • 3x2

1 +A

2y1

  • (x1 − x3)

These formulas, here defined for R, can be redefined through the operations of a field K (for example finite fields Fp with p > 3 prime). In these cases we still have an elliptic group (that can be denoted with E(Fp) over finite fields).

slide-15
SLIDE 15

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Explicit formulas for points addition.

If P = (x1, y1),Q = (x2, y2) and R = (x3, y3), then:

P + Q = R: x3 =

  • y2−y1

x2−x1

2 − x1 − x2 , y3 = −y1 +

  • y2−y1

x2−x1

  • (x1 − x3)

2P = R: x3 =

  • 3x2

1 +A

2y1

2 − 2x1 , y3 = −y1 +

  • 3x2

1 +A

2y1

  • (x1 − x3)

These formulas, here defined for R, can be redefined through the operations of a field K (for example finite fields Fp with p > 3 prime). In these cases we still have an elliptic group (that can be denoted with E(Fp) over finite fields).

slide-16
SLIDE 16

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Explicit formulas for points addition.

If P = (x1, y1),Q = (x2, y2) and R = (x3, y3), then:

P + Q = R: x3 =

  • y2−y1

x2−x1

2 − x1 − x2 , y3 = −y1 +

  • y2−y1

x2−x1

  • (x1 − x3)

2P = R: x3 =

  • 3x2

1 +A

2y1

2 − 2x1 , y3 = −y1 +

  • 3x2

1 +A

2y1

  • (x1 − x3)

These formulas, here defined for R, can be redefined through the operations of a field K (for example finite fields Fp with p > 3 prime). In these cases we still have an elliptic group (that can be denoted with E(Fp) over finite fields).

slide-17
SLIDE 17

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Explicit formulas for points addition.

If P = (x1, y1),Q = (x2, y2) and R = (x3, y3), then:

P + Q = R: x3 =

  • y2−y1

x2−x1

2 − x1 − x2 , y3 = −y1 +

  • y2−y1

x2−x1

  • (x1 − x3)

2P = R: x3 =

  • 3x2

1 +A

2y1

2 − 2x1 , y3 = −y1 +

  • 3x2

1 +A

2y1

  • (x1 − x3)

These formulas, here defined for R, can be redefined through the operations of a field K (for example finite fields Fp with p > 3 prime). In these cases we still have an elliptic group (that can be denoted with E(Fp) over finite fields).

slide-18
SLIDE 18

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic Curves over finite fields (1/3).

This is an example of the elliptic curve y2 = x3 + 4x + 20 over field F29:

slide-19
SLIDE 19

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic Curves over finite fields (1/3).

This is an example of the elliptic curve y2 = x3 + 4x + 20 over field F29:

slide-20
SLIDE 20

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic Curves over finite fields (2/3).

The line through P = (5, 22) and Q = (15, 27) is:

slide-21
SLIDE 21

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Elliptic Curves over finite fields (3/3).

The sum of P and Q is:

slide-22
SLIDE 22

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Success of the Elliptic Curves Cryptography.

In the middle of ’80s, Neal Koblitz and Victor Miller (independently) proposed elliptic curves defined on finite fields as a base for a cryptosystem. Three main reasons caused an increasing interest in elliptic curve cryptography:

Large amount of elliptic groups for each finite field (Hasse’s theorem and Deuring’s theorem). Subexponential time attacks for problems on which relie

  • ther cryptosystems (e.g. R.S.A.).

Fast arithmetic.

slide-23
SLIDE 23

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Success of the Elliptic Curves Cryptography.

In the middle of ’80s, Neal Koblitz and Victor Miller (independently) proposed elliptic curves defined on finite fields as a base for a cryptosystem. Three main reasons caused an increasing interest in elliptic curve cryptography:

Large amount of elliptic groups for each finite field (Hasse’s theorem and Deuring’s theorem). Subexponential time attacks for problems on which relie

  • ther cryptosystems (e.g. R.S.A.).

Fast arithmetic.

slide-24
SLIDE 24

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Success of the Elliptic Curves Cryptography.

In the middle of ’80s, Neal Koblitz and Victor Miller (independently) proposed elliptic curves defined on finite fields as a base for a cryptosystem. Three main reasons caused an increasing interest in elliptic curve cryptography:

Large amount of elliptic groups for each finite field (Hasse’s theorem and Deuring’s theorem). Subexponential time attacks for problems on which relie

  • ther cryptosystems (e.g. R.S.A.).

Fast arithmetic.

slide-25
SLIDE 25

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Success of the Elliptic Curves Cryptography.

In the middle of ’80s, Neal Koblitz and Victor Miller (independently) proposed elliptic curves defined on finite fields as a base for a cryptosystem. Three main reasons caused an increasing interest in elliptic curve cryptography:

Large amount of elliptic groups for each finite field (Hasse’s theorem and Deuring’s theorem). Subexponential time attacks for problems on which relie

  • ther cryptosystems (e.g. R.S.A.).

Fast arithmetic.

slide-26
SLIDE 26

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Success of the Elliptic Curves Cryptography.

In the middle of ’80s, Neal Koblitz and Victor Miller (independently) proposed elliptic curves defined on finite fields as a base for a cryptosystem. Three main reasons caused an increasing interest in elliptic curve cryptography:

Large amount of elliptic groups for each finite field (Hasse’s theorem and Deuring’s theorem). Subexponential time attacks for problems on which relie

  • ther cryptosystems (e.g. R.S.A.).

Fast arithmetic.

slide-27
SLIDE 27

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The discrete logarithm in elliptic groups.

The elliptic curve cryptosystems relie their security above all on the so-called Elliptic Curve Discrete Logarithm Problem: Given two points P and Q belonging to a curve E(K), find (if there’s one) the integer k such that Q = kP. Such k is called (discrete) logarithm of Q in base P. All the problems in the Certicom list are instances of ECDLP (Elliptic Curve Discrete Logarithm Problem).

slide-28
SLIDE 28

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The discrete logarithm in elliptic groups.

The elliptic curve cryptosystems relie their security above all on the so-called Elliptic Curve Discrete Logarithm Problem: Given two points P and Q belonging to a curve E(K), find (if there’s one) the integer k such that Q = kP. Such k is called (discrete) logarithm of Q in base P. All the problems in the Certicom list are instances of ECDLP (Elliptic Curve Discrete Logarithm Problem).

slide-29
SLIDE 29

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The discrete logarithm in elliptic groups.

The elliptic curve cryptosystems relie their security above all on the so-called Elliptic Curve Discrete Logarithm Problem: Given two points P and Q belonging to a curve E(K), find (if there’s one) the integer k such that Q = kP. Such k is called (discrete) logarithm of Q in base P. All the problems in the Certicom list are instances of ECDLP (Elliptic Curve Discrete Logarithm Problem).

slide-30
SLIDE 30

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Diffie-Hellman key exchange with elliptic curves.

slide-31
SLIDE 31

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Diffie-Hellman key exchange with elliptic curves.

slide-32
SLIDE 32

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Diffie-Hellman key exchange with elliptic curves.

slide-33
SLIDE 33

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Diffie-Hellman key exchange with elliptic curves.

slide-34
SLIDE 34

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Diffie-Hellman key exchange with elliptic curves.

slide-35
SLIDE 35

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-36
SLIDE 36

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-37
SLIDE 37

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-38
SLIDE 38

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-39
SLIDE 39

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-40
SLIDE 40

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-41
SLIDE 41

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-42
SLIDE 42

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-43
SLIDE 43

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-44
SLIDE 44

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-45
SLIDE 45

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-46
SLIDE 46

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-47
SLIDE 47

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-48
SLIDE 48

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-49
SLIDE 49

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-50
SLIDE 50

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-51
SLIDE 51

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-52
SLIDE 52

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Trivial method.

Given the curve y2 = x3 − 5x + 4 and points P = (−1.65, 2.79) and Q = (−0.35, 2.39), find the integer k such that Q = kP

slide-53
SLIDE 53

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (1/2)

All the problems of the Certicom list solved, until now, got a solution through ρ-Pollard method or some of its variants. This method iterates through the elements of the group until an element is discovered twice. The greek letter ρ in the name of the algorithm recalls the shape of the ‘walk’ of the iterations that closes over itself.

slide-54
SLIDE 54

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (1/2)

All the problems of the Certicom list solved, until now, got a solution through ρ-Pollard method or some of its variants. This method iterates through the elements of the group until an element is discovered twice. The greek letter ρ in the name of the algorithm recalls the shape of the ‘walk’ of the iterations that closes over itself.

slide-55
SLIDE 55

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (1/2)

All the problems of the Certicom list solved, until now, got a solution through ρ-Pollard method or some of its variants. This method iterates through the elements of the group until an element is discovered twice. The greek letter ρ in the name of the algorithm recalls the shape of the ‘walk’ of the iterations that closes over itself.

slide-56
SLIDE 56

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (2/2)

Given P, Q ∈ E(Fp), if we want to find the k such that Q = kP, the original version of ρ-Pollard works in this way: The group is partitioned into three disjoint subsets S1,S2 and S3 of about the same size. Two integers a0 and b0 are choosen randomly with 0 ≤ a0, b0 ≤ n − 1, where n is the cardinality of E(Fp). Starting with the point X0 = a0P + b0Q, a sequence of Xi is generated, defined for each i ≥ 1, according following relation: Xi =    P + Xi−1 if Xi−1 ∈ S1 2Xi−1 if Xi−1 ∈ S2 Q + Xi−1 if Xi−1 ∈ S3 If Xi = Xj for some i = j (collision), we can compute aiP + biQ = ajP + bjQ and then (ai − aj)P = (bj − bi)Q.

slide-57
SLIDE 57

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (2/2)

Given P, Q ∈ E(Fp), if we want to find the k such that Q = kP, the original version of ρ-Pollard works in this way: The group is partitioned into three disjoint subsets S1,S2 and S3 of about the same size. Two integers a0 and b0 are choosen randomly with 0 ≤ a0, b0 ≤ n − 1, where n is the cardinality of E(Fp). Starting with the point X0 = a0P + b0Q, a sequence of Xi is generated, defined for each i ≥ 1, according following relation: Xi =    P + Xi−1 if Xi−1 ∈ S1 2Xi−1 if Xi−1 ∈ S2 Q + Xi−1 if Xi−1 ∈ S3 If Xi = Xj for some i = j (collision), we can compute aiP + biQ = ajP + bjQ and then (ai − aj)P = (bj − bi)Q.

slide-58
SLIDE 58

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (2/2)

Given P, Q ∈ E(Fp), if we want to find the k such that Q = kP, the original version of ρ-Pollard works in this way: The group is partitioned into three disjoint subsets S1,S2 and S3 of about the same size. Two integers a0 and b0 are choosen randomly with 0 ≤ a0, b0 ≤ n − 1, where n is the cardinality of E(Fp). Starting with the point X0 = a0P + b0Q, a sequence of Xi is generated, defined for each i ≥ 1, according following relation: Xi =    P + Xi−1 if Xi−1 ∈ S1 2Xi−1 if Xi−1 ∈ S2 Q + Xi−1 if Xi−1 ∈ S3 If Xi = Xj for some i = j (collision), we can compute aiP + biQ = ajP + bjQ and then (ai − aj)P = (bj − bi)Q.

slide-59
SLIDE 59

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (2/2)

Given P, Q ∈ E(Fp), if we want to find the k such that Q = kP, the original version of ρ-Pollard works in this way: The group is partitioned into three disjoint subsets S1,S2 and S3 of about the same size. Two integers a0 and b0 are choosen randomly with 0 ≤ a0, b0 ≤ n − 1, where n is the cardinality of E(Fp). Starting with the point X0 = a0P + b0Q, a sequence of Xi is generated, defined for each i ≥ 1, according following relation: Xi =    P + Xi−1 if Xi−1 ∈ S1 2Xi−1 if Xi−1 ∈ S2 Q + Xi−1 if Xi−1 ∈ S3 If Xi = Xj for some i = j (collision), we can compute aiP + biQ = ajP + bjQ and then (ai − aj)P = (bj − bi)Q.

slide-60
SLIDE 60

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard (2/2)

Given P, Q ∈ E(Fp), if we want to find the k such that Q = kP, the original version of ρ-Pollard works in this way: The group is partitioned into three disjoint subsets S1,S2 and S3 of about the same size. Two integers a0 and b0 are choosen randomly with 0 ≤ a0, b0 ≤ n − 1, where n is the cardinality of E(Fp). Starting with the point X0 = a0P + b0Q, a sequence of Xi is generated, defined for each i ≥ 1, according following relation: Xi =    P + Xi−1 if Xi−1 ∈ S1 2Xi−1 if Xi−1 ∈ S2 Q + Xi−1 if Xi−1 ∈ S3 If Xi = Xj for some i = j (collision), we can compute aiP + biQ = ajP + bjQ and then (ai − aj)P = (bj − bi)Q.

slide-61
SLIDE 61

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

λ-Pollard

It has been shown that ρ-Pollard algorithm can be efficiently parallelized over an arbitrary number of processors, reserving

  • ne of them for collisions search. Such method is called

λ-Pollard where the greek letter λ recalls to mind the collision between two walks generated by two different processors.

slide-62
SLIDE 62

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving performances of Pollard’s algorithms.

How can we improve performances of Pollard’s algorithms ? Optimizing the iterating function. Using better all hardware resources available.

slide-63
SLIDE 63

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving performances of Pollard’s algorithms.

How can we improve performances of Pollard’s algorithms ? Optimizing the iterating function. Using better all hardware resources available.

slide-64
SLIDE 64

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving the iterating function.

The complexity of the Pollard’s algorithm is proportional to the square root of the order of the group where you want to solve the discrete logarithm problem. Such estimate is done under the hypotesis that the points generated through the method are generated randomly, so that they build a ‘random walk’ inside the group. Sadly, the original function proposed by Pollard has a behaviour that is really far from being random. It has been shown heuristically that increasing the number

  • f partition Si into which is split the group, cause a good

gain of performances.

slide-65
SLIDE 65

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving the iterating function.

The complexity of the Pollard’s algorithm is proportional to the square root of the order of the group where you want to solve the discrete logarithm problem. Such estimate is done under the hypotesis that the points generated through the method are generated randomly, so that they build a ‘random walk’ inside the group. Sadly, the original function proposed by Pollard has a behaviour that is really far from being random. It has been shown heuristically that increasing the number

  • f partition Si into which is split the group, cause a good

gain of performances.

slide-66
SLIDE 66

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving the iterating function.

The complexity of the Pollard’s algorithm is proportional to the square root of the order of the group where you want to solve the discrete logarithm problem. Such estimate is done under the hypotesis that the points generated through the method are generated randomly, so that they build a ‘random walk’ inside the group. Sadly, the original function proposed by Pollard has a behaviour that is really far from being random. It has been shown heuristically that increasing the number

  • f partition Si into which is split the group, cause a good

gain of performances.

slide-67
SLIDE 67

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Improving the iterating function.

The complexity of the Pollard’s algorithm is proportional to the square root of the order of the group where you want to solve the discrete logarithm problem. Such estimate is done under the hypotesis that the points generated through the method are generated randomly, so that they build a ‘random walk’ inside the group. Sadly, the original function proposed by Pollard has a behaviour that is really far from being random. It has been shown heuristically that increasing the number

  • f partition Si into which is split the group, cause a good

gain of performances.

slide-68
SLIDE 68

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

How to improve the use of the hardware ?

Taking advantage of computational power of other devices together with main cpu. Typical example: graphic processing unit of video cards in 3D graphics. Recently NVidia released some libraries that allow programmers to use video cards like general purpose processors.

slide-69
SLIDE 69

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

How to improve the use of the hardware ?

Taking advantage of computational power of other devices together with main cpu. Typical example: graphic processing unit of video cards in 3D graphics. Recently NVidia released some libraries that allow programmers to use video cards like general purpose processors.

slide-70
SLIDE 70

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

How to improve the use of the hardware ?

Taking advantage of computational power of other devices together with main cpu. Typical example: graphic processing unit of video cards in 3D graphics. Recently NVidia released some libraries that allow programmers to use video cards like general purpose processors.

slide-71
SLIDE 71

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA

Acronym of Compute Unified Device Architecture. Video card is viewed like a multiprocessor architecture (since, usually, there is a large number of ‘cores’ in the graphic processor). Library written in C language for device programming, but there are wrappers of third parts for other languages like Python, Fortran and Java.

slide-72
SLIDE 72

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA

Acronym of Compute Unified Device Architecture. Video card is viewed like a multiprocessor architecture (since, usually, there is a large number of ‘cores’ in the graphic processor). Library written in C language for device programming, but there are wrappers of third parts for other languages like Python, Fortran and Java.

slide-73
SLIDE 73

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA

Acronym of Compute Unified Device Architecture. Video card is viewed like a multiprocessor architecture (since, usually, there is a large number of ‘cores’ in the graphic processor). Library written in C language for device programming, but there are wrappers of third parts for other languages like Python, Fortran and Java.

slide-74
SLIDE 74

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Code execution in CUDA.

slide-75
SLIDE 75

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Code execution in CUDA.

slide-76
SLIDE 76

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Code execution in CUDA.

slide-77
SLIDE 77

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Code execution in CUDA.

slide-78
SLIDE 78

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Code execution in CUDA.

slide-79
SLIDE 79

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA limitations.

Arithmetic divisions are really computationally expensive and should be avoided. Memory should be carefully handled to avoid latencies when loading data from it and writing data to it. Since graphics processor is a SIMD (Single Instruction Multiple Data) architecture, every branch dependent from data in the code execution could cause the so called ‘divergent threads’, furtherly reducing the speed of the algorithm.

slide-80
SLIDE 80

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA limitations.

Arithmetic divisions are really computationally expensive and should be avoided. Memory should be carefully handled to avoid latencies when loading data from it and writing data to it. Since graphics processor is a SIMD (Single Instruction Multiple Data) architecture, every branch dependent from data in the code execution could cause the so called ‘divergent threads’, furtherly reducing the speed of the algorithm.

slide-81
SLIDE 81

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

CUDA limitations.

Arithmetic divisions are really computationally expensive and should be avoided. Memory should be carefully handled to avoid latencies when loading data from it and writing data to it. Since graphics processor is a SIMD (Single Instruction Multiple Data) architecture, every branch dependent from data in the code execution could cause the so called ‘divergent threads’, furtherly reducing the speed of the algorithm.

slide-82
SLIDE 82

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (1/7)

In a code for ECDLP resolution, of course we’re handling multi-words integers all of them belonging to the field Fp on which the elliptic curve is defined. Modular addition can be efficiently performed first adding two operands a and b. Then subtracting the modulus p to the sum previously computed. If this subtraction cause a positive result, then this is the sum reduced modulus p,

  • therwise the right sum modulus p is the one previously

computed. In a similar way can be done the modular subtraction.

slide-83
SLIDE 83

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (1/7)

In a code for ECDLP resolution, of course we’re handling multi-words integers all of them belonging to the field Fp on which the elliptic curve is defined. Modular addition can be efficiently performed first adding two operands a and b. Then subtracting the modulus p to the sum previously computed. If this subtraction cause a positive result, then this is the sum reduced modulus p,

  • therwise the right sum modulus p is the one previously

computed. In a similar way can be done the modular subtraction.

slide-84
SLIDE 84

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (1/7)

In a code for ECDLP resolution, of course we’re handling multi-words integers all of them belonging to the field Fp on which the elliptic curve is defined. Modular addition can be efficiently performed first adding two operands a and b. Then subtracting the modulus p to the sum previously computed. If this subtraction cause a positive result, then this is the sum reduced modulus p,

  • therwise the right sum modulus p is the one previously

computed. In a similar way can be done the modular subtraction.

slide-85
SLIDE 85

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (2/7)

Modular multiplication is realized through the so called Montgomery product. If p is the modulus, we call k the integer such that 2k−1 ≤ p < 2k and r is 2k. Given an integer a < p, we define Montgomery representation (or p-residue) with respect to r as a ≡ a · r( mod p) Sum and difference of the Mongomery representations of two integers is Montgomery representation of their sum or difference.

slide-86
SLIDE 86

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (2/7)

Modular multiplication is realized through the so called Montgomery product. If p is the modulus, we call k the integer such that 2k−1 ≤ p < 2k and r is 2k. Given an integer a < p, we define Montgomery representation (or p-residue) with respect to r as a ≡ a · r( mod p) Sum and difference of the Mongomery representations of two integers is Montgomery representation of their sum or difference.

slide-87
SLIDE 87

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (2/7)

Modular multiplication is realized through the so called Montgomery product. If p is the modulus, we call k the integer such that 2k−1 ≤ p < 2k and r is 2k. Given an integer a < p, we define Montgomery representation (or p-residue) with respect to r as a ≡ a · r( mod p) Sum and difference of the Mongomery representations of two integers is Montgomery representation of their sum or difference.

slide-88
SLIDE 88

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (3/7)

Given two numbers a, b in their Montgomery representations (a, b respectively) the Montgomery product is defined as: u ≡ a · b · r −1( mod p) where r −1 is the multiplicative inverse of r modulo p. The result of Montgomery product u is the p-residue of the product u = a · b( mod p) since u ≡ a · b · r −1( mod p) = (a · r) · (b · r) · r −1( mod p) = (a · b) · r( mod p).

slide-89
SLIDE 89

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (3/7)

Given two numbers a, b in their Montgomery representations (a, b respectively) the Montgomery product is defined as: u ≡ a · b · r −1( mod p) where r −1 is the multiplicative inverse of r modulo p. The result of Montgomery product u is the p-residue of the product u = a · b( mod p) since u ≡ a · b · r −1( mod p) = (a · r) · (b · r) · r −1( mod p) = (a · b) · r( mod p).

slide-90
SLIDE 90

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (4/7)

To describe Montgomery reduction algorithm, we need also the quantity p′, that satisfies the property r · r −1 − p · p′ = 1 Both integers r −1 and p′ can be easily computed through the extended Euclidean algorithm. And since in our algorithm the modulus is fixed, we can precompute these values and store them for all multiplications.

slide-91
SLIDE 91

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (5/7)

Given the integers a, b the Montgomery product is computed by this algorithm: MonPro(a, b)

1

t = a · b

2

m ≡ t · p′( mod r)

3

u = (t + m · r)/r

4

if u ≥ p then return u − p else return u .

The main feature of this product is that the operations involved are multiplications modulo r and division by r that can be efficiently implemented using bitwise operations since r is a power of 2.

slide-92
SLIDE 92

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (5/7)

Given the integers a, b the Montgomery product is computed by this algorithm: MonPro(a, b)

1

t = a · b

2

m ≡ t · p′( mod r)

3

u = (t + m · r)/r

4

if u ≥ p then return u − p else return u .

The main feature of this product is that the operations involved are multiplications modulo r and division by r that can be efficiently implemented using bitwise operations since r is a power of 2.

slide-93
SLIDE 93

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (6/7)

If p is odd, Montgomery product algorithm can be used to compute (normal) product u ≡ a · b( mod p): ModMul(a, b)

1

Compute p′ using extended Euclidean algorithm

2

a ≡ a · r( mod p)

3

b ≡ b · r( mod p)

4

u =MonPro(a, b)

5

u =MonPro(u, 1)

6

return u .

slide-94
SLIDE 94

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (7/7)

A better algorithm is obtained observing that MonPro(a, b)=(a · r) · b · r −1( mod p) = a · b( mod p) Thus we can modify the algorithm above: ModMul(a, b)

1

Compute p′ using extended Euclidean algorithm, and r 2( mod p)

2

a =MonPro(a, r 2)

3

u =MonPro(a, b)

slide-95
SLIDE 95

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Modular arithmetic with CUDA (7/7)

A better algorithm is obtained observing that MonPro(a, b)=(a · r) · b · r −1( mod p) = a · b( mod p) Thus we can modify the algorithm above: ModMul(a, b)

1

Compute p′ using extended Euclidean algorithm, and r 2( mod p)

2

a =MonPro(a, r 2)

3

u =MonPro(a, b)

slide-96
SLIDE 96

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard with CUDA

Further optimizations of the algorithm include:

Group has been split into 64 disjoint subsets (a ‘good’ value according to some recent heuristic results by E.Teske) Jacobian coordinate system to memorize points given in input to the iterating function of the Pollard’s method. Affine coordinate system to memorize points that are added to input points in the iterating function. These different coordinate systems allows the use of mixed affine-jacobian addition formulas that have better performances than pure affine addition formulas, while lower storage needing of affine coordinate allows to store thepoints of the iterating function in the memory region of the video card reserved to constants (a faster memory region in which all thread can access together without the introduction of any latency in the execution of code).

slide-97
SLIDE 97

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard with CUDA

Further optimizations of the algorithm include:

Group has been split into 64 disjoint subsets (a ‘good’ value according to some recent heuristic results by E.Teske) Jacobian coordinate system to memorize points given in input to the iterating function of the Pollard’s method. Affine coordinate system to memorize points that are added to input points in the iterating function. These different coordinate systems allows the use of mixed affine-jacobian addition formulas that have better performances than pure affine addition formulas, while lower storage needing of affine coordinate allows to store thepoints of the iterating function in the memory region of the video card reserved to constants (a faster memory region in which all thread can access together without the introduction of any latency in the execution of code).

slide-98
SLIDE 98

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard with CUDA

Further optimizations of the algorithm include:

Group has been split into 64 disjoint subsets (a ‘good’ value according to some recent heuristic results by E.Teske) Jacobian coordinate system to memorize points given in input to the iterating function of the Pollard’s method. Affine coordinate system to memorize points that are added to input points in the iterating function. These different coordinate systems allows the use of mixed affine-jacobian addition formulas that have better performances than pure affine addition formulas, while lower storage needing of affine coordinate allows to store thepoints of the iterating function in the memory region of the video card reserved to constants (a faster memory region in which all thread can access together without the introduction of any latency in the execution of code).

slide-99
SLIDE 99

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

ρ-Pollard with CUDA

Further optimizations of the algorithm include:

Group has been split into 64 disjoint subsets (a ‘good’ value according to some recent heuristic results by E.Teske) Jacobian coordinate system to memorize points given in input to the iterating function of the Pollard’s method. Affine coordinate system to memorize points that are added to input points in the iterating function. These different coordinate systems allows the use of mixed affine-jacobian addition formulas that have better performances than pure affine addition formulas, while lower storage needing of affine coordinate allows to store thepoints of the iterating function in the memory region of the video card reserved to constants (a faster memory region in which all thread can access together without the introduction of any latency in the execution of code).

slide-100
SLIDE 100

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Performances

Tabella: Performances (points generated per second) of various architectures over the curve ECCp − 97 of the Certicom list.

Architecture Points/second NVidia 8800GTS g92 720.000 Alpha 22164 440.000 Pentium II 300Mhz 125.000 Core 2 Duo E8500 10.000

slide-101
SLIDE 101

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Conclusions

Even if video cards CUDA enabled have some serious limitations, many problems, if carefully restated, can take advantage of their computational power. Actually a huge group of people (among them there are also Tanja Lange and Daniel J.Bernstein) is working on the problem of the CERTICOM list defined on the field F2130 and they are using not only common cpus, but also gpus that supports CUDA and PlayStation 3. This project can also be followed on Twitter at this address: http://twitter.com/ECCchallenge .

slide-102
SLIDE 102

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

Conclusions

Even if video cards CUDA enabled have some serious limitations, many problems, if carefully restated, can take advantage of their computational power. Actually a huge group of people (among them there are also Tanja Lange and Daniel J.Bernstein) is working on the problem of the CERTICOM list defined on the field F2130 and they are using not only common cpus, but also gpus that supports CUDA and PlayStation 3. This project can also be followed on Twitter at this address: http://twitter.com/ECCchallenge .

slide-103
SLIDE 103

What is an elliptic curve? Elliptic Curves in Cryptography. ECDLP resolution. ρ-Pollard and CUDA. Conclusions

The end.