Prelab 7: RSA Key Generation

In Lecture 16 we learned everything we needed to implement RSA key generation in Java using the fields and methods of the BigInteger class. Your prelab assignment is to write a Java subroutine to do this. In Lab 7 you will add your key generation code to an RSA demo applet and implement the RSA encryption and decryption subroutines.

Make two copies of your prelab code. One copy will be submitted at the beginning of lab session.

Requirements

Follow these instructions carefully, as the RSA applet will expect your subroutine to have a particular name and assign values to the specified fields.

The Java API specification for the BigInteger class is found here, if you are interested:

http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html