From 7edba4976d46218da25b54fda5faf462c337b7b0 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 25 Feb 2022 11:26:03 +0100 Subject: [PATCH] Refactor --- ma5/rsa/rsa.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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|