47
Cannonballs, Triangles, and Secrets An introduction to elliptic curve cryptography Larry Washington, University of Maryland The Mathematical Association of America Maryland-District of Columbia-Virginia Section

Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Cannonballs, Triangles, and Secrets

An introduction to

elliptic curve cryptography

Larry Washington, University of Maryland

The Mathematical Association of AmericaMaryland-District of Columbia-Virginia Section

Page 2: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

A Pile of Cannonballs A Square of Cannonballs

Page 3: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

1

4

9

.

.

.

Page 4: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

1 + 4 + 9 + . . . + x2

= x (x + 1) (2x + 1)/6

x=3:1 + 4 + 9 = 3(4)(7)/6 = 14

The number of cannonballs in x layers is

Page 5: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

y2 = 1 + 4 + 9 + . . . + x2

y2 = x (x + 1) (2x + 1)/6

If x layers of the pyramidyield a y by y square,we need

Page 6: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

y2 = x (x + 1) (2x + 1)/6

Page 7: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 8: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

y2 = x (x + 1) (2x + 1)/6 and y = x

Page 9: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 10: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 11: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 12: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

1 + 4 + 9 + . . . + 242 = 702

Page 13: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Is there a right triangle with rational sides whose area is 5 ?

c b

a

a2 + b2 = c2

ab/2 = 5

If we have a, b, c, let x = c2

Therefore, x3 – 25x = x(x-5)(x+5) is a square.

Then x – 5 = (c2 – 2ab) = (a2 + b2 -2ab) = (a-b)2

14

14

14

14

14

Similarly, x + 5 = (a+b)2

Page 14: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

We need points on the curve y2 = x3 – 25x with rational coordinates.

(x, y) = (-4, 6) is a point on the curve. Draw the tangent line at this point.

The intersection point has x = 1681/144 = (41/12)2

Page 15: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

41/6 3/2

20/3

Area = 5

Page 16: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

We can use the tangent line at this new point and find another triangle:

x = (3344161/1494696)2 , y = a big fraction

Page 17: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

3344161/747348 4920/1519

1519/492

We could produce many more . . . But soon the whole page would not belarge enough to contain the numbers.

Page 18: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

An elliptic curve is the graph of an equationy2 = cubic polynomial in x

For example, y2 = x3 – 5x + 12

Page 19: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Start with P1. We get P2.

Page 20: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Using P1 and P2, we get P3.

Page 21: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Using P1 and P3, we get P4.

Page 22: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

We get points P1, P2, P3, . . . , Pn , . . .

Useful facts:

If we take the line through Pm and Pn and reflect the third point of intersection across the y-axis, we get Pn+m

If we start with P1 , after m steps we get Pm

If we start with Pm , after n steps we get Pmn

Page 23: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Given n , it is easy to compute Pn

(even when n is a 1000-digit number)

Given Pn , it is very difficult to figureout the value of n .

All of these calculations are done mod a big prime.Otherwise, the computer overflows.

Page 24: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Is this good for anything?

Page 25: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

There is no branch of mathematics, however abstract, which may not someday be applied to the phenomena of the real world.

—Nikolai Lobachevsky (1792-1856)

Page 26: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 27: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

“Do you know the secret?”

Page 28: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

The Eavesdropper

Page 29: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

The secret is a 200-digit integer s.Prove to me that you know the secret.

I send you a random point P1.

You compute PS and send it back to me.

If your answer is correct, I decide that you know the secret.

Page 30: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Diffie – Hellman Key Establishment

Alice and Bob want to agree on a key for use in a cryptosystem.

1. They choose an elliptic curve and a point P1 on the curve.

2. Alice chooses a secret integer a and Bob chooses a secret integer b.

3. Alice computes Pa and Bob computes Pb. They exchange Pa and Pb.

4. Alice does a steps starting with Pb and computes Pba , and Bob computes Pab

5. They use the coordinates of Pab to construct the desired key.

Page 31: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 32: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 33: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer
Page 34: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Lived from ?? to ??

Probably about 1800 years ago.

Page 35: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Diophantus passed one sixth of his life in childhood, one twelfth in youth, and one seventh as a bachelor. Five years after his marriage was born a son who died four years before his father, at half his father’s age.

How many years did Diophantus live?

Page 36: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Diophantus passed one sixth of his life in childhood, one twelfth in youth, and one seventh as a bachelor. Five years after his marriage was born a son who died four years before his father, at half his father’s age.

How many years did Diophantus live?

Page 37: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

To divide a given number into two having given difference.

Given number 100,Given difference 40.

Lesser number is x. Larger is x + 40.Therefore

2x+40 = 100x = 30

The required numbers are 70, 30.

Page 38: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

KYb DYgisMd

2x3 – 3x2 = 4

saisMb

x = 2

Page 39: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

ib fib Sxle

iz a

17 1 3512 512 x

Page 40: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

DYie MlV en moriw DYDaMlV DYib

(15 x2 – 36)/(x4 + 36 – 12 x2)

Page 41: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

+, - 1489= 1557x 1620

. 1600> 1600a2, a3, a4, … 1634aa, a3, a4, … 1637 (Descartes)

Page 42: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Diophantus’s goal: Given a solution of an equation,find another solution.

Given a point on a curve, find another point.

Page 43: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Using P1 and P3, we get P4.

Page 44: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Problem: Find rational x and y such that x2 + y2 =1.

We know the easy solution x=1, y=0.

The second point of intersection gives a new point, in this case x= 3/5, y=4/5.

Draw the line through this point with slope, say, -2.

Page 45: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

What happens if we try higher degree curves?

y2 = x5 – 7x3 + 6x +17

Page 46: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer

Faltings’s Theorem (1983):

A higher degree curve (technically: genus > 1)has only a finite number of points with rational coordinates.

Page 47: Cannonballs, Triangles, and Secretssections.maa.org/mddcva/MeetingFiles/Fall2014... · Cannonballs, Triangles, and Secrets An introduction to ... The secret is a 200-digit integer