Cryptography: RSA

Overview "If you can't explain it simply, you don't understand it well enough" Albert Einstein RSA (Rivest-Shamir-Adleman) needs no introduction, it is well known and most used public-key cryptosystem that governs our digital lives. Here is my take, a simple implementation in 10 lines of Ruby code that is neither the best implementation nor the most efficient one but is enough for the purpose of this article. 1 p = 7 2 q = 11 3 n = p * q 4 phi = (p-1) * (q-1) 5 gcd = ->(a, b) { while(b ! [Read More]