I wrote this script to teach myself on how to do RSA key generation (public key e and private key d), and how to encrypt and decrypt message mathematically. This tool will also be used as a refresher if I have forgotten how to calculate the RSA mathematics. This learning tool presents how the Euclidean … Continue reading [python]RSA mathematics learning tool

# Tag: gcd

# [python]Extended Euclidean Algorithm

I took my exam last night, and I guessed I would fail as I did not know how to calculate extended Euclidean Algorithm required for RSA. I came across this video, which explained eGCD really well, better than the slides I had and the tutor's explanation, the substitution method explained by my tutor was confusing. … Continue reading [python]Extended Euclidean Algorithm

# [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