diff options
author | azul <azul@riseup.net> | 2013-07-06 07:47:19 -0700 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-07-06 07:47:19 -0700 |
commit | 926a5d5960db51903e33c8496487da59f9f41242 (patch) | |
tree | dc504596bef7b18bace664626334947e62e91214 /src/srp_session.js | |
parent | e7a0b830b8f994316a560001a9e7397422b184b1 (diff) | |
parent | bd6d60789bfb97041d0d219f645c08b7b479b782 (diff) |
Merge pull request #2 from elijh/feature/always-use-v1
always use the API-only controller for all requests.
Diffstat (limited to 'src/srp_session.js')
-rw-r--r-- | src/srp_session.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/srp_session.js b/src/srp_session.js index 5d1f829..0648959 100644 --- a/src/srp_session.js +++ b/src/srp_session.js @@ -33,8 +33,8 @@ srp.Session = function(account, calculate) { }; this.handshake = function() { - return { - login: account.login(), + return { + login: account.login(), A: this.getA() }; }; @@ -43,19 +43,20 @@ srp.Session = function(account, calculate) { return A; } - // Delegate login so it can be used when talking to the remote + // Delegate login & id so they can be used when talking to the remote this.login = account.login; + this.id = account.id; // Calculate S, M, and M2 // This is the client side of the SRP specification this.calculations = function(salt, ephemeral) - { + { //S -> C: s | B var B = ephemeral; var x = calculate.X(account.login(), account.password(), salt); S = calculate.S(a, A, B, x); K = calculate.K(S); - + // M = H(H(N) xor H(g), H(I), s, A, B, K) var xor = calculate.nXorG(); var hash_i = calculate.hash(account.login()) |