34
Better bounds on the rate of non-witnesses of Lucas pseudoprimes David Amirault Mentor David Corwin PRIMES conference May 16, 2015 David Amirault Lucas pseudoprimes May 16, 2015 1 / 14

Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better bounds on the rate of non-witnesses of Lucaspseudoprimes

David AmiraultMentor David CorwinPRIMES conference

May 16, 2015

David Amirault Lucas pseudoprimes May 16, 2015 1 / 14

Page 2: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Starting Small

Theorem (Fermat’s Little Theorem)

Let a be an integer and n prime with n - a. Then

an−1 ≡ 1 (mod n).

Theorem (Miller-Rabin)

Write n − 1 = 2kq with q odd. One of the following is true:

aq ≡ 1 (mod n),

or for some m with 0 ≤ m < k ,

a2mq ≡ −1 (mod n).

David Amirault Lucas pseudoprimes May 16, 2015 2 / 14

Page 3: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Starting Small

Theorem (Fermat’s Little Theorem)

Let a be an integer and n prime with n - a. Then

an−1 ≡ 1 (mod n).

Theorem (Miller-Rabin)

Write n − 1 = 2kq with q odd. One of the following is true:

aq ≡ 1 (mod n),

or for some m with 0 ≤ m < k ,

a2mq ≡ −1 (mod n).

David Amirault Lucas pseudoprimes May 16, 2015 2 / 14

Page 4: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Starting Small

Running a Test

Put 1517− 1 = 22 · 379. Try a = 2:

a20·379 ≡ 2379 ≡ 923 6≡ ±1 (mod 1517).

a21·379 ≡ 2758 ≡ 892 6≡ −1 (mod 1517).

Thus, 1517 is not prime (1517 = 37 · 41).

David Amirault Lucas pseudoprimes May 16, 2015 3 / 14

Page 5: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Starting Small

Running a Test

Put 1517− 1 = 22 · 379. Try a = 2:

a20·379 ≡ 2379 ≡ 923 6≡ ±1 (mod 1517).

a21·379 ≡ 2758 ≡ 892 6≡ −1 (mod 1517).

Thus, 1517 is not prime (1517 = 37 · 41).

David Amirault Lucas pseudoprimes May 16, 2015 3 / 14

Page 6: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Starting Small

Running a Test

Put 1517− 1 = 22 · 379. Try a = 2:

a20·379 ≡ 2379 ≡ 923 6≡ ±1 (mod 1517).

a21·379 ≡ 2758 ≡ 892 6≡ −1 (mod 1517).

Thus, 1517 is not prime (1517 = 37 · 41).

David Amirault Lucas pseudoprimes May 16, 2015 3 / 14

Page 7: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Generalizing Integers

Definition

A quadratic integer is a solution to an equation of the form

x2 − Px + Q = 0

with P,Q integers.

Theorem

Let D = P2 − 4Q. The set of all quadratic integers in the field Q[√

D]

form a ring, denoted by OQ[√D].

David Amirault Lucas pseudoprimes May 16, 2015 4 / 14

Page 8: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Generalizing Integers

Definition

A quadratic integer is a solution to an equation of the form

x2 − Px + Q = 0

with P,Q integers.

Theorem

Let D = P2 − 4Q. The set of all quadratic integers in the field Q[√

D]

form a ring, denoted by OQ[√D].

David Amirault Lucas pseudoprimes May 16, 2015 4 / 14

Page 9: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Generalizing Integers

Quadratic Integer Rings

D = −4. The ring of quadratic integers OQ[√−4] is the Gaussian

integers, Z[√−1]. Notice ±i satisfy x2 + 1 = 0, for which

P2 − 4Q = −4.

D = −5. Here, OQ[√−5]∼= Z

[√−5].

D = 5. In this real case, OQ[√5]∼= Z

[1+√5

2

].

David Amirault Lucas pseudoprimes May 16, 2015 5 / 14

Page 10: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Generalizing Integers

Quadratic Integer Rings

D = −4. The ring of quadratic integers OQ[√−4] is the Gaussian

integers, Z[√−1]. Notice ±i satisfy x2 + 1 = 0, for which

P2 − 4Q = −4.

D = −5. Here, OQ[√−5]∼= Z

[√−5].

D = 5. In this real case, OQ[√5]∼= Z

[1+√5

2

].

David Amirault Lucas pseudoprimes May 16, 2015 5 / 14

Page 11: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Generalizing Integers

Quadratic Integer Rings

D = −4. The ring of quadratic integers OQ[√−4] is the Gaussian

integers, Z[√−1]. Notice ±i satisfy x2 + 1 = 0, for which

P2 − 4Q = −4.

D = −5. Here, OQ[√−5]∼= Z

[√−5].

D = 5. In this real case, OQ[√5]∼= Z

[1+√5

2

].

David Amirault Lucas pseudoprimes May 16, 2015 5 / 14

Page 12: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Lucas Primality Test

Theorem

Let P,Q be integers such that D = P2 − 4Q 6= 0. Let τ be the quotient ofthe two roots of x2 − Px + Q. For n an odd prime not dividing QD, putn − (D/n) = 2kq with q odd. One of the following is true:

τq ≡ 1 (mod n),

or for some m with 0 ≤ m < k ,

τ2mq ≡ −1 (mod n).

David Amirault Lucas pseudoprimes May 16, 2015 6 / 14

Page 13: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Lucas Primality Test

Definition

If n is a composite integer for which τq ≡ 1 (mod n) or τ2mq ≡ −1 (mod n)

with 0 ≤ m < k, then we call n a strong Lucas pseudoprime, or slpsp, withrespect to P and Q.

Theorem (Arnault)

Define

SL(D, n) = #

{(P,Q)

∣∣∣∣ 0 ≤ P,Q < n, P2 − 4Q ≡ D (mod n),gcd(QD, n) = 1, n is slpsp(P,Q)

}SL(D, n) ≤ 4

15n unless n = 9 or n is of the form (2k1q1 − 1)(2k1q1 + 1), aproduct of twin primes with q1 odd.

David Amirault Lucas pseudoprimes May 16, 2015 7 / 14

Page 14: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Lucas Primality Test

Definition

If n is a composite integer for which τq ≡ 1 (mod n) or τ2mq ≡ −1 (mod n)

with 0 ≤ m < k, then we call n a strong Lucas pseudoprime, or slpsp, withrespect to P and Q.

Theorem (Arnault)

Define

SL(D, n) = #

{(P,Q)

∣∣∣∣ 0 ≤ P,Q < n, P2 − 4Q ≡ D (mod n),gcd(QD, n) = 1, n is slpsp(P,Q)

}SL(D, n) ≤ 4

15n unless n = 9 or n is of the form (2k1q1 − 1)(2k1q1 + 1), aproduct of twin primes with q1 odd.

David Amirault Lucas pseudoprimes May 16, 2015 7 / 14

Page 15: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Theorem

SL(D, n) ≤ 16n unless one of the following is true:

n = 9 or n = 25,

n = (2k1q1 − 1)(2k1q1 + 1),

n = (2k1q1 + ε1)(2k1+1q1 + ε2),

n = (2k1q1 + ε1)(2k1q2 + ε2)(2k1q3 + ε3), q1, q2, q3|q,where εi is determined by the Jacobi symbol (D/pi ) such that pi is aprime factor of n.

David Amirault Lucas pseudoprimes May 16, 2015 8 / 14

Page 16: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Theorem

SL(D, n) ≤ 16n unless one of the following is true:

n = 9 or n = 25,

n = (2k1q1 − 1)(2k1q1 + 1),

n = (2k1q1 + ε1)(2k1+1q1 + ε2),

n = (2k1q1 + ε1)(2k1q2 + ε2)(2k1q3 + ε3), q1, q2, q3|q,

where εi is determined by the Jacobi symbol (D/pi ) such that pi is aprime factor of n.

David Amirault Lucas pseudoprimes May 16, 2015 8 / 14

Page 17: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Theorem

SL(D, n) ≤ 16n unless one of the following is true:

n = 9 or n = 25,

n = (2k1q1 − 1)(2k1q1 + 1),

n = (2k1q1 + ε1)(2k1+1q1 + ε2),

n = (2k1q1 + ε1)(2k1q2 + ε2)(2k1q3 + ε3), q1, q2, q3|q,where εi is determined by the Jacobi symbol (D/pi ) such that pi is aprime factor of n.

David Amirault Lucas pseudoprimes May 16, 2015 8 / 14

Page 18: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Suppose we wish to determine that n is prime to a probability of1− 2−128.

log4/15(2−128) ≈ 67.

log1/6(2−128) ≈ 50.

17 fewer trials are required using the improved bound.

David Amirault Lucas pseudoprimes May 16, 2015 9 / 14

Page 19: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Suppose we wish to determine that n is prime to a probability of1− 2−128.

log4/15(2−128) ≈ 67.

log1/6(2−128) ≈ 50.

17 fewer trials are required using the improved bound.

David Amirault Lucas pseudoprimes May 16, 2015 9 / 14

Page 20: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Better Bounds

Suppose we wish to determine that n is prime to a probability of1− 2−128.

log4/15(2−128) ≈ 67.

log1/6(2−128) ≈ 50.

17 fewer trials are required using the improved bound.

David Amirault Lucas pseudoprimes May 16, 2015 9 / 14

Page 21: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Quiz!√

961 =

31.

Let x0 be a guess of a root of the function f . A sequence of betterapproximations xn is defined by

xn+1 = xn − f (xn)f ′(xn)

.

Skip Example

David Amirault Lucas pseudoprimes May 16, 2015 10 / 14

Page 22: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Quiz!√

961 = 31.

Let x0 be a guess of a root of the function f . A sequence of betterapproximations xn is defined by

xn+1 = xn − f (xn)f ′(xn)

.

Skip Example

David Amirault Lucas pseudoprimes May 16, 2015 10 / 14

Page 23: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Quiz!√

961 = 31.

Let x0 be a guess of a root of the function f . A sequence of betterapproximations xn is defined by

xn+1 = xn − f (xn)f ′(xn)

.

Skip Example

David Amirault Lucas pseudoprimes May 16, 2015 10 / 14

Page 24: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Newton’s Method

Consider the case n = (2k1q1 − 1)(2k1q1 + 1). Does 2627 factor in thisform?

Write x = 2k1q1, so 2627 = (x − 1)(x + 1) = x2 − 1 and x2 − 2628 = 0.

x0 = 40.

x1 = 40− 402−26282·40 = 52.85.

x2 = x1 −x21−2628

2x1= 51.28782.

x3 = x2 −x22−2628

2x2= 51.26403.

√2628 = 51.26402.

David Amirault Lucas pseudoprimes May 16, 2015 11 / 14

Page 25: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Newton’s Method

Consider the case n = (2k1q1 − 1)(2k1q1 + 1). Does 2627 factor in thisform?Write x = 2k1q1, so 2627 = (x − 1)(x + 1) = x2 − 1 and x2 − 2628 = 0.

x0 = 40.

x1 = 40− 402−26282·40 = 52.85.

x2 = x1 −x21−2628

2x1= 51.28782.

x3 = x2 −x22−2628

2x2= 51.26403.

√2628 = 51.26402.

David Amirault Lucas pseudoprimes May 16, 2015 11 / 14

Page 26: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Newton’s Method

Consider the case n = (2k1q1 − 1)(2k1q1 + 1). Does 2627 factor in thisform?Write x = 2k1q1, so 2627 = (x − 1)(x + 1) = x2 − 1 and x2 − 2628 = 0.

x0 = 40.

x1 = 40− 402−26282·40 = 52.85.

x2 = x1 −x21−2628

2x1= 51.28782.

x3 = x2 −x22−2628

2x2= 51.26403.

√2628 = 51.26402.

David Amirault Lucas pseudoprimes May 16, 2015 11 / 14

Page 27: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Solving Exceptions

Newton’s Method

Consider the case n = (2k1q1 − 1)(2k1q1 + 1). Does 2627 factor in thisform?Write x = 2k1q1, so 2627 = (x − 1)(x + 1) = x2 − 1 and x2 − 2628 = 0.

x0 = 40.

x1 = 40− 402−26282·40 = 52.85.

x2 = x1 −x21−2628

2x1= 51.28782.

x3 = x2 −x22−2628

2x2= 51.26403.

√2628 = 51.26402.

David Amirault Lucas pseudoprimes May 16, 2015 11 / 14

Page 28: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Importance

Primality testing is highly applicable to cryptography.

Many popular cryptosystems, including RSA, require numerous pairsof large prime numbers for key generation.

Factoring a large semiprime takes more time than multiplying its twoprime factors.

David Amirault Lucas pseudoprimes May 16, 2015 12 / 14

Page 29: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Importance

Primality testing is highly applicable to cryptography.

Many popular cryptosystems, including RSA, require numerous pairsof large prime numbers for key generation.

Factoring a large semiprime takes more time than multiplying its twoprime factors.

David Amirault Lucas pseudoprimes May 16, 2015 12 / 14

Page 30: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Importance

Primality testing is highly applicable to cryptography.

Many popular cryptosystems, including RSA, require numerous pairsof large prime numbers for key generation.

Factoring a large semiprime takes more time than multiplying its twoprime factors.

David Amirault Lucas pseudoprimes May 16, 2015 12 / 14

Page 31: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Future Research

The Baillie-PSW primality test combines a Miller-Rabin test usinga = 2 with a strong Lucas primality test.

No known composite passes this test.

What must be true of such n?

David Amirault Lucas pseudoprimes May 16, 2015 13 / 14

Page 32: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Future Research

The Baillie-PSW primality test combines a Miller-Rabin test usinga = 2 with a strong Lucas primality test.

No known composite passes this test.

What must be true of such n?

David Amirault Lucas pseudoprimes May 16, 2015 13 / 14

Page 33: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Future Research

The Baillie-PSW primality test combines a Miller-Rabin test usinga = 2 with a strong Lucas primality test.

No known composite passes this test.

What must be true of such n?

David Amirault Lucas pseudoprimes May 16, 2015 13 / 14

Page 34: Better bounds on the rate of non-witnesses of Lucas ......Lucas Primality Test De nition If n is a composite integer for which ˝q 1 (mod n) or ˝2mq 1 (mod n) with 0 m

Acknowledgments

Huge Thanks To:

David Corwin, my mentor

Stefan Wehmeier, for suggesting the project

Dr. Tanya Khovanova, head mentor

MIT PRIMES

And of course, my parents for providing transportation and supportthroughout the project!

David Amirault Lucas pseudoprimes May 16, 2015 14 / 14