Reputation: 23
I made a small program that can solve RSA math questions. One part of the program checks if the ciphertext is needed, and if the plaintext, e and n are given.
When executing the code I get an error: TypeError: pow() takes exactly 2 arguments (3 given) Even though pow() can take 3 arguments https://www.programiz.com/python-programming/methods/built-in/pow
if "ciphertext" in NeededObjDict and "plaintext" in GivenObjDict and "e" in GivenObjDict and "n" in GivenObjDict:
OutputCiphertext = str(pow(GivenPlaintext, GivenE, GivenN))
print('ciphertext = ',OutputCiphertext)
Upvotes: 1
Views: 1903