Presentation is loading. Please wait.

Presentation is loading. Please wait.

RSA Encryption Greg Gronn Laura Trimmer. RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different.

Similar presentations


Presentation on theme: "RSA Encryption Greg Gronn Laura Trimmer. RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different."— Presentation transcript:

1 RSA Encryption Greg Gronn Laura Trimmer

2 RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different methods to generate these 30 digit primes and use algorithms to test whether numbers generated are actually prime.  Method: – Arbitrarily choose an odd 30 digit number and check to see if it is prime. – If not prime, add two or four, and check again.

3 Alice And Bob  Choose 2 primes: p and q  n = pq  z = (p-1)(q-1)  choose an e so that: 1<e<n where e and n are coprime  choose a d so that: de%z = 1 Public Key = (e,n) Private Key = (d,n)

4 RSA Encryption  Through primality testing, our group will be exploring the time constraint, accuracy, and memory constraint for each algorithm.  We will first deduce the complexity hypothetically, then gather empirical proofs to analyze actual outcomes.

5 Some Basics About Primes  Although there is no known useful formula to single out primes from composites, the distribution of primes can still be modeled.  Prime number theorem: the probability that a given, randomly chosen number n is prime is inversely proportional to the logarithm of n.  1 / ln(n) for n=100 the odds are 1 in 16 the number’s prime.  We are analyzing different algorithms that determine if a number n is prime by taking note of the complexity of each.

6 Tests  Algorithms are grouped into 3 methods: – Brute Force – Probabilistic – Fast Deterministic  Primality testing usually does not determine the prime factors of a number, rather it just determines whether a number is prime or not, and is comparatively faster and easier than integer factorization.  Some tests prove that a number is prime while others prove that a number is composite.

7 Brute Force Method  Trial division-run time:O( √ n) or less, if other adjustments are made  This method involves taking a number n and dividing it by the factors less than or equal to the square root of n.

8 Java Naïve Implementation public static boolean isPrime(long n) { if (n <= 3) { return n > 1; } else if (n % 2 == 0 || n % 3 == 0) { return false; } else { for (int i = 5; i * i <= n; i += 6) { if (n % i == 0 || n % (i + 2) == 0) { return false; } return true; }

9 Probabilistic Tests  The basic structure of randomized primality tests is as follows: 1.Randomly pick an integer a. 2.Repeat from step 1 until the required accuracy is achieved. 3.Check some equality (corresponding to the chosen test) involving (a) and the given number (n). If the equality fails to hold true, then (n) is a composite number.  After 1 or more iterations, if (n) is not found to be a composite number, it can be declared probably prime.

10 Fermat Primality Test  Run Time: O(k log^2n log log log log log n)  k = number of times we test a random a  n = value we want to test for primality

11 Miller-Rabin Test  Run time: O(k log^3n) – Using modular exponentation by repeated squaring  k = number of different values of a that are tested.  FFT-based multiplication can bring run time down to O(k log^2n log log n log log log n) = Õ(k log^2n)

12 Accuracy dependent on k amount of loops

13 Fast Deterministic Tests-Cyclotomy Test

14 Cyclotomy Test (con't)  A complete set of Galois conjugates is given by {(ζ n ) a } where (a) runs over the set of invertible residues mod (n) (so that (a) is relatively prime to (n)).  The Galois group is naturally isomorphic to the multiplicative group (Z/nZ)^x of invertible residues mod (n), and it acts on the primitive nth roots of unity by the formula: – b: (ζ n ) a → (ζ n ) a b.]


Download ppt "RSA Encryption Greg Gronn Laura Trimmer. RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different."

Similar presentations


Ads by Google