aboutsummaryrefslogtreecommitdiff
path: root/q8/rsa.cpp
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-30 09:27:55 +0000
committerAkshay <[email protected]>2020-12-30 09:27:55 +0000
commitd3442e78f7fc56aa7c9d788ff5b04183b109f51f (patch)
tree9794c680fa56002c30e157e5c1ea4264e9da5b3e /q8/rsa.cpp
parentbcde52891e80500700d2a66e96fbdf504f771056 (diff)
make mods as requested
Diffstat (limited to 'q8/rsa.cpp')
-rw-r--r--q8/rsa.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/q8/rsa.cpp b/q8/rsa.cpp
index c38e7d6..c33bf7e 100644
--- a/q8/rsa.cpp
+++ b/q8/rsa.cpp
@@ -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);