mirror of https://github.com/gtank/ristretto255
Add test that the computed value encodes correctly
This commit is contained in:
parent
5140be0fdf
commit
4e51bef1ad
|
@ -153,6 +153,11 @@ func TestRistrettoSmallMultiplesTestVectors(t *testing.T) {
|
|||
if basepointMultiple.Equal(&decodedPoint) != 1 {
|
||||
t.Errorf("decoded small multiple %d * B is not %d * B", i, i)
|
||||
}
|
||||
computedEncoding := basepointMultiple.Encode(nil)
|
||||
if !bytes.Equal(encoding, computedEncoding) {
|
||||
t.Errorf("#%d: encoding computed value did not match", i)
|
||||
}
|
||||
|
||||
// Ensure basepointMultiple = i * B in the next iteration
|
||||
basepointMultiple.Add(&basepointMultiple, &ristrettoBasepoint)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue