1 / 15

Generating RSA Primes

Generating RSA Primes. Jim Townsend CSE633 Final Results Fall 2010. Importance. Encryption is harder to secure than ever RSA is an important standard in Public Key Encryption Developed in 1977, it began with relatively small keys – 128,256 bit keys

chaney
Download Presentation

Generating RSA Primes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Generating RSA Primes Jim Townsend CSE633 Final Results Fall 2010

  2. Importance • Encryption is harder to secure than ever • RSA is an important standard in Public Key Encryption • Developed in 1977, it began with relatively small keys – 128,256 bit keys • Current standard: 1048 bit keys (310 decimal digits) • Math on these numbers is very CPU intensive

  3. How Keys are Generated • Use the Miller-Rabin algorithm  • Tests against a specific few numbers • Only a probabilistic method • Probability a number is prime: .75 • Repeated passes used to eliminate false positives • 16 repetitions: (1-.75)^16  • Runtime: O(ln(N)^4)

  4. Sieve of Eratosphenes • Decided to implement a small sieve on the numbers before using the Miller-Rabin algorithm • Using all the prime numbers less than 1000 (168 numbers), see if any of those evenly divide the number first • Decreased serial runtime by more than half

  5. Current Program • The program takes in two strings: a starting value and a range • Runs a sieve on the range with the first 168 primes • Uses the remaining numbers and tests them with the Miller-Rabin algorithm up to 16 times on each.

  6. Serial Results

  7. Serial Results • Finding small numbers was relatively fast • Found 2263 primes 20 digits long in just .68 seconds • Large numbers are a different story: • 310 digits (Current RSA standard) took 27.01 seconds to find only 118 primes

  8. Parallel Algorithm • Divided the range among each processor • Each node checked its set and reported the number of primes it found • Final reduction to sum up the count

  9. Gains • Saw incredible speedup due to the minimal communication needed • Most of the real gains came from tweaking the serial algorithm • Using the sieve and only checking odd numbers • Would see much more by using load balancing using OpenMP

  10. Future Work • Could be more improved by load balancing the test with OpenMP • Exit on first failed test • Much better synchronization would be possible • Could also use this to divide the test into smaller pieces as well • Implementation in CUDA using GPGPUs

  11. Any Questions?

More Related