CMPT-585 Computer & Data Security By Ayesha Mohiuddin Ramazan Burus Advisor: Stefan A. Robila Generating Large Prime Numbers for Cryptographic Algorithms Using Distributed Computing
Prime Numbers Used in cryptographic algorithms: e.g. RSA algorithm, PKE, PKI, Diffie-Helman key exchange GIMPS; Great Internet Mersenne Prime Search: A Mersenne prime is a prime of the form 2 P -1. On February 18, 2005, Dr. Martin Nowak from Germany, discovered the 42nd known Mersenne Prime, 2 25,964, The number is nearly 7.8 million digits large. It took more than 50 days of calculations on his 2.4 GHz Pentium 4 computer.
Problem Setting Generate and store the prime numbers within a set range of values. (such as 1 to a billion) Use distributed computing to speed up the generation. Use database technologies to store the numbers.
Approach Programming language used: JAVA Database: ORACLE Object: Build a grid of multiple clients calculating prime numbers between unique ranges of numbers, to obtain a list of large prime numbers.
Oracle Database MasterClient 1 Client 2 Client 3 Architecture Computing Structure
Clients Allotted a unique Id and time limit. Gets the range of numbers to calculate within. Master Keeps monitoring the activity. Re-assigns range to another client if original client does not complete within its allotted time. (1 day: for our experiment) Database Stores the client information and the resulted Prime numbers sent by the clients. 3 Components
Setting Client side program responsibilities: Connect to the database through internet. Take a range of numbers to work on, communicate that the range has been taken, and start calculating primes within that range. Connect to database again for each found prime number and put that into its corresponding table When done communicate completion of task and take another range for new calculations. Administration Side responsibilities: Assign different ranges to different clients and receive results in tables. Keep track of jobs, if a taken job is not done up to a certain time by a node, then consider the node dead and re-assign the same range to another client node. The new node should somehow start from where old one left off.
As Numbers keep getting larger, number of prime numbers keep decreasing. For example: Variable ranges required for each clients. Number Ranges Client 1Client 2Client ……… 430 primes between 1 to 3000 and 353 primes between 3000 to 6000, so on.
Results Executable: 1.29 MB Memory usage: 10 MB CPU usage: 7 to 10 % Total primes stored : Largest Prime stored: In 12 hours using only 6 nodes, Primes within the maximum range of 461 million were found.
In 12 hours using only 6 nodes, which is a really small number, we were able to find primes within the maximum range of 461 million. This speed can be increased further by using more client nodes, more efficient algorithm for finding prime numbers. It would be better if the client side code is wrapped into a screen saver, so that it only starts executing when the client user’s computer is idle in order not to obstruct their own work. Thoughts & Conclusion
Useful Links Used in the Project Crow, Jerry. “Prime Numbers in Public Key Cryptography”, GSEC Practical Assignment. SANS Institute GIMPS (The Great Internet Mersenne Prime Search), 2004, Havil, J., Gamma: Exploring Euler's Constant, Princeton, NJ: Princeton University Press, A. Languasco, and A. Perelli. “Prime Numbers and Cryptography” Lewis, John and Loftus, William. “Java Software Solutions”. 2nd edition, Addison Wesley Longman, 2001 Pfleeger, Charles and Pfleeger, Shari. “Security in Computing”. Prentice Hall 2003, 3rd Edition Weisstein, Eric W. "Prime Number." From MathWorld --A Wolfram Web Resource.