Created
February 15, 2020 13:28
-
-
Save sheilambadi/b3b24bcd71f83060320e0bb547e3e6d1 to your computer and use it in GitHub Desktop.
Calculate the decryption key and generate an encrypted message using the public key for RSA algorithm.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('Compute d') | |
x = filter(lambda x: x*3 % 160 == 1, range(1,1000)) | |
for i in x: | |
print(i) | |
print('\nEncryption') | |
enc_msg = pow(5,3) % 187 | |
print(enc_msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment