Question: I'm writing an RSA 64 bit C++ code, I don't want to encrypt and decrypt data, I just want to generate the Public and Private
I'm writing an RSA 64 bit C++ code, I don't want to encrypt and decrypt data, I just want to generate the Public , which maximum size is 18 Digits, 64 bits, then the code must generate 2 Prime numbers each with the same size the user has input". For example, the user inputs: 15, then the code has to generate 2 Primes each with size 15 digits long. I have declared the 2 Prime numbers as long long int data type, now the value of n is: n = p * q; So I have declared n as string, because it might be 128 bits long, so it cann't be stored in long long. And phiVal is: phi = (p - 1) * (q - 1); So I have declared phi as string. Now I have to find Public
Regards.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
