Curve-Based Cryptography Nicolas Thriault - - PowerPoint PPT Presentation

curve based cryptography
SMART_READER_LITE
LIVE PREVIEW

Curve-Based Cryptography Nicolas Thriault - - PowerPoint PPT Presentation

Curve-Based Cryptography Nicolas Thriault nicolas.theriault@usach.cl Departamento de Matemtica y Ciencia de la Computacin Universidad de Santiago de Chile Discrete Log Problem Computational Diffie-Hellman Problem: Given g 1 , [ a ] g 1 ,


slide-1
SLIDE 1

Curve-Based Cryptography

Nicolas Thériault

nicolas.theriault@usach.cl

Departamento de Matemática y Ciencia de la Computación Universidad de Santiago de Chile

slide-2
SLIDE 2

Discrete Log Problem

Computational Diffie-Hellman Problem: Given g1, [a]g1, and [b]g1, compute [ab]g1. For a generic (additive) group G and for well chosen values of a et b, the fastest known method consists in solving the discrete log problem.

– p.1.

slide-3
SLIDE 3

Discrete Log Problem

Computational Diffie-Hellman Problem: Given g1, [a]g1, and [b]g1, compute [ab]g1. For a generic (additive) group G and for well chosen values of a et b, the fastest known method consists in solving the discrete log problem. Given two elements g1 and gλ of a group G such that gλ ∈ g1, the discrete logarithm problem for the pair (g1, gλ) in G consist in computing the smallest positive integer λ such that gλ = [λ]g1. The security of many public key cryptosystems relies on the difficulty of the discrete log.

– p.1.

slide-4
SLIDE 4

Generic Attacks

Three main types of attack: Shank’s Baby Step - Giant Step algorithm; Pollard’s ρ method; Pollard’s kangaroo method. They work for every abelian group. They require O

  • group order
  • group operations to solve the discrete log.

– p.2.

slide-5
SLIDE 5

Example: Pollard’s ρ

✁ ✕

✁ ✕ ✁ ✕

✟ ✯ ✒ ✟ ✯ ✒ ✟ ✯ ✒ ✁ ✕ ✁ ✕

✟ ✯ ✒ ✟ ✯ ✟ ✯✲✲✟ ✯✲❍ ❥ ❍ ❥ ❅ ❘ ❆ ❯ ❅ ❘ ❄ ✁ ☛

✟ ✙

✟ ✙ ✟ ✙ ✛ ✛ ❍ ❨ ✛ ✛ ❍ ❨ ❅ ■ ❍ ❨ ❅ ■

– p.3.

slide-6
SLIDE 6

Security

For cryptographic applications, we would like square root algorithms to be the best possible attacks.

– p.4.

slide-7
SLIDE 7

Security

For cryptographic applications, we would like square root algorithms to be the best possible attacks. For some groups, it’s false: The additive group Z/pZ (we can divide by g1). Groups that decompose into small subgroups.

– p.4.

slide-8
SLIDE 8

Security

For cryptographic applications, we would like square root algorithms to be the best possible attacks. For some groups, it’s false: The additive group Z/pZ (we can divide by g1). Groups that decompose into small subgroups. For others, it seems true (most of the time): Elliptic curves (of prime order). Hyperelliptic curves of genus 2 (of prime order).

– p.4.

slide-9
SLIDE 9

Security

For cryptographic applications, we would like square root algorithms to be the best possible attacks. For some groups, it’s false: The additive group Z/pZ (we can divide by g1). Groups that decompose into small subgroups. For others, it seems true (most of the time): Elliptic curves (of prime order). Hyperelliptic curves of genus 2 (of prime order). For others, it’s false, but not too much: Hyperelliptic curves of genus 3 and 4. Non-hyperelliptic curves of genus 4.

– p.4.

slide-10
SLIDE 10

Elliptic Curves

Curve: Has an equation of the form y2 = x3 + ax + b (Weierstrass form)

  • ver a field of q elements, q = pk.

such that 4a3 + 27b2 = 0 mod p (non-singular) Group: The (affine) rational points on the curve of the form (xi, yi) where y2

i = x3 i + axi + b

an extra point “at infinity”, P∞, which will be the zero/neutral of the group a group operation between pairs of points

– p.5.

slide-11
SLIDE 11

Point Addition for E(R)

y2 = x3 − x

– p.6.

slide-12
SLIDE 12

Point Addition for E(R)

y2 = x3 − x

P R

– p.6.

slide-13
SLIDE 13

Point Addition for E(R)

y2 = x3 − x

P R −P − R

– p.6.

slide-14
SLIDE 14

Point Addition for E(R)

y2 = x3 − x

P R −P − R P + R

– p.6.

slide-15
SLIDE 15

Group operation

Special cases: two distinct points on the same vertical add to P∞ if the y-coordinate is 0, the double of the point is P∞ adding P∞ to any point returns the same point General case, the chord-and-tangent method: (x1, y1) + (x2, y2) = (x3, y3) x3 = λ2 − x1 − x2, y3 = −y1 − λ(x3 − x1) λ is the slope of the line between the two initial points (of the tangent if both points are the same) λ = y1−y2

x1−x2 (general addition) or 3x2

1+a

2y1

(doubling)

– p.7.

slide-16
SLIDE 16

Varia

There are other ways to represent elliptic curves, which can give different group operations A popular representation is Edwards curves: x2 + y2 = 1 − dx2y2 Projective coordinates: represent points as triples (or more) of coordinates, to avoid field divisions maps: The complete (extended) group should include all points over the algebraic closure of the field Isomorphisms: to change the equation but keep the exact same group Isogenies: maps between curves with a finite kernel

– p.8.

slide-17
SLIDE 17

Hyperelliptic Curves

A hyperelliptic curve C of genus g is defined by an equation of the form: C : Y 2 + h(X)Y = f(X) with deg(h) ≤ g; deg(f) = 2g + 1; a tangent to the curve defined at every point. Elliptic curves are hyperelliptic curves of genus 1. In genus greater than 1, points do not form a group.

– p.9.

slide-18
SLIDE 18

HEC over R, genus 2

y2 = x5 − 5 x4 − 9 4 x3 + 101 4 x2 + 1 2 x − 6

– p.10.

slide-19
SLIDE 19

HEC over R, genus 2

y2 = x5 − 5 x4 − 9 4 x3 + 101 4 x2 + 1 2 x − 6

P R

– p.10.

slide-20
SLIDE 20

HEC over R, genus 2

y2 = x5 − 5 x4 − 9 4 x3 + 101 4 x2 + 1 2 x − 6

P R

– p.10.

slide-21
SLIDE 21

HEC over R, genus 2

y2 = x5 − 5 x4 − 9 4 x3 + 101 4 x2 + 1 2 x − 6

P R

? ? ?

– p.10.

slide-22
SLIDE 22

Divisor Class Group

Divisors (sums of points, including ∞) of degree zero ( coefficients = 0) form an infinite additive group. A principal divisor is the sum of the points of intersection between the curve and a polynomial in x and y. Principal divisors are a normal subgroup of the divisors of degree zero. The Jacobian is the group of divisor classes (i.e. divisors of degree zero modulo principal divisors). A reduced divisor is the sum of at most g points (−∞) and does not contain any pair of points (x, y), (x, −y − h(x)). The element of the Jacobian of C (the divisor classes) are represented by reduced divisors.

– p.11.

slide-23
SLIDE 23

Jacobian Addition

P1 P2 Q1 Q2

Going back to the genus 2 curve, with two divisors (P1 + P2 − 2∞) and (Q1 + Q2 − 2∞).

– p.12.

slide-24
SLIDE 24

Jacobian Addition

P1 P2 Q1 Q2

There exists a unique cubic which fits these four points.

– p.12.

slide-25
SLIDE 25

Jacobian Addition

P1 P2 Q1 Q2 −R1 −R2

The cubic intersects C in two more points.

– p.12.

slide-26
SLIDE 26

Jacobian Addition

P1 P2 Q1 Q2 −R1 −R2 R1 R2

We reflect these points with the x-axis and obtain: (P1 + P2 − 2∞) + (Q1 + Q2 − 2∞) = = R1 + R2 − 2∞

– p.12.

slide-27
SLIDE 27

Curve of Genus 4

P1 P2 P3 P4 Q1 Q2 Q3 Q4

– p.13.

slide-28
SLIDE 28

Curve of Genus 4

– p.13.

slide-29
SLIDE 29

Curve of Genus 4

– p.13.

slide-30
SLIDE 30

Curve of Genus 4

– p.13.

slide-31
SLIDE 31

Curve of Genus 4

– p.13.

slide-32
SLIDE 32

Curve of Genus 4

P1 P2 P3 P4 Q1 Q2 Q3 Q4 S1 S2 S3 S4

– p.13.

slide-33
SLIDE 33

Courbe de genre 3

y2 = x7 + 1

2x6 − 847 144x5 − 325 144x4

+ 1763

192 x3 + 403 144x2 − 1667 576 x + 35 96

– p.14.

slide-34
SLIDE 34

Courbe de genre 3

P1 P2 P3 Q1 Q2 Q3

On veut additionner les diviseurs D1 = P1 + P2 + P3 − 3∞ et D2 = Q1 + Q2 + Q3 − 3∞

– p.14.

slide-35
SLIDE 35

Courbe de genre 3

P1 P2 P3 Q1 Q2 Q3 −R1 −R2 −R3 −R4

La première réduction n’est pas suffisante (on attend pour la réflexion avec l’axe des x)

– p.14.

slide-36
SLIDE 36

Courbe de genre 3

P1 P2 P3 Q1 Q2 Q3 −R1 −R2 −R3 −R4 S1 S2 S3

On obtient: D1 + D2 = S1 + S2 + S3 − 3∞

– p.14.

slide-37
SLIDE 37

Ring of Polynomials

We consider at the ring of polynomials R = Fq[x, y] (y2 + h(x)y − f(x)) and we look at ideals of this ring. The ideal I = (p1(x, y), p2(x, y)) is the set of all polynomials of the form r1(x, y)p1(x, y) + r2(x, y)p2(x, y) mod y2 + h(x)y − f(x). p1 and p2 are the generators of I.

– p.15.

slide-38
SLIDE 38

Ideals

The ideals of R form an infinite multiplicative group. A principal ideal is an ideal with a single generator, for example (y − 3x2 + 8x − 4). The principal ideals of R are a normal subgroup of the ideals of R. The ideal class group is the group: ideals of R principal ideals of R This is a finite multiplicative group.

– p.16.

slide-39
SLIDE 39

Ideal Classes

Each class of ideals contains a unique reduced ideal of the form I = (u(x), y − v(x)) with deg(u) ≤ g, u monic and deg(v) < deg(u). (By construction, u(x) divides v(x)2 + h(x)v(x) − f(x).) For hyperelliptic curves, the ideal class group is isomorphic to the divisor class group (Jac(C)(Fq)). Working with the ideal class group is easier!!!

– p.17.

slide-40
SLIDE 40

Why HEC?

The group order of a curve of genus g over a field of q elements is: |Jac(C)(Fq)| = qg + O

  • gqg−1/2

, so to have the same group order as ECC, we divide the number of bits of the field order by g. Field multiplications are then ∼ g2 times faster (and use less energy). On the other hand, a group operation takes O (g2) field

  • perations.

At a first glance, the difference should be small.

– p.18.

slide-41
SLIDE 41

Composition

Input: ideals I1 = (u1(x), y − v1(x)) and I2 = (u2(x), y − v2(x)). Output: ideal IC = (uC(x), y − vC(x)) (not reduced).

– p.19.

slide-42
SLIDE 42

Composition

Input: ideals I1 = (u1(x), y − v1(x)) and I2 = (u2(x), y − v2(x)).

  • 1. d1 = s1u1 + s2u2 ← gcd(u1, u2).
  • 2. d = t1d1 + t2(v1 + v2 + h) ← gcd(d1, v1 + v2 + h2).
  • 3. r1 ← s1t1, r2 ← s2t1, and r3 ← t2.

Output: ideal IC = (uC(x), y − vC(x)) (not reduced).

– p.19.

slide-43
SLIDE 43

Composition

Input: ideals I1 = (u1(x), y − v1(x)) and I2 = (u2(x), y − v2(x)).

  • 1. d1 = s1u1 + s2u2 ← gcd(u1, u2).
  • 2. d = t1d1 + t2(v1 + v2 + h) ← gcd(d1, v1 + v2 + h2).
  • 3. r1 ← s1t1, r2 ← s2t1, and r3 ← t2.
  • 4. uC ← u1u2/d2.
  • 5. vC ← v2 + u2

d r2(v1 + v2) + r3 v2

2+hv2+f

d

. Output: ideal IC = (uC(x), y − vC(x)) (not reduced).

– p.19.

slide-44
SLIDE 44

Reduction

Input: ideal IC = (uC(x), y − vC(x)). Output: reduced ideal I3 = (u3(x), y − v3(x)).

– p.20.

slide-45
SLIDE 45

Reduction

Input: ideal IC = (uC(x), y − vC(x)).

  • 1. ˜

u0 ← uC, ˜ v0 ← vC. Output: reduced ideal I3 = (u3(x), y − v3(x)).

– p.20.

slide-46
SLIDE 46

Reduction

Input: ideal IC = (uC(x), y − vC(x)).

  • 1. ˜

u0 ← uC, ˜ v0 ← vC.

  • 2. From i = 0, while deg(˜

ui) > g: Output: reduced ideal I3 = (u3(x), y − v3(x)).

– p.20.

slide-47
SLIDE 47

Reduction

Input: ideal IC = (uC(x), y − vC(x)).

  • 1. ˜

u0 ← uC, ˜ v0 ← vC.

  • 2. From i = 0, while deg(˜

ui) > g: (a) ˜ ui+1 ← Monic

  • ˜

v2

i +h˜

vi+f ˜ ui

  • .

(b) ˜ vi+1 ← ˜ vi + h mod ˜ ui+1. (c) i ← i + 1. Output: reduced ideal I3 = (u3(x), y − v3(x)).

– p.20.

slide-48
SLIDE 48

Reduction

Input: ideal IC = (uC(x), y − vC(x)).

  • 1. ˜

u0 ← uC, ˜ v0 ← vC.

  • 2. From i = 0, while deg(˜

ui) > g: (a) ˜ ui+1 ← Monic

  • ˜

v2

i +h˜

vi+f ˜ ui

  • .

(b) ˜ vi+1 ← ˜ vi + h mod ˜ ui+1. (c) i ← i + 1.

  • 3. u3 ← ˜

ui, v3 ← ˜ vi. Output: reduced ideal I3 = (u3(x), y − v3(x)).

– p.20.

slide-49
SLIDE 49

Attacks for HEC

Weil descent attack: Frey (1998), Gaudry–Hess–Smart (2000), ... Gaudry (2004) Index calculus attack for large genus: Adleman–DeMarrais–Huang (1999) Enge-Gaudry-Thomé (2009) Index calculus attack for small genus: Gaudry (2000), Harley (2000), T. (2003) Gaudry–Thomé–T.–Diem (2007). Diem (2006): non-hyperelliptic curves

– p.21.

slide-50
SLIDE 50

Curves and security

Use isomorphisms to choose a form of the curve equation that reduces the cost of the group operation Assume the fastest known attack The secret key size (scalar) depends only on the security level, not the group order genus 1 2 3 4 fields size (bits) n n/2 3n/8 n/3 group size (bits) n n 9n/8 4n/3 key size (bits) n n n n

– p.22.

slide-51
SLIDE 51

Improving the formulæ

  • 1. Work based on the coefficients instead of polynomials

(explicit formulæ)

  • 2. Combine inversions
  • 3. Reduce the number of multiplications

(a) Faster algorithms (b) Karatsuba-like tricks

– p.23.