Open hdevalence opened 4 years ago
Since there's an RNG involved, making test vectors will require controlling the RNG. This implementation takes a generic RNG, but the Go implementation doesn't, using rand.Rng
internally.
A quick glance at cpace_test.go
suggests that there's some kind of trickery involving defer to override the RNG for test purposes. Maybe something like that could be used for test vectors.
Yep, TestTranscript contains a vector that should be possible for you to match.
You can also make interop tests by using a recording of the Go side as a peer.
There should be test vectors that compare with @filosottile's implementation: https://github.com/FiloSottile/go-cpace-ristretto255