Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming project In this assignment, you will write code to find out the private key based on the public key of the RSA algorithm. From

Programming project
In this assignment, you will write code to find out the private key based on the public key of the RSA algorithm.
From the class we know that the security of RSA is based on the assumption that it is infeasible to factor large number n. In other words, if we can factor n, then RSA can be cracked. For example, it is not too hard to factor n, given the public key (5,10142789312725007). You job in this assignment is to write code to find the private key based on the given public key, and use the private key to encrypt the value 256.
Requirements:
1. You can choose your own preferred programming language. However, the chosen language must be native to Kali Linux, that is, we do not need to install extra compilers or any other components to run you code in Kali.
2. Your code can NOT use any utility libraries. By utility library, we refer to libraries that facilitate calculations but not essential, such as any cryptography-related library or Math-related libraries. For example, Python build-in methods such as pow() is NOT allowed. Your code should only use the most fundamental syntax such as if-else branch and while/for loops. Basic I/O functions such as print/printf are allowed.
4. Your program should take in two parameters, in the order of (e, n). and output two values, in the order of (d, private-key encrypted value of 256).
We will use scripts to automatically evaluate your code. For example, I will name my code as mwei2.py. And the code will be evaluated in Kali Linux by the command line (note Python2 has been depreciated in Kali and you must use Python3 if you choose to use Python):
:~$python3 mwei2.py 510142789312725007
And the output should be:
8114231289041741555317204097973
The file name and the output must exactly follow above format, since we will use scripts to evaluate your code and give grade to the username (i.e., the file name), you will not receive any point if your user name is incorrect, or your output does not conform to the format and makes our script unable to parse it.
5. Your code should finish within reasonable time. For each run, your code will be terminated if the result is not returned in two minutes. The n value provided will be less than 20 digits.
Grading:
1. Your code will be run against 10 sets of public keys, each worth 10 points.
2. Using any crypto-related library will result in zero point.
3. Your code must be directly runnable in Kali, specifically, within the Cyber Range Kali Linux 2020.6 environment. You will receive zero point if your code does not run or if it crashes. You can choose to develop your code in any environment, however, before submission, please put your code into the Cyber Range environment and make sure your code runs fine there.
4. You can start your code by using the example given in this question, and we will supply 2 more public keys to test your program in a later time.
5. Assignment must be finished individually, we will use tools to check for duplication both between class submission and with online resources. Code with substantial duplication will receive zero(0) point.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions