Requirements: 1. Generate key pair using RSA Implement method (p and q can be parameters of this method or class fields, by your choice. 2. Use the key pair to encrypt and decrypt a message Implement...

1 answer below »
I was recommend me to this website. we are in same class and have to do same assignment. her order id isorder 81250. it should not be same


Requirements: 1. Generate key pair using RSA Implement method (p and q can be parameters of this method or class fields, by your choice. 2. Use the key pair to encrypt and decrypt a message Implement encrypt and decrypt methods 3. Using key pair to generate the verify digital signature Implement digital signature generation and verification methods. 4. Prove the homomorphic property of RSA E(m1).E(m2) = E(m1.m2) (where E is encryption of a message) 5. In main method: Message can be randomly generated or chosen by your choice RSA Algorithm: To generate key pair: · -  Pick large primes p and q · -  Let n = p*q, keep p and q to yourself. · -  For public key, choose e that is relatively prime to ø(n) =(p-1)(q-1), let pub = · -  For private key, find d that is the multiplicative inverse of e mod ø(n), i.e., e*d =1 mod ø(n), let pri = . How does RSA work? Key Generation ● Input: none ● Computation: -Select two prime integers p,q - compute integers n = p * q - phi = (p-1) * (q-1) - Select small odd integer e such that gcd(e, phi) = 1 - compute integer d such that (e * d) %phi = 1 ● Output: n, e, and d · ●  How to find big primes p and q? · ●  Hoe to compute gcd? · ●  How to find mod inverse? · ●  How to manipulate big numbers ○ Java integers are of limited size Java BigInteger Class · ●  Import java.math.BigInteger · ●  Common operations · -  Add, subtract, multiply, divide · -  Equals, compareTo · ●  Useful constants -BigInteger.ONE -BigInteger.ZERO · ●  Useful Constructor -BigInteger(int numBits, int certainty, Random rnd) -Need to generate a random number beforehand - Could use 100 for certainty More useful operations: -probablePrime(int bitLength, Random rnd) ● Could use this one instead of the constructor -gcd(BigInteger val) -modInverse(BigInteger m) -modPow(BigInteger exponent, BigInteger m) Questions.... Greatest Common Divisor // greatest common divisor Int gcd(int a, int b){ If (b == 0) return(a); Else
Answered 2 days AfterApr 23, 2021

Answer To: Requirements: 1. Generate key pair using RSA Implement method (p and q can be parameters of this...

Ankit answered on Apr 26 2021
151 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here