Once you have this file, in order to have all the functions available here, simply write (in your Python interpreter or a separate Python file):
from midterm import *
Then, you can call them as you would call any other function as follows:
print(shanks_alg(7, 31, 197))
The following algorithms have been implemented:
- Extended Euclidean Algorithm (for gcd or modular inverses)
- Fast Powering
- Shank's Algorithm
- Chinese Remainder
- Pohlig-Hellman
- RSA Encrypt/Decrypt
- Pollard's P-1 Factorization Algorithm
The following algorithms are not yet complete, but will be published soon:
- Pollard's Rho Method for DLP