aboutsummaryrefslogtreecommitdiff
path: root/final/rsa-decrypt.py
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-11-11 23:18:36 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-11-11 23:18:36 -0500
commiteb364b5badef4afb4cc1ce370a36fd089aa61cf7 (patch)
treeff09b14fc8fa977bafe76f8aebd57a3f5777a514 /final/rsa-decrypt.py
parent83d23049a685244b7cf0236ebeb1e77cce71ac6e (diff)
added user entry (except for the hardcoded encrypted data)
Diffstat (limited to 'final/rsa-decrypt.py')
-rw-r--r--final/rsa-decrypt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/final/rsa-decrypt.py b/final/rsa-decrypt.py
index d05b351..39a2720 100644
--- a/final/rsa-decrypt.py
+++ b/final/rsa-decrypt.py
@@ -1,9 +1,9 @@
-encrypted = [405, 35, 133, 371, 435, 279] # Directly from demo output of encrypted
-p = 29
-q = 17
+encrypted = [340, 316, 145, 278, 250, 435, 321, 109, 115, 490, 156, 212, 122, 288, 287, 164, 225] # Directly from demo output of encrypted
+p = int(input('prime 1: '))
+q = int(input('prime 2: '))
n = p*q
tot = (p-1)*(q-1)
-e = 3
+e = int(input('e: '))
# Calculate d such that ed == 1 mod tot
d = 1 # Guess