+ All Categories
Home > Documents > Primality Testing Math 52 Jonathan Sands Work by: Megan Howley Yangxi Leng Juncai Liu.

Primality Testing Math 52 Jonathan Sands Work by: Megan Howley Yangxi Leng Juncai Liu.

Date post: 16-Dec-2015
Category:
Upload: rosanna-floyd
View: 217 times
Download: 2 times
Share this document with a friend
Popular Tags:
16
Primality Testing Math 52 Jonathan Sands Work by: Megan Howley Yangxi Leng Juncai Liu
Transcript

Primality Testing

Math 52 Jonathan Sands

Work by:Megan HowleyYangxi Leng

Juncai Liu

Outline

Introduction

Fermat’s Little Theorem

Proof of Miller’s Test

Short homework question

Definitions

• A prime number is an integer that has no integer factors other than 1 and itself. The opposite of a prime number is called a composite number.

• If p is prime and p |ab then p|a or p|b

• A primality test is an algorithm for determining whether an input number is prime.

S

Primality Test for Applications

safetysafety

cryptograph Electronic

correspondence

The security of this type of cryptograph primarily relies on difficulty involved in factoring very large number , a key one being the testing of numbers for primality.

The scheme was used to encrypt plaintext into blocks in order to prevent third party to gain access to private message.

Fermat's Little Theorem

The little theorem is often used in number theory in the testing of large primes and simply states that:

If n is a prime which does not divide a,

then a(n-1) ≡1 (mod n).

Example

n=31, a=3

Pseudoprimes

Numbers which meet the conditions of Fermat's Little Theorem but are not prime are called pseudoprimes

Example:

91 is a pseudoprime base 3

 

Pseudoprimes

The Miller Rabin Test

The Miller Rabin primality test is essentially an extension of Fermat’s Little Theorem that utilizes factorization

However, the Miller test allows one to test for primality with a much higher probability than Fermat’s Little Theorem.

Miller Proposition

Let n be an odd prime integer, and write n-1=2tm where m is odd and m,t∈ℤ. Then for all a∈ℤ with

gcd(a,n)=1:

Either am≡1 (mod n),

or am≡-1 (mod n),

or a2m≡-1 (mod n)

Or…

Miller Test Proof

We will first prove a factorization lemma by induction

We will then apply this lemma to Fermat’s Little Theorem to prove the Miller’s Test

Miller Proposition

Let n be an odd prime integer, and write n-1=2tm where m is odd and m,t∈ℤ. Then for all a∈ℤ with

gcd(a,n)=1:

Either am≡1 (mod n),

or am≡-1 (mod n),

or a2m≡-1 (mod n)

Or…

Example

Use the Miller’s test to see if 29 is prime or composite.

References

Granville, Andrew. It is easy to determine whether a given integer is prime. Bulletin of the American Mathematical Society. Volume 42, Pages 3-38: 2004.

McGregor-Dorsey, Zachary S. Methods of Primality Testing. MIT Undergraduate Journal of Mathematics. Boston: 2010.

Rosen, Kenneth. Elementary number theory and its applications. Boston: Addison-Wesley, 2011.

Our Mentor

A special thank you to our mentor, John Voight!

Homework Problem

Use the Miller’s test to see if 11 is prime or composite.


Recommended