aboutsummaryrefslogtreecommitdiff
path: root/q8/rsa.cpp
diff options
context:
space:
mode:
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);