master
E. Almqvist 3 years ago
parent a73b9dba55
commit 7edba4976d
  1. 2
      ma5/rsa/rsa.rb

@ -31,7 +31,7 @@ module RSA
def initialize(p1, p2) def initialize(p1, p2)
puts "Generating key pair..." puts "Generating key pair..."
@n = p1 * p2 @n = p1 * p2
@phi = (p1-1).lcm(p2-1) @phi = (p1-1)*(p2-1)
enc = [] enc = []
(2...@phi).each do |e| (2...@phi).each do |e|

Loading…
Cancel
Save