summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-07-26 10:26:20 +0200
committerAzul <azul@leap.se>2012-07-26 10:26:20 +0200
commit1481331f3827711c16a3bcfb0ae0c6e4afd788d9 (patch)
tree6d63b585cca6ad97796c097d3ffed985710a100c
parent81dc07fabde178ee40a1ddfff5dfd74c5021347f (diff)
removed debugging output and adjusted ruby client to new server api
-rw-r--r--lib/srp/client.rb5
-rw-r--r--lib/srp/server.rb3
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/srp/client.rb b/lib/srp/client.rb
index 24d0c70..ba62993 100644
--- a/lib/srp/client.rb
+++ b/lib/srp/client.rb
@@ -11,7 +11,6 @@ module SRP
@username = username
@password = password
@salt = "5d3055e0acd3ddcfc15".hex # bigrand(10).hex
- puts "salt = %i" %@salt
@multiplier = multiplier # let's cache it
calculate_verifier
end
@@ -22,15 +21,13 @@ module SRP
aa = modpow(GENERATOR, a, PRIME_N) # A = g^a (mod N)
bb, u = server.initialize_auth(aa)
client_s = calculate_client_s(x, a, bb, u)
- server.authenticate(aa, calculate_m(aa,bb,client_s))
+ server.authenticate(calculate_m(aa,bb,client_s))
end
protected
def calculate_verifier
x = calculate_x(@username, @password, @salt)
- puts "x = %i" % x
@verifier = modpow(GENERATOR, x, PRIME_N)
- puts "verifier = %i" % @verifier
@verifier
end
diff --git a/lib/srp/server.rb b/lib/srp/server.rb
index cf213c9..30f5088 100644
--- a/lib/srp/server.rb
+++ b/lib/srp/server.rb
@@ -24,9 +24,6 @@ module SRP
base = (modpow(@verifier, u, PRIME_N) * @aa) % PRIME_N
server_s = modpow(base, @b, PRIME_N)
if(m == calculate_m(@aa, @bb, server_s))
- puts "A = %x" % [@aa]
- puts "M = %x" % [m]
- puts "s = %x" % [server_s]
return calculate_m(@aa, m, server_s)
end
end