Understanding RSA

In this project assignment, you will create a program with any high-level programming

languages as you prefer (e.g. Java/C++/Python/Go …) to implement a simplified

version of RSA cryptosystems. To complete this project, you may follow the steps

listed below (demonstrated in Java code) to guide yourself through the difficulties .

Step I Key-gen: distinguish a prime number (20 pts)

The generation of RSA’s public/private keys depends on finding two large prime

numbers, thus our program should be able to tell if a given number is a prime number

or not. For simplicity, we define both prime numbers p and q within range 0 < p, q <

10,000,000 so that a 64 bits primitive type (e.g. long in Java) should be sufficient

to handle most arithmetics calculations involved.

Therefore, your first step is to implement a method that takes such a number in range

as input and output a boolean type value to indicate whether it’s a prime number:

Tags: No tags