[python] Greatest Common Denominator

I am studying how to calculate RSA, and in the way the formula has something related to GCD, not only in RSA also in Affine Cipher also has a condition that gcd(a, b) = 1 when choosing a and b as keys. So this is a code snippet after I have learned about gcd. The … Continue reading [python] Greatest Common Denominator