INNER CODE UNIT · Go
TestIdentityBoundSessionKeys
schollz/pake · pake_test.go:305
func TestIdentityBoundSessionKeys(t *testing.T) {
password := []byte("shared password")
idA := []byte("croc/main/v2/room-one/receiver")
idB := []byte("croc/main/v2/room-one/sender")
for _, curve := range AvailableCurves() {
t.Run(curve, func(t *testing.T) {
A, err := InitCurveWithIdentities(password, 0, curve, idA, idB)
if err != nil {
t.Fatal(err)
}
B, err := InitCurveWithIdentities(password, 1, curve, idA, idB)
if err != nil {
t.Fatal(err)
}
if err = B.Update(A.Bytes()); err != nil {
t.Fatal(err)
}