mathchou / Cryptography

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cryptography Python Code

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:

  1. Extended Euclidean Algorithm (for gcd or modular inverses)
  2. Fast Powering
  3. Shank's Algorithm
  4. Chinese Remainder
  5. Pohlig-Hellman
  6. RSA Encrypt/Decrypt
  7. Pollard's P-1 Factorization Algorithm

The following algorithms are not yet complete, but will be published soon:

  1. Pollard's Rho Method for DLP

About


Languages

Language:Python 100.0%