diff options
author | Akshay <[email protected]> | 2020-12-30 09:27:55 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-12-30 09:27:55 +0000 |
commit | d3442e78f7fc56aa7c9d788ff5b04183b109f51f (patch) | |
tree | 9794c680fa56002c30e157e5c1ea4264e9da5b3e /q8/rsa.cpp | |
parent | bcde52891e80500700d2a66e96fbdf504f771056 (diff) |
make mods as requested
Diffstat (limited to 'q8/rsa.cpp')
-rw-r--r-- | q8/rsa.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -47,10 +47,10 @@ int main() { | |||
47 | cin.getline(text, sizeof(text)); | 47 | cin.getline(text, sizeof(text)); |
48 | len = strlen(text); | 48 | len = strlen(text); |
49 | do { | 49 | do { |
50 | p = rand() % 30; | 50 | p = rand() % 800; |
51 | } while (!isprime(p)); | 51 | } while (!isprime(p)); |
52 | do { | 52 | do { |
53 | q = rand() % 30; | 53 | q = rand() % 800; |
54 | } while (!isprime(q)); | 54 | } while (!isprime(q)); |
55 | n = p * q; | 55 | n = p * q; |
56 | phi = (p - 1) * (q - 1); | 56 | phi = (p - 1) * (q - 1); |