]> Cypherpunks.ru repositories - gogost.git/blobdiff - src/cypherpunks.ru/gogost/gost3410/2012_test.go
Simplify 34.10 curve creation from parameters
[gogost.git] / src / cypherpunks.ru / gogost / gost3410 / 2012_test.go
index e724756dc6b469be31f22408a31d9a4d5e8bf92d..c2942dd630498ae04f2ee8fd0df69090536062d3 100644 (file)
@@ -175,7 +175,7 @@ func TestGCL3Vectors(t *testing.T) {
 }
 
 func TestRandom2012(t *testing.T) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        f := func(data [31]byte, digest [64]byte) bool {
                prv, err := NewPrivateKey(
                        c,
@@ -210,7 +210,7 @@ func TestRandom2012(t *testing.T) {
 }
 
 func BenchmarkSign2012(b *testing.B) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        prv, err := GenPrivateKey(c, Mode2012, rand.Reader)
        if err != nil {
                b.FailNow()
@@ -224,7 +224,7 @@ func BenchmarkSign2012(b *testing.B) {
 }
 
 func BenchmarkVerify2012(b *testing.B) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        prv, err := GenPrivateKey(c, Mode2012, rand.Reader)
        if err != nil {
                b.FailNow()