INNER CODE UNIT · Go
pw2
schollz/pake · pake_test.go:234
pw2 := []byte{byte(id % 256), 2, 4}
A, _ := InitCurve(pw1, 0, "p256")
B, _ := InitCurve(pw2, 1, "p256")
B.Update(A.Bytes())
A.Update(B.Bytes())
kA, _ := A.SessionKey()
kB, _ := B.SessionKey()
if bytes.Equal(kA, kB) {
errors <- fmt.Errorf("keys should not be equal with different passwords in goroutine %d", id)
}
}(i)
}
wg.Wait()
close(errors)