Extended Euclid algorithm and RSA decryption&encryption

Here are three sample python code:

  • Extended Euclidean.py generates a pair(n,m)of random integers of several thousand digits and applies the extended Euclid algorithm to find their greatest common divisor d as well as a pair (a, b) of integers such that an + bm = d

  • FermatTest.py quickly generates an integer of several thousand digits which is probably prime, using Fermat’s Pri- mality Test.

  • RSA.py decrypt an RSA key and an encrypted message