4
4
package nistec_test
5
5
6
6
import (
7
- "crypto/elliptic"
8
7
"testing"
8
+
9
+ "crypto/elliptic"
10
+ "crypto/internal/nistec"
9
11
)
10
12
11
13
func TestAllocations (t * testing.T ) {
@@ -31,7 +33,7 @@ func TestEquivalents(t *testing.T) {
31
33
}
32
34
33
35
//gopherjs:override-signature
34
- func testEquivalents (t * testing.T , newPoint , newGenerator func () WrappedPoint , c elliptic.Curve ) {}
36
+ func testEquivalents (t * testing.T , newPoint , newGenerator func () nistec. WrappedPoint , c elliptic.Curve )
35
37
36
38
func TestScalarMult (t * testing.T ) {
37
39
t .Run ("P224" , func (t * testing.T ) {
@@ -49,14 +51,14 @@ func TestScalarMult(t *testing.T) {
49
51
}
50
52
51
53
//gopherjs:override-signature
52
- func testScalarMult (t * testing.T , newPoint , newGenerator func () WrappedPoint , c elliptic.Curve )
54
+ func testScalarMult (t * testing.T , newPoint , newGenerator func () nistec. WrappedPoint , c elliptic.Curve )
53
55
54
56
func BenchmarkScalarMult (b * testing.B ) {
55
57
b .Run ("P224" , func (b * testing.B ) {
56
58
benchmarkScalarMult (b , nistec .NewP224WrappedGenerator (), 28 )
57
59
})
58
60
b .Run ("P256" , func (b * testing.B ) {
59
- benchmarkScalarMult (b , nistec .NewP256GWrappedenerator (), 32 )
61
+ benchmarkScalarMult (b , nistec .NewP256WrappedGenerator (), 32 )
60
62
})
61
63
b .Run ("P384" , func (b * testing.B ) {
62
64
benchmarkScalarMult (b , nistec .NewP384WrappedGenerator (), 48 )
@@ -67,11 +69,11 @@ func BenchmarkScalarMult(b *testing.B) {
67
69
}
68
70
69
71
//gopherjs:override-signature
70
- func benchmarkScalarMult (b * testing.B , p WrappedPoint , scalarSize int )
72
+ func benchmarkScalarMult (b * testing.B , p nistec. WrappedPoint , scalarSize int )
71
73
72
74
func BenchmarkScalarBaseMult (b * testing.B ) {
73
75
b .Run ("P224" , func (b * testing.B ) {
74
- benchmarkScalarBaseMult (b , nistec .NewP22Wrapped4Generator (), 28 )
76
+ benchmarkScalarBaseMult (b , nistec .NewP224WrappedGenerator (), 28 )
75
77
})
76
78
b .Run ("P256" , func (b * testing.B ) {
77
79
benchmarkScalarBaseMult (b , nistec .NewP256WrappedGenerator (), 32 )
@@ -80,9 +82,9 @@ func BenchmarkScalarBaseMult(b *testing.B) {
80
82
benchmarkScalarBaseMult (b , nistec .NewP384WrappedGenerator (), 48 )
81
83
})
82
84
b .Run ("P521" , func (b * testing.B ) {
83
- benchmarkScalarBaseMult (b , nistec .NewP521GWrappedenerator (), 66 )
85
+ benchmarkScalarBaseMult (b , nistec .NewP521WrappedGenerator (), 66 )
84
86
})
85
87
}
86
88
87
89
//gopherjs:override-signature
88
- func benchmarkScalarBaseMult (b * testing.B , p WrappedPoint , scalarSize int )
90
+ func benchmarkScalarBaseMult (b * testing.B , p nistec. WrappedPoint , scalarSize int )
0 commit comments