@@ -25,19 +25,20 @@ import (
25
25
26
26
// CheckScrambledPassword check scrambled password received from client.
27
27
// The new authentication is performed in following manner:
28
- // SERVER: public_seed=create_random_string()
29
- // send(public_seed)
30
- // CLIENT: recv(public_seed)
31
- // hash_stage1=sha1("password")
32
- // hash_stage2=sha1(hash_stage1)
33
- // reply=xor(hash_stage1, sha1(public_seed,hash_stage2)
34
- // // this three steps are done in scramble()
35
- // send(reply)
36
- // SERVER: recv(reply)
37
- // hash_stage1=xor(reply, sha1(public_seed,hash_stage2))
38
- // candidate_hash2=sha1(hash_stage1)
39
- // check(candidate_hash2==hash_stage2)
40
- // // this three steps are done in check_scramble()
28
+ //
29
+ // SERVER: public_seed=create_random_string()
30
+ // send(public_seed)
31
+ // CLIENT: recv(public_seed)
32
+ // hash_stage1=sha1("password")
33
+ // hash_stage2=sha1(hash_stage1)
34
+ // reply=xor(hash_stage1, sha1(public_seed,hash_stage2)
35
+ // // this three steps are done in scramble()
36
+ // send(reply)
37
+ // SERVER: recv(reply)
38
+ // hash_stage1=xor(reply, sha1(public_seed,hash_stage2))
39
+ // candidate_hash2=sha1(hash_stage1)
40
+ // check(candidate_hash2==hash_stage2)
41
+ // // this three steps are done in check_scramble()
41
42
func CheckScrambledPassword (salt , hpwd , auth []byte ) bool {
42
43
//nolint: gosec
43
44
crypt := sha1 .New ()
0 commit comments