28
P vs. NP, AKS, RSA: The Acronyms of Mathematics Awareness Month Emily List Wittenberg University [email protected]

April 2006: Mathematics Awareness Month “Mathematics and Internet Security”

  • Upload
    elvina

  • View
    39

  • Download
    4

Embed Size (px)

DESCRIPTION

P vs. NP, AKS, RSA: The Acronyms of Mathematics Awareness Month Emily List Wittenberg University [email protected]. April 2006: Mathematics Awareness Month “Mathematics and Internet Security”. Definitions. - PowerPoint PPT Presentation

Citation preview

Page 1: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

P vs. NP, AKS, RSA: The Acronyms of Mathematics

Awareness Month

Emily ListWittenberg University

[email protected]

Page 2: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

April 2006: Mathematics Awareness

Month“Mathematics and Internet Security”

Page 3: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Definitions

P: yes or no decision problems that can be solved by an algorithm that runs in polynomial time.

nx

Polynomial time: the number of steps needed to solve a problem can be expressed as a function .

Where x is the size of the input and n is a constant.

Page 4: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

What’s so great about polynomial time?

Running time of algorithm t(n)

Maximum size solvable in 1 second

n N0=100 million

100 N0 1000 N0

100n N1=1 million 100 N1 1000 N1

n2 N2=10,000 10 N2 31.6 N2

n3 N3=464 4.64 N3 10 N3

2n N4=26 N4+6.64 N4+9.97

Current computer

100 times faster

1000 times faster

Ramachandran, Vijaya. P versus NP

Page 5: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

NP: a problem that can be verified using an algorithm that runs in polynomial time

IMPORTANT: This does not mean “not polynomial time”

Definitions Continued

Page 6: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

What would a solution to P = NP? look like?

or

PNP

P

NP

Page 7: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Why is P vs NP important?

Clay Mathematics Institute: $1,000,000 prize

Internet security implicationsPublic Key Encryption

•Whitfield Diffie and Martin Hellman, 1976

RSA public-key cryptosystem• Ronald Rivest, Adi Shamir, and

Leonard Aldeman, 1977

Page 8: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

RSA Encryption

Uses a function that is NP but not known to be P to encrypt information.

)(mod11 pa p

Fermat’s Little Theorem: Let a and p be integers such that p is prime and gcd(a, p) =1, then

Page 9: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Theorem: If m is an integer, n = pq, p and q are primes, and

ef 1 mod ((p-1)(q-1)), then (me)f (mod n) m.

Proof.

Page 10: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Theorem: If m is an integer, n = pq, p and q are primes, and

ef 1 mod ((p-1)(q-1)), then (me)f (mod n) m.

Proof.

ef = (p-1)(q-1)k + 1

By substitution, (me)f = m(p-1)(q-1)k+1 = m(p-1)(q-1)km.

Page 11: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Theorem: If m is an integer, n = pq, p and q are primes, and

ef 1 mod ((p-1)(q-1)), then (me)f (mod n) m.

Proof.

ef = (p-1)(q-1)k + 1

By substitution, (me)f = m(p-1)(q-1)k+1 = m(p-1)(q-1)km.

Then by Fermat’s little theorem: (m(p-1))(q-1)k 1

(me)f m(p-1)(q-1)km m (mod p)

Page 12: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Theorem: If m is an integer, n = pq, p and q are primes, and

ef 1 mod ((p-1)(q-1)), then (me)f (mod n) m.

Proof.

ef = (p-1)(q-1)k + 1

By substitution, (me)f = m(p-1)(q-1)k+1 = m(p-1)(q-1)km.

Then by Fermat’s little theorem: (m(p-1))(q-1)k 1

(me)f m(p-1)(q-1)km m (mod p)

Similarly, (me)f m(p-1)(q-1)km m (mod q).

Page 13: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Theorem: If m is an integer, n = pq, p and q are primes, and

ef 1 mod ((p-1)(q-1)), then (me)f (mod n) m.

Proof.

ef = (p-1)(q-1)k + 1

By substitution, (me)f = m(p-1)(q-1)k+1 = m(p-1)(q-1)km.

Then by Fermat’s little theorem: (m(p-1))(q-1)k 1

(me)f m(p-1)(q-1)km m (mod p)

Similarly, (me)f m(p-1)(q-1)km m (mod q).

Therefore, by the Chinese Remainder Theorem we have (me)f (mod n) m.

Page 14: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

RSA ExampleNecessary Information Where is comes from What it is for this

example

p,q prime p=67

q=89

n pq 5963

Φ(n) Number of integers less than n that are relatively prime to n .

(p-1)(q-1)

5808

e,f e,f >1 such that e = 37

f = 157ef n 1(m o d ( ))

We want to encrypt the number 17:

xe(mod n) 1716(mod 5963) 5064To decrypt:5064f (mod 5963) 5064157 17

Page 15: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Why is RSA secure?

It’s nearly impossible to find f without the factors of n.

Since we do not have an algorithm that runs in polynomial time to find factorizations, finding the factors n is nearly impossible.

Page 16: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Is this number prime, if so what are it’s factors?

203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123

Page 17: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

1 2 3 4 5 6 7 8 910

11 12 13 14 15 16 17 18 1920

21 22 23 24 25 26 27 28 2930

31 32 33 34 35 36 37 38 3940

41 42 43 44 45 46 47 48 4950

51 52 53 54 55 56 57 58 5960

61 62 63 64 65 66 67 68 6970

71 72 73 74 75 76 77 78 7980

81 82 83 84 85 86 87 88 8990

91 92 93 94 95 96 97 98 99 100

Sieve of Eratosthenes

Page 18: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

1 2 3 4 5 6 7 8 910

11 12 13 14 15 16 17 18 1920

21 22 23 24 25 26 27 28 2930

31 32 33 34 35 36 37 38 3940

41 42 43 44 45 46 47 48 4950

51 52 53 54 55 56 57 58 5960

61 62 63 64 65 66 67 68 6970

71 72 73 74 75 76 77 78 7980

81 82 83 84 85 86 87 88 8990

91 92 93 94 95 96 97 98 99 100

Sieve of Eratosthenes

Page 19: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

1 2 3 4 5 6 7 8 910

11 12 13 14 15 16 17 18 1920

21 22 23 24 25 26 27 28 2930

31 32 33 34 35 36 37 38 3940

41 42 43 44 45 46 47 48 4950

51 52 53 54 55 56 57 58 5960

61 62 63 64 65 66 67 68 6970

71 72 73 74 75 76 77 78 7980

81 82 83 84 85 86 87 88 8990

91 92 93 94 95 96 97 98 99 100

Sieve of Eratosthenes

Page 20: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

1 2 3 4 5 6 7 8 910

11 12 13 14 15 16 17 18 1920

21 22 23 24 25 26 27 28 2930

31 32 33 34 35 36 37 38 3940

41 42 43 44 45 46 47 48 4950

51 52 53 54 55 56 57 58 5960

61 62 63 64 65 66 67 68 6970

71 72 73 74 75 76 77 78 7980

81 82 83 84 85 86 87 88 8990

91 92 93 94 95 96 97 98 99 100

Sieve of Eratosthenes

Page 21: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Does the Sieve of Eratosthenes run in polynomial time?

NO.

Why not?For a number with N digits, the number of steps the sieve needs is [10N]1/2 which is exponential.

Page 22: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

“Primes” is in P

• In 2002, Manindra Agrawal, Neeraj Kayal and Nitin Saxena came up with an algorithm that runs in polynomial and give the primality of a number.

“This algorithm is beautiful” Carl Pomerance

“The proof is simple, elegant and beautiful” R. Balasubramanian

Page 23: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

AKS Algorithm

From “PRIMES is in P”

Page 24: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Explanation of AKS

i

n

Lemma 2.1 Let a be an integer, n is a natural number, n > 2 and gcd(a,n)=1. Then n is prime iff (X+ a)n Xn +a(mod n).

Proof.

By the binomial theorem: the coefficient of xi in ((X+a)n –(Xn +a) is an-i .

Page 25: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Explanation of AKS

i

n

Lemma 2.1 Let a be an integer, n is a natural number, n > 2 and gcd(a,n)=1. Then n is prime iff (X+ a)n Xn +a(mod n).

Proof.

By the binomial theorem: the coefficient of xi in ((X+a)n –(Xn +a) is an-i .

Suppose n is prime. Then 0 (mod n) and hence all of the coefficients are zero.

i

n

Page 26: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Explanation of AKS

i

n

Lemma 2.1 Let a be an integer, n is a natural number, n > 2 and gcd(a,n)=1. Then n is prime iff (X+ a)n Xn +a(mod n).

Proof.

By the binomial theorem: the coefficient of xi in ((X+a)n –(Xn +a) is an-i .

Suppose n is prime. Then 0 (mod n) and hence all of the coefficients are zero.

Suppose n is composite. Consider a prime q that is a factor of n and let qk divide n, but qk+1 does not.

Then qk does not divide and gcd( an-q, qk) =1Hence, the coefficient of Xq is not zero (mod n).

Therefore (X+a)n Xn +a (mod n).

q

n

i

n

Page 27: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Does AKS ruin RSA?

NO!!

Why not?AKS does not factor a number, it only tells us if it is prime or not. RSA is secure as long as we don’t have an algorithm that can factor in polynomial time.

Page 28: April 2006:  Mathematics Awareness Month “Mathematics and Internet Security”

Acknowledgements

Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. PRIMES is in P. (http://www.cse.iitk.ac.in/news/primality_v3.ps), Februaruy 2003.

P vs NP Problem. Clay Mathematics Institute, (http://www.claymath.org/millennium/P_vs_NP/)

Ramachandran, Vijaya. P versus NP. University of Texas Lectures on the Millennium Prize Problems, May 2001. (http://www.claymath.org/video/)

Stewart, Ian. Ian Stewart on Minesweeper. Clay Mathematics Institute, (http://www.claymath.org/Popular_Lectures/Minesweeper)

Kaliski, Burt. The Mathematics of the RSA Public-Key Cryptosystem. RSA Laboratories.

Polynomial time. Wikipedia, (http://en.wikipedia.org/wiki/Polynomial _time)