diff --git a/ma5/rsa/rsa.rb b/ma5/rsa/rsa.rb index 9583cd9..cb8c02a 100644 --- a/ma5/rsa/rsa.rb +++ b/ma5/rsa/rsa.rb @@ -31,7 +31,7 @@ module RSA def initialize(p1, p2) puts "Generating key pair..." @n = p1 * p2 - @phi = (p1-1).lcm(p2-1) + @phi = (p1-1)*(p2-1) enc = [] (2...@phi).each do |e|