Karl Heimbuck Dr. Siguna Mueller Department of Mathematics EPSCoR/Honors Program Using Lucas Sequences in Primality Testing.

Slides:



Advertisements
Similar presentations
The AKS Primality Test Ilse Haim Directed Reading Program
Advertisements

WS Algorithmentheorie 03 – Randomized Algorithms (Primality Testing) Prof. Dr. Th. Ottmann.
Cryptography and Network Security
Chapter 8 – Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other.
Computability and Complexity
Chapter 8 Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other numbers.
Primality Testing Patrick Lee 12 July 2003 (updated on 13 July 2003)
Announcements: 1. Congrats on reaching the halfway point once again! 2. DES graded soon 3. Short “pop” quiz on Ch 3. (Thursday at earliest) 4. Reminder:
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
Chapter 8 More Number Theory. Prime Numbers Prime numbers only have divisors of 1 and itself They cannot be written as a product of other numbers Prime.
Fermat’s Little Theorem (2/24) Theorem (flt). If p is prime and GCD(a, p) = 1, then a p – 1  1 (mod p). Again, this says that in a mod p congruence, we.
Introduction to Modern Cryptography Lecture 6 1. Testing Primitive elements in Z p 2. Primality Testing. 3. Integer Multiplication & Factoring as a One.
COM 5336 Cryptography Lecture 7a Primality Testing
Primality Testing Math 52 Jonathan Sands Work by: Megan Howley Yangxi Leng Juncai Liu.
and Factoring Integers (I)
Announcements: 1. Pass in Homework 5 now. 2. Term project groups and topics due by Friday 1.Can use discussion forum to find teammates 3. HW6 posted, due.
1 Chapter 7– Introduction to Number Theory Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
Announcements: 1. Congrats on reaching the halfway point once again! 2. Reminder: HW5 due tomorrow, HW6 due Tuesday after break 3. Term project groups.
Announcements: 1. Pass in worksheet on using RSA now. 2. DES graded soon 3. Short “pop” quiz on Ch 3 (Thursday at earliest) 4. Term project groups and.
Chapter 8 – Introduction to Number Theory Prime Numbers  prime numbers only have divisors of 1 and self they cannot be written as a product of other numbers.
Chapter 8 – Introduction to Number Theory Prime Numbers
DTTF/NB479: Dszquphsbqiz Day 9 Announcements: Homework 2 due now Homework 2 due now Computer quiz Thursday on chapter 2 Computer quiz Thursday on chapter.
Cryptography and Network Security Chapter 8. Chapter 8 – Introduction to Number Theory The Devil said to Daniel Webster: "Set me a task I can't carry.
Chapter 8 – Introduction to Number Theory Prime Numbers  prime numbers only have divisors of 1 and self they cannot be written as a product of other numbers.
The RSA Algorithm Based on the idea that factorization of integers into their prime factors is hard. ★ n=p . q, where p and q are distinct primes Proposed.
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.

Information Security and Management 4. Finite Fields 8
RSA Parameter Generation Bob needs to: - find 2 large primes p,q - find e s.t. gcd(e, Á (pq))=1 Good news: - primes are fairly common: there are about.
Prabhas Chongstitvatana 1 Primality Testing Is a given odd integer prime or composite ? No known algorithm can solve this problem with certainty in a reasonable.
MA/CSSE 473 Day 08 Randomized Primality Testing Carmichael Numbers Miller-Rabin test.
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
By MUHAMMAD YUSRAN BASRI MATH ICP B Many early writers felt that the numbers of the form 2 n -1 were prime for all primes n, but in 1536 Hudalricus.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Pseudorandom numbers John von Neumann: Any one who considers
9/22/15UB Fall 2015 CSE565: S. Upadhyaya Lec 7.1 CSE565: Computer Security Lecture 7 Number Theory Concepts Shambhu Upadhyaya Computer Science & Eng. University.
Great Theoretical Ideas in Computer Science.
6.3 Primality Testing. p2. (1) Prime numbers 1. How to generate large prime numbers? (1) Generate as candidate a random odd number n of appropriate size.
Great Theoretical Ideas in Computer Science.
Chapter 1 Algorithms with Numbers. Bases and Logs How many digits does it take to represent the number N >= 0 in base 2? With k digits the largest number.
MA/CSSE 473 Day 10 Primality Testing. MA/CSSE 473 Day 10 In-class exam: Friday, Sept 28 –You may bring a two-sided 8.5x11 inch piece of paper containing.
MA/CSSE 473 Day 09 Modular Division Revisited Fermat's Little Theorem Primality Testing.
CS480 Cryptography and Information Security
MA/CSSE 473 Day 9 Primality Testing Encryption Intro.
3.3 Mathematical Induction 1 Follow me for a walk through...
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
MA/CSSE 473 Day 07 Extended Euclid's Algorithm Modular Division
MA/CSSE 473 Day 08 Randomized Primality Testing Carmichael Numbers
Chapter Applications of Number Theory Some Useful Results
Probabilistic Algorithms
Great Theoretical Ideas in Computer Science
Handbook of Applied Cryptography - CH4, from 4.1~4.3
DTTF/NB479: Dszquphsbqiz Day 22
MA/CSSE 473 Day 08 Randomized Primality Testing Carmichael Numbers
Introduction to Number Theory
Material in the textbook on pages
Number Theory (Chapter 7)
Cryptography and Network Security
Introduction to Cryptography
Great Theoretical Ideas in Computer Science
Mathematical Background: Primes and (GF)
Great Theoretical Ideas in Computer Science
Mathematical Background for Cryptography
Clements MAΘ October 30th, 2014
Mathematical Background: Primes and (GF)
Presentation transcript:

Karl Heimbuck Dr. Siguna Mueller Department of Mathematics EPSCoR/Honors Program Using Lucas Sequences in Primality Testing

Why do we need prime numbers? Digital security Public-key cryptography

Fermat’s Little Theorem If p is a prime number and a is an integer, then: a p-1  1 mod p if gcd(a,p) = 1 This holds for all primes but some composites as well.

Pseudoprimes: What are they? A pseudoprime fulfills a primality test but is in fact a composite. 561, which is composite, passes the Fermat test as a prime would  1 mod = 3 * 11 * 17

Carmichael Numbers Properties If a prime number p is a factor of the Carmichael number n, then p – 1|n – 1. Squarefree Have at least 3 prime factors Carmichael numbers fulfill the Fermat test for any base a such that gcd(a,n) = 1. The Fermat test is not good enough!

Refinements of FLT a (p-1)/2  1 mod p Miller-Rabin Test The Miller-Rabin test works very well in practice but could still be improved upon.

Lucas Sequences Let P and Q be integers and D = P 2 – 4Q List of U ’s and V ’s such that U n = PU n-1 – QU n-2 V n = PV n-1 – QV n-2 Initial terms U 0 = 0 U 1 = 1 V 0 = 2 V 1 = P

Example of a Lucas Sequence P = 2 and Q = -1 U 0 = 0V 0 = 2 U 1 = 1V 1 = 2 U 2 = 2V 2 = 6 U 3 = 5V 3 = 14 U 4 = 12V 4 = 34 U 5 = 29V 5 = 82 U 6 = 70V 6 = 198 U 7 = 169V 7 = 478 U 8 = 408V 8 = 1154

Initial observations U n+1  0 mod n OR U n-1  0 mod n U n  ± 1 mod n V n  2 mod n V n+1  P mod n OR V n-1  P mod n

Example For P = 2 and Q = -1, test n = 7 for primality U 7 = 169 U n+1 = U 8 = 408  2 mod 7 U n-1 = U 6 = 70  0 mod 7 U n = U 7 = 169  1 mod 7 V 7 = 478 V 7 = 478  2 mod 7 V 8 = 1154  6 mod 7 V 6 = 198  2 mod 7 (where P = 2)

Question Can we refine the conditions to know when we have +1 and when we have -1? Let’s make use of the discriminant D = P 2 – 4Q by looking at the Legendre/Jacobi symbol, denoted .  = 1 if D is a square modulo n  = -1 if D is not a square modulo n

Refined Lucas tests Test 1: U n- ε  0 mod n Test 2: U n  ε mod n Test 3: V n  2 mod n Test 4: V n- ε  P mod n

Pseudoprime Trouble! Let’s test n = 341 for primality using Test 2 with P = 2 and Q = 4.  = -1 U 341 = U 341  -1 mod passes Test 2 as a prime number 341 = 11 * 31 Does the same pseudoprime pass both Test 1 and Test 2?

More Trouble! Let’s test n = 341 using Test 1 U n- ε = U n-(-1) = U 342  0 mod passes Test 1 as well Let’s go on to Test 3

Out of the woods! What about Test 3? V 341  219 mod 341 Does not pass Test 3 so 341 must be composite. We can combine the Lucas tests to create a more refined primality test. Which combination works best? Doesn’t seem to be a most effective combination. Results seemed to favor a combination of one of the tests on V with one of the tests on U but this cannot be proven.

What if we combine a Lucas test with the Fermat test? passes all of the tests for P = 2 and Q = = 211 * 421 Does not pass the Fermat test when using 2 as our base,  mod 88831

Which combinations work best? Would not want to use Test 1 and the Fermat test together because they essentially end up testing the same condition when  = -1. Aside from avoiding that there does not seem to be a best combination of Fermat with any of the other 3 tests.

Stronger Conditions If  = = -1 and n is a prime number, then U (n-  )/2  0 mod n. If  = = 1 and n is a prime number, then V (n-  )/2  0 mod n. Did not extensively test these.

What do we do with the Lucas pseudoprimes? Can we characterize them? Doesn’t seem that way. But doing so would be a nice way to adjust the tests and assure that they do not slip through.

Conclusion The Lucas tests could be an effective primality testing tool but may still need a little tweaking. Combinations of a Lucas test with a Fermat test seem to work better than combinations of a Lucas test with another Lucas test. It is more effective to combine one Lucas test with the Fermat test than to combine two Lucas tests with the Fermat test. Run time is much quicker The payoff isn’t significant

What’s next? Can one characterize Lucas pseudoprimes? Will a certain base work best when using the Fermat test? Proposal by Bailie, Wagstaff, Pomerance and Selfride Let a = 2, use the same  as defined earlier, and a specific P and Q. It appears that there are no pseudoprimes for these conditions. Do any exist or not?

Thanks! ESPCoR Rick Matlock Barbara Kissack Honors Program Dr. Mueller