[Solved] CSC281: Discrete Math for Computer Science RSA Cryptography

$25

File Name: CSC281__Discrete_Math_for_Computer_Science_RSA_Cryptography.zip
File Size: 555.78 KB

SKU: [Solved] CSC281: Discrete Math for Computer Science RSA Cryptography Category: Tag:
5/5 - (1 vote)

Public key cryptosystems known as the RSA system. RSA cryptosystem is based on the dramatic difference between the ease of finding large primes and the difficulty of factoring the product of two large prime numbers (the integer factorization problem).

In this project, you have to write an implementation for the RSA cryptosystem in a console mode of Java. Your code should implement the following components:

extended-Euclid(int p, int q)

Finds the greatest common divisor of two integers p and q using the extended Euclids algorithm as below:

  • long find_inverse(long a, long m):!

Finds the modular multiplicative inverse of a modulo m based on the following algorithm:

  • int random_prime():

Generates a random prime number.

  • boolean isPrime(int p):!

Check if a number is prime or not.

  • long[] generate_keys():

Generate Keys method.

  • long modular_exponentiation(long b, long n, long m):!

Find (b^n mod m) when we are dealing with big numbers, Same as algorithm 5 in 4.2 in the book

  • long string_to_int(String text):!

Takes a string and converts each character to int , ex: Input:KBL, Output: 100111.

  • String int_to_String(long inttext):!

Convert from int_to_String , ex: Input: 100111, Output: KBL

  • long[] encrypt(String plaintext, long e, long n):

Encryption method.

  • String decrypt(long[] ciphertext, long d, long n) Notes:
  • Your code will include Class main for testing and Class RSA class is the important class that contains the previous methods.
    • Since we will be dealing with big numbers, use long instead of int.
    • Again, since the numbers are big, use modular_exponentiation instead of

Math.pow.

  • Do not use Class BigInteger.
  • You must implement all previous methods.
  • You may add as many auxiliary methods as needed.
  • You should print the results of each step on RSA.
  • You should write exactly the same name of each method.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSC281: Discrete Math for Computer Science RSA Cryptography[Solved] CSC281: Discrete Math for Computer Science RSA Cryptography
$25