Generating Large Prime Numbers for Cryptographic Algorithms

advertisement
CMPT-585 Computer & Data Security
By
Ayesha Mohiuddin
Ramazan Burus
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 2P-1.
Advisor: Stefan A. Robila
Generating Large Prime Numbers
for Cryptographic Algorithms
Using Distributed Computing
Problem Setting
On February 18, 2005, Dr. Martin Nowak from
Germany, discovered the 42nd known Mersenne
Prime, 225,964,951-1. 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.
Approach
Generate and store the prime numbers within a set
range of values. (such as 1 to a billion)
Programming language used: JAVA
Use distributed computing to speed up the generation.
Object:
Build a grid of multiple clients calculating
prime numbers between unique ranges of numbers, to
obtain a list of large prime numbers.
Use database technologies to store the numbers.
Database: ORACLE
Computing Structure
Client 1
Master
Client 2
Client 3
Oracle Database
Architecture
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.
3 Components
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.
Number Ranges
As Numbers keep getting larger, number of prime
numbers keep decreasing. For example:
430 primes between 1 to 3000 and
353 primes between 3000 to 6000, so on.
Variable ranges required for each clients.
227
0
………
Client 1
Client 2
Client 3
Results
Executable: 1.29 MB
Memory usage: 10 MB
CPU usage: 7 to 10 %
Total primes stored : 376074
Largest Prime stored: 6583813
In 12 hours using only 6 nodes, Primes within the
maximum range of 461 million were found.
Useful Links Used in the Project
Crow, Jerry. “Prime Numbers in Public Key Cryptography”, GSEC
Practical Assignment. SANS Institute 2003.
http://www.giac.org/practical/GSEC/Gerald_Crow_GSEC.pdf
GIMPS (The Great Internet Mersenne Prime Search), 2004,
http://www.mersenne.org
Havil, J., Gamma: Exploring Euler's Constant, Princeton, NJ:
Princeton University Press, 2003.
A. Languasco, and A. Perelli. “Prime Numbers and Cryptography”.
2003 http://www.math.unipd.it/~languasc/lavoripdf/R8eng.pdf
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. http://mathworld.wolfram.com/PrimeNumber.html
Thoughts & Conclusion
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.
Download