Analyzing and Testing justified Prime Numbers

Slides:



Advertisements
Similar presentations
AKS Implementation of a Deterministic Primality Algorithm
Advertisements

Chris MacLellan, and Daniel W. Peterson. Statistical Primality Testing Miller-Rabin and pseudoprimes Frobenius test and pseudoprimes Composites which.
Presented by Alex Atkins.  An integer p >= 2 is a prime if its only positive integer divisors are 1 and p.  Euclid proved that there are infinitely.
Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
Cryptography and Network Security
PRIMALITY TESTING – its importance for cryptography
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.
1 Deciding Primality is in P M. Agrawal, N. Kayal, N. Saxena Presentation by Adi Akavia.
Computability and Complexity
MS 101: Algorithms Instructor Neelima Gupta
Agrawal-Kayal-Saxena Presented by: Xiaosi Zhou
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.
Lecture 8: Primality Testing and Factoring Piotr Faliszewski
Introduction to Modern Cryptography Lecture 6 1. Testing Primitive elements in Z p 2. Primality Testing. 3. Integer Multiplication & Factoring as a One.
Primality Testing By Ho, Ching Hei Cheung, Wai Kwok.
COM 5336 Cryptography Lecture 7a Primality Testing
Great Theoretical Ideas in Computer Science.
and Factoring Integers (I)
1 Chapter 7– Introduction to Number Theory Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2009 Tuesday, 28 April Number-Theoretic Algorithms Chapter 31.
Deciding Primality is in P M. Agrawal, N. Kayal, N. Saxena Slides by Adi Akavia.
K. -C. Yang and J. -L. Lin National Tsing Hua University
and Factoring Integers
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.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Chapter 8 – Introduction to Number Theory Prime Numbers
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.
Dan Boneh Intro. Number Theory Modular e’th roots Online Cryptography Course Dan Boneh.
Public key ciphers 1 Session 5.
Topic 18: RSA Implementation and Security
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
Prime Numbers Prime numbers only have divisors of 1 and self
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
Software Security Seminar - 1 Chapter 11. Mathematical Background 발표자 : 안병희 Applied Cryptography.
Cryptography A little number theory Public/private key cryptography –Based on slides of William Stallings and Lawrie Brown.

Generating RSA Primes Jim Townsend CSE633 Final Results Fall 2010.
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.
CPSC 490 Number Theory Primes, Factoring and Euler Phi-function Mar.31 st, 2006 Sam Chan.
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.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur.
Analyzing and Testing a justified Prime Number Jeong-kyu YANG Seok-kyu Kang ( Mid-term Presentation )
Cryptography Lecture 7: RSA Primality Testing Piotr Faliszewski.
Primes in P Deterministic polynomial-time algorithm of Agrawal, Kayal and Saxena Presented by Vladimir Braverman.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
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.
Primes in P Manindra Agrawal Neeraj Kayal Nitin Saxena CS300: Technical Paper review by Arpan Agrawal.
RSA cryptosystem--preview Suppose n=p  q and  (n)=(p-1)(q-1), where p and q are big primes. Select (find) a and b, such that a  b=1 mod  (n). K=(n,p,q,a,b),
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.
Primality Testing. Introduction The primality test provides the probability of whether or not a large number is prime. Several theorems including Fermat’s.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
Implementation of Public Key Encryption Algorithms
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.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
MA/CSSE 473 Day 9 Primality Testing Encryption Intro.
PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena Dept of CSE, IIT Kanpur.
RSA Encryption Greg Gronn Laura Trimmer. RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different.
CSE565: Computer Security Lecture 7 Number Theory Concepts
Handbook of Applied Cryptography - CH4, from 4.1~4.3
Topic 24: Finding Prime Numbers, RSA
RSA Cryptosystem Bits PCs Memory MB ,000 4GB 1,020
Mathematical Background: Prime Numbers
Introduction to Cryptography
Presentation transcript:

Analyzing and Testing justified Prime Numbers Concrete Mathematics Final Presentation 20032047 Jeong-Kyu YANG 20032003 Seok-Kyu Kang

OUTLINE Introduction The Primality Testing Algorithms Analyzing Probabilistic Algorithms Deterministic Algorithms Analyzing Solovay-Strassen Algorithm Miller-Rabin Algorithm AKS Algorithm Implements & Experiments Conclusion & Future Works References

Introduction What is Prime Number & Primality Testing? The importance of testing primality Applications in cryptography RSA, etc. uses primality testing algorithm in the part of key generation. How fast and efficient? Brief History 200 BC: Eratosthenes Sieve 1976: NP(Nondeterministic Polynomial-time), Pratt 1977: coRP(Complementary Randomized Polynomial-time), Solovay and Strassen 1987: RP(Randomized Polynomial-time), adleman and Huang 1992: UP(Unambiguous Polynomial-time), Fellows and Koblitz 2002: PRIMES is in P(Polynomial-time), Agrawal et al.

The Primality Testing Algorithms Probabilistic Algorithms Lehamann-Peralta Solovay-Strassen Miller-Rabin Deterministic Algorithms Eratosthenes Sieve Euclidean algorithm Fermat’s Theorem Wilson’s Theorem AKS

Analyzing of Solovay-Strassen Probabilistic Algorithms Solovay-Strassen Algorithm (Cont.) Based on Euler Pseudoprime More effective than the simpler Fermat’s test A number N called an Euler Pseudoprime to base b, if b(N-1)/2 =(b/N) (mod N). ((b/N) is the Jacobi symbol) Legendre symbol, L(a,P) =

Analyzing of Solovay-Strassen Probabilistic Algorithms Solovay-Strassen Algorithm Jacobi’s symbol, J(a,n) is generalized from Legendre’s symbol, L(a, n) Legendre’s symbol, L(a, n)

Analyzing of Miller-Rabin Probabilistic Algorithms Miller-Rabin Algorithm (Cont.) More efficient than Solovay-Strassen Algorithm Emerged by Miller in 1976, modified by Rabin in 1980 Definitely correct if it returns COMPOSITE, input a maybe a pseudoprime if it returns PRIME The probability of Miller-Rabin is not greater than (1/4)s Strong primality test of pseudoprime

Analyzing of Miller-Rabin Probabilistic Algorithms Miller-Rabin Algorithm Reducing the probability of misjudgment Reducing the probability of misjudgment

Analyzing of AKS Deterministic Algorithm AKS Algorithm By Manindra Agrawal, Neeraj Kyal and Nitin Saxena August 2002 Always returns right answer Works in polynomial time Basic Idea (x – a)n ≡ xn – a (mod n) a, n: relatively prime if n is prime: true if n is composite: false Compare n coefficients – O(n) = O(2lg n)

Analyzing of AKS Deterministic Algorithm Find Useful Prime AKS Algorithm Find Useful Prime Set of congruence Brute force can be used

Analyzing of AKS Deterministic Algorithm Filter 1 Filter 2 Filter 3 AKS Algorithm Filter 1 Filter 2 Filter 3

Analyzing of AKS Complexity Filter 1: O(log n)3 Filter 2: O(log n)3 Computation: ai mod n=0 for all 0<i<n. Using square and multiply method requires O(log n) multiplications of polynomials of degree smaller than r Multiplication of 2 such polynomials, takes O(r2) operations in Z/nZ, whereas, multiplication in Z/nZ is O(log n)2 additions. Then the for loop requires O(s* r2*log n*(log n)2)=O(2sqrt r log n* r2*log n*(log n)2), r is O((log n)6) => O((log n)19) O((log n)12f(log log n)), where f is a polynomial function

Implementations – SS, MR and AKS Environment Hardware Pentium III 550mhz, 384 RAM Language: Java (j2sdk1.4.0_02), Boland Jbuilder 6.0 The way to implement Solovay-Strassen & Miller-Rabin Run simultaneously with a same random number generator Same iterations to check better performance Same bit lengths Demo Program-1 AKS Testing with far smaller lengths (Long integer operation is for further works) Testing for polynomial time of AKS Demo Program-2, Program-3

Experiments - Probabilistic Comparison of primality between Solovay-Strassen and Miller-Rabin

Experiments - Deterministic Testing for polynomial time of AKS Limitations: with no memory fluctuation n = 524287 powerTest output: r=23159, s=5784 polyTest: each “for-loop” iteration of the for-loop takes about 355sec (about 6mins). So, overall runtime is 6mins*5784 (value of s in this case), which is about 34704mins = 578.4hours = 24 days!!! Solovay-Strassen & Miller-Rabin: less than 1 sec.

Experiments – Comparison Primality Comparisons among tree algorithms Limitations The range of Positive Odd Integers: 3 ~ 499 Iterations: 130 (SS & MR also has 50 iterations internally)

Conclusion The importance of strong & very big prime numbers from the experiments of this project Miller-Rabin has better performance than Solovay-Strassen However, two algorithms probably declare lots of pseudoprimes AKS is a breakthrough result Always declares real primes Solves a long-standing theoretical problem AKS has no practical relevance Prohibitively slow runtimes Not likely to change any time soon Polynomial computations are just too inefficient Theoretically correctness V.S. practical efficiency? Depend on purposes

Future Works More analysis of complexity for each algorithms Further Experiments for AKS Find useful prime numbers and analyze its characteristics Further Implementation for AKS Try to get over inefficiency of AKS Algorithm Improving to handle very long integers Continue to compare results of each algorithms

References [1] M.Agrawal, N.Kayal and N.Saxena, “PRIMES is in P”, August 6, 2002 [2] William Stallings, “Cryptography and Network security”, second edition. Prentice Hall, 1998 [3] J.Menezes, C.vaz Oorschot and A.Vanstone, “Handbook of Applied Cryptography” CRC,1977 [4] Takeshi Aoyama, “Polynomial Time Primality Testing Algorithm”, 2003 [5] Frontline. “Volume19-Issue 17”, August 17-30.2002 [6] http://www.javastudy.co.kr/docs/techtips/020821.html [7] http://www-fs.informatik.uni-uebingen.de/~reinhard/krypto/primzt.html [8] http://www.cse.iitk.ac.in/news/primality.html [9] http://random.mat.sbg.ac.at/generators/