Question: C++ Language You have to write a program (or if you find it easier, two different programs) to implement two different attacks on RSA and

C++ Language

C++ Language You have to write a program (or if you find

You have to write a program (or if you find it easier, two different programs) to implement two different attacks on RSA and see which works faster. For each attack, your program will take as input the public key e, n, and a ciphertext C and produce as output the plaintext M and the total amount of time the attack took to obtain M = (a) Attack 1: Here you will generate all possible values of M till you find one for which Me C mod n. You can use the naive and inefficient method for modular exponentiation. Here the output should consist of M. (b) Attack 2: Here you will factor n to recover the primes p, q such that n= pq. You will then calculate the private key d, n, and then calculate M Cd mod n. You can use the naive and inefficient methods for factoring n, for finding d from e and (n), and for modular exponentiation. Here the output should consist of p, q,d, M. = You have to run your program on three different inputs. = = = (a) e = 7, n 15,C 4. It is possible that this problem gets solved so fast that you do not get very meaningful timing results for this example. (b) e = 13, n. 527,0 143. Again, it is possible that this problem gets solved so fast that you do not get very meaningful timing results for this example. (c) An input generated by you - you should generate the largest values for which you can get results in a reasonable" amount of time. Here you have to start from scratch in terms of finding p,q,e,d etc i.e. you have to find these values. You have to write a program (or if you find it easier, two different programs) to implement two different attacks on RSA and see which works faster. For each attack, your program will take as input the public key e, n, and a ciphertext C and produce as output the plaintext M and the total amount of time the attack took to obtain M = (a) Attack 1: Here you will generate all possible values of M till you find one for which Me C mod n. You can use the naive and inefficient method for modular exponentiation. Here the output should consist of M. (b) Attack 2: Here you will factor n to recover the primes p, q such that n= pq. You will then calculate the private key d, n, and then calculate M Cd mod n. You can use the naive and inefficient methods for factoring n, for finding d from e and (n), and for modular exponentiation. Here the output should consist of p, q,d, M. = You have to run your program on three different inputs. = = = (a) e = 7, n 15,C 4. It is possible that this problem gets solved so fast that you do not get very meaningful timing results for this example. (b) e = 13, n. 527,0 143. Again, it is possible that this problem gets solved so fast that you do not get very meaningful timing results for this example. (c) An input generated by you - you should generate the largest values for which you can get results in a reasonable" amount of time. Here you have to start from scratch in terms of finding p,q,e,d etc i.e. you have to find these values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!