We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48c3b6a commit 5a940a1Copy full SHA for 5a940a1
ecc/goldilocks/point_test.go
@@ -15,6 +15,19 @@ func randomPoint() *goldilocks.Point {
15
return goldilocks.Curve{}.ScalarBaseMult(&k)
16
}
17
18
+func TestPoint(t *testing.T) {
19
+ c := goldilocks.Curve{}
20
+ t.Run("IsOnCurve(ok)", func(t *testing.T) {
21
+ goodGen := c.Generator()
22
+ test.CheckOk(c.IsOnCurve(goodGen), "valid point should pass", t)
23
+ })
24
+
25
+ t.Run("IsOnCurve(zero)", func(t *testing.T) {
26
+ var allZeros goldilocks.Point
27
+ test.CheckOk(!c.IsOnCurve(&allZeros), "invalid point should be detected", t)
28
29
+}
30
31
func TestPointAdd(t *testing.T) {
32
const testTimes = 1 << 10
33
var e goldilocks.Curve
0 commit comments