]> Cypherpunks.ru repositories - gogost.git/blobdiff - src/cypherpunks.ru/gogost/gost3410/vko2012_test.go
Forbid any later GNU GPL versions autousage
[gogost.git] / src / cypherpunks.ru / gogost / gost3410 / vko2012_test.go
index 2515ec8643d91c59dbbd17c2417b1f7345f59f74..4fcffd8c1cba99e1c6b4afe183f0cd1d86a248c0 100644 (file)
@@ -3,8 +3,7 @@
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
+// the Free Software Foundation, version 3 of the License.
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,7 +23,7 @@ import (
 )
 
 func TestVKO2012256(t *testing.T) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        ukmRaw, _ := hex.DecodeString("1d80603c8544c727")
        ukm := NewUKM(ukmRaw)
        prvRawA, _ := hex.DecodeString("c990ecd972fce84ec4db022778f50fcac726f46708384b8d458304962d7147f8c2db41cef22c90b102f2968404f9b9be6d47c79692d81826b32b8daca43cb667")
@@ -47,7 +46,7 @@ func TestVKO2012256(t *testing.T) {
 }
 
 func TestRandomVKO2012256(t *testing.T) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        f := func(prvRaw1 [64]byte, prvRaw2 [64]byte, ukmRaw [8]byte) bool {
                prv1, err := NewPrivateKey(c, Mode2012, prvRaw1[:])
                if err != nil {
@@ -70,7 +69,7 @@ func TestRandomVKO2012256(t *testing.T) {
 }
 
 func TestVKO2012512(t *testing.T) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        ukmRaw, _ := hex.DecodeString("1d80603c8544c727")
        ukm := NewUKM(ukmRaw)
        prvRawA, _ := hex.DecodeString("c990ecd972fce84ec4db022778f50fcac726f46708384b8d458304962d7147f8c2db41cef22c90b102f2968404f9b9be6d47c79692d81826b32b8daca43cb667")
@@ -93,7 +92,7 @@ func TestVKO2012512(t *testing.T) {
 }
 
 func TestRandomVKO2012512(t *testing.T) {
-       c, _ := NewCurveFromParams(CurveParamsGostR34102012TC26ParamSetA)
+       c := CurveIdtc26gost341012512paramSetA()
        f := func(prvRaw1 [64]byte, prvRaw2 [64]byte, ukmRaw [8]byte) bool {
                prv1, err := NewPrivateKey(c, Mode2012, prvRaw1[:])
                if err != nil {