summaryrefslogtreecommitdiff
path: root/lib/srp/client.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-07-26 10:58:28 +0200
committerAzul <azul@leap.se>2012-07-26 10:58:28 +0200
commit26580be7f9b557ed8136aa11c7b4e7b96f9c86eb (patch)
tree69d51298f042862e2e9c1aec3033bab7d101e3a1 /lib/srp/client.rb
parent7de7a78668a83eaab58597ce655ba613d4b477fb (diff)
both sides calculate their own u
Diffstat (limited to 'lib/srp/client.rb')
-rw-r--r--lib/srp/client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/srp/client.rb b/lib/srp/client.rb
index ba62993..1be2461 100644
--- a/lib/srp/client.rb
+++ b/lib/srp/client.rb
@@ -19,7 +19,8 @@ module SRP
x = calculate_x(username, password, salt)
a = bigrand(32).hex
aa = modpow(GENERATOR, a, PRIME_N) # A = g^a (mod N)
- bb, u = server.initialize_auth(aa)
+ bb = server.initialize_auth(aa)
+ u = calculate_u(aa, bb, PRIME_N)
client_s = calculate_client_s(x, a, bb, u)
server.authenticate(calculate_m(aa,bb,client_s))
end