Skip to content

Instantly share code, notes, and snippets.

@JohnPhamous
Created October 25, 2017 05:26
Show Gist options
  • Save JohnPhamous/91f8dae1002176309be50c515828712c to your computer and use it in GitHub Desktop.
Save JohnPhamous/91f8dae1002176309be50c515828712c to your computer and use it in GitHub Desktop.
import string
private_e = 37
private_n = 77
encrypted_message = []
decrypted_message = []
for m in encrypted_message:
d = (m ** private_e) % private_n
#print(d)
decrypted_message.append(d)
encoding = dict(enumerate(string.ascii_lowercase, 2))
for m in decrypted_message:
if m == 28:
print(" ", end="")
else:
print(encoding[m], end="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment