X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgogost%2Fgost3410%2Fvko2012_test.go;h=006e9d6c2ac5b61f1afaccea17e9087b653946fa;hb=650711d1eae869487d96c4de9bb4c2f9c68ca5ca;hp=5ffe95245a54b383f08536f4f0f8b5a64dd4493c;hpb=d1cbfa307ebcb72b61f926dfdbc21175a3eec1a8;p=gogost.git diff --git a/src/cypherpunks.ru/gogost/gost3410/vko2012_test.go b/src/cypherpunks.ru/gogost/gost3410/vko2012_test.go index 5ffe952..006e9d6 100644 --- a/src/cypherpunks.ru/gogost/gost3410/vko2012_test.go +++ b/src/cypherpunks.ru/gogost/gost3410/vko2012_test.go @@ -1,5 +1,5 @@ // GoGOST -- Pure Go GOST cryptographic functions library -// Copyright (C) 2015-2018 Sergey Matveev +// Copyright (C) 2015-2019 Sergey Matveev // // 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 @@ -24,7 +24,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 +47,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 +70,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 +93,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 {