]> wagner.pp.ru Git - openssl-gost/engine.git/log
openssl-gost/engine.git
5 years agoMigrate test framework to Test2
Alexander Bokovoy [Thu, 4 Oct 2018 07:23:44 +0000 (10:23 +0300)]
Migrate test framework to Test2

At least Fedora 30 will have no Test::More anymore. Test::More is
deprecated, as well as Test::Stream and Test2 is a recommended
replacement.

Luckily, gost-engine's use of Test::More is limited to functions which
are compatible with implementations in Test2, so only module import and
test plan announcement need to change.

Also, on Fedora 29 perl 5.28 is very picky on undefined variables.

5 years agoMerge pull request #120 from vt-alt/test_engine
Dmitry Belyavskiy [Sat, 16 Feb 2019 07:56:29 +0000 (10:56 +0300)]
Merge pull request #120 from vt-alt/test_engine

tests: Load just built engine from the output directory

5 years agotests: Load just built engine from the output directory 120/head
Vitaly Chikunov [Fri, 15 Feb 2019 19:18:08 +0000 (22:18 +0300)]
tests: Load just built engine from the output directory

Define ENGINE_DIR for all binary tests. Instead of auto-loading engine
using `example.conf' load it directly from the OUTPUT_DIRECTORY for
curves tests.

5 years agoClang options
Dmitry Belyavskiy [Fri, 15 Feb 2019 18:09:08 +0000 (21:09 +0300)]
Clang options

5 years agoMerge pull request #119 from vt-alt/lrt
Dmitry Belyavskiy [Fri, 8 Feb 2019 18:13:27 +0000 (21:13 +0300)]
Merge pull request #119 from vt-alt/lrt

cmake: benchmark/sign - link with rt for clock_gettime when needed

5 years agocmake: benchmark/sign - link with rt for clock_gettime when needed 119/head
Vitaly Chikunov [Fri, 8 Feb 2019 18:02:31 +0000 (21:02 +0300)]
cmake: benchmark/sign - link with rt for clock_gettime when needed

Test if clock_gettime() requires linking with -lrt and link sign
benchmark with rt if needed. clock_gettime() requires -lrt only for
glibc versions before 2.17.

5 years agort library for clock_gettime
Dmitry Belyavskiy [Thu, 7 Feb 2019 09:23:04 +0000 (12:23 +0300)]
rt library for clock_gettime

5 years agoMerge pull request #117 from vt-alt/asan
Dmitry Belyavskiy [Sun, 3 Feb 2019 10:32:57 +0000 (13:32 +0300)]
Merge pull request #117 from vt-alt/asan

travis: Enable ASan build

5 years agotravis: Enable ASan build 117/head
Vitaly Chikunov [Sun, 3 Feb 2019 10:15:40 +0000 (13:15 +0300)]
travis: Enable ASan build

5 years agoMerge pull request #115 from vt-alt/leak
Dmitry Belyavskiy [Sat, 2 Feb 2019 18:11:36 +0000 (21:11 +0300)]
Merge pull request #115 from vt-alt/leak

Fix leaks in tests

5 years agoFix memory leaks in the tests 115/head
Vitaly Chikunov [Sat, 2 Feb 2019 16:39:57 +0000 (19:39 +0300)]
Fix memory leaks in the tests

In preparation for memory leak detector fix them in the tests.

5 years agotest_curves: Fix forgotten comparison in test
Vitaly Chikunov [Sat, 2 Feb 2019 16:41:27 +0000 (19:41 +0300)]
test_curves: Fix forgotten comparison in test

5 years agoMerge branch 'master' of https://github.com/gost-engine/engine
Dmitry Belyavskiy [Thu, 31 Jan 2019 17:39:56 +0000 (20:39 +0300)]
Merge branch 'master' of https://github.com/gost-engine/engine

5 years agoFix to #110
Dmitry Belyavskiy [Thu, 31 Jan 2019 17:38:48 +0000 (20:38 +0300)]
Fix to #110

5 years agoMerge pull request #111 from vt-alt/check
Dmitry Belyavskiy [Wed, 30 Jan 2019 14:02:21 +0000 (17:02 +0300)]
Merge pull request #111 from vt-alt/check

Implement EVP_PKEY_{,public_}check

5 years agoImplement EVP_PKEY_{,public_}check 111/head
Vitaly Chikunov [Wed, 30 Jan 2019 13:02:53 +0000 (16:02 +0300)]
Implement EVP_PKEY_{,public_}check

Very simple redirect to EC_KEY_check_key() which is doing all basic
checks (see crypto/ec/ec_key.c:ec_key_simple_check_key()).

5 years agoMerge pull request #109 from vt-alt/test_params2
Dmitry Belyavskiy [Mon, 28 Jan 2019 13:22:51 +0000 (16:22 +0300)]
Merge pull request #109 from vt-alt/test_params2

 test_params: remove calls to internall API and add more tests

5 years agotest_params: additional tests 109/head
Vitaly Chikunov [Sun, 27 Jan 2019 00:42:15 +0000 (03:42 +0300)]
test_params: additional tests

- Manually verify cert using EVP_Verify API. (In addition to
X509_verify).
- Add test using EVP_DigestVerifyInit API for raw vectors.

5 years agoMerge pull request #108 from vt-alt/perl
Dmitry Belyavskiy [Mon, 28 Jan 2019 13:05:08 +0000 (16:05 +0300)]
Merge pull request #108 from vt-alt/perl

run_tests: pass OPENSSL_ROOT_DIR into perl tests

5 years agoMerge pull request #107 from vt-alt/travis
Dmitry Belyavskiy [Mon, 28 Jan 2019 13:04:31 +0000 (16:04 +0300)]
Merge pull request #107 from vt-alt/travis

travis: speed up Travis build

5 years agoMerge pull request #106 from vt-alt/test_sign
Dmitry Belyavskiy [Mon, 28 Jan 2019 13:03:36 +0000 (16:03 +0300)]
Merge pull request #106 from vt-alt/test_sign

Sign/Verify and tests for all curves

5 years agotest_params: Avoid calls to fill_GOST_EC_params and bind_gost
Vitaly Chikunov [Sat, 26 Jan 2019 23:15:00 +0000 (02:15 +0300)]
test_params: Avoid calls to fill_GOST_EC_params and bind_gost

Use external API to generate key with parameters instead of calling
fill_GOST_EC_params(). Use OPENSSL_CONF trick like in test_sign to avoid
calling bind_gost(). Reverting 1716316de77 ("Export bind_gost to allow
local engine init") as not needed anymore.

5 years agoEnable benchmark for all curves 106/head
Vitaly Chikunov [Thu, 24 Jan 2019 03:24:43 +0000 (06:24 +0300)]
Enable benchmark for all curves

5 years agotest_sign: Sign/Verify tests for all curves
Vitaly Chikunov [Wed, 23 Jan 2019 05:16:33 +0000 (08:16 +0300)]
test_sign: Sign/Verify tests for all curves

Currently, not all curves are tested, but only these that are fully
implemented, to test all curves run `test_sign` with any argument.

5 years agoAllow key creation using TC26 (2012) parameters
Vitaly Chikunov [Thu, 24 Jan 2019 01:32:28 +0000 (04:32 +0300)]
Allow key creation using TC26 (2012) parameters

1323565.1.023-2018 forbids encoding hash oid into TC26 (2012)
parameters in AlgorithmIdentifier, so this is removed.

New "paramset" names for 256-bit TC26 parameters: TCA, TCB, TCC, TCD,
for 512-bit parameter: C.

Using these new OIDs for gost2012_256:
  NID_id_tc26_gost_3410_2012_256_paramSetA = TCA
  NID_id_tc26_gost_3410_2012_256_paramSetB = TCB
  NID_id_tc26_gost_3410_2012_256_paramSetC = TCC
  NID_id_tc26_gost_3410_2012_256_paramSetD = TCD
for gost2012_512:
  NID_id_tc26_gost_3410_2012_512_paramSetC = C

Resolves #84.

5 years agorun_tests: pass OPENSSL_ROOT_DIR into perl tests 108/head
Vitaly Chikunov [Thu, 24 Jan 2019 03:59:39 +0000 (06:59 +0300)]
run_tests: pass OPENSSL_ROOT_DIR into perl tests

If OPENSSL_ROOT_DIR is specified pass it to the perl tests, and set its
value as LD_LIBRARY_PATH, if unset. This allows to run tests for custom
openssl build without manually setting proper env.

5 years agotravis: speed up Travis build 107/head
Vitaly Chikunov [Wed, 23 Jan 2019 23:58:10 +0000 (02:58 +0300)]
travis: speed up Travis build

Do shallow clone of openssl, make parallel on all available cpus (2).

5 years agotest_curves: test all allowed GOST 34.10 curves
Vitaly Chikunov [Wed, 23 Jan 2019 03:01:00 +0000 (06:01 +0300)]
test_curves: test all allowed GOST 34.10 curves

Enable test for 2001 curves since they are allowed and add TC26
aliases for 256-bit curves.

5 years agoMerge pull request #105 from vt-alt/test_params
Dmitry Belyavskiy [Mon, 21 Jan 2019 18:28:06 +0000 (21:28 +0300)]
Merge pull request #105 from vt-alt/test_params

Test signature verify for different parameters

5 years agotravis: make 'make test' verbose on failure 105/head
Vitaly Chikunov [Mon, 21 Jan 2019 06:26:15 +0000 (09:26 +0300)]
travis: make 'make test' verbose on failure

5 years agoec_sign: map tc26-2012 256-bit parameters to cp-2001 parameters
Vitaly Chikunov [Mon, 21 Jan 2019 05:36:04 +0000 (08:36 +0300)]
ec_sign: map tc26-2012 256-bit parameters to cp-2001 parameters

This will make at least signature verification work.

5 years agoasn1: make hash_params optional
Vitaly Chikunov [Mon, 21 Jan 2019 05:15:19 +0000 (08:15 +0300)]
asn1: make hash_params optional

1323565.1.023-2018 defines in the `parameters' for
`AlgorithmIdentifier' field `digestParamSet' is optional.

5 years agotest_params: signature verify tests for different curves
Vitaly Chikunov [Mon, 21 Jan 2019 08:53:11 +0000 (11:53 +0300)]
test_params: signature verify tests for different curves

Interoperability with third party software.

5 years agoExport bind_gost to allow local engine init
Vitaly Chikunov [Mon, 21 Jan 2019 08:46:56 +0000 (11:46 +0300)]
Export bind_gost to allow local engine init

Look at `test_params.c` for example.

5 years agoFix DEBUG_SIGN
Vitaly Chikunov [Mon, 21 Jan 2019 08:52:10 +0000 (11:52 +0300)]
Fix DEBUG_SIGN

5 years agoSome PVS Studio nits
Dmitry Belyavskiy [Sat, 29 Dec 2018 12:01:32 +0000 (15:01 +0300)]
Some PVS Studio nits

5 years agoMerge branch 'master' of https://github.com/gost-engine/engine
Dmitry Belyavskiy [Fri, 28 Dec 2018 10:12:37 +0000 (13:12 +0300)]
Merge branch 'master' of https://github.com/gost-engine/engine

5 years agoAcceptance tests of TLSTREE ctrl
Dmitry Belyavskiy [Fri, 28 Dec 2018 10:11:48 +0000 (13:11 +0300)]
Acceptance tests of TLSTREE ctrl

5 years agoBugfix: iv should be adjusted before tlstree
Dmitry Belyavskiy [Fri, 28 Dec 2018 10:11:01 +0000 (13:11 +0300)]
Bugfix: iv should be adjusted before tlstree

5 years agoMerge pull request #103 from UndefBehavior/edw_paramsets
Dmitry Belyavskiy [Fri, 28 Dec 2018 08:22:28 +0000 (11:22 +0300)]
Merge pull request #103 from UndefBehavior/edw_paramsets

Replace orders of groups with orders of cyclic subgroups

5 years agoReplace orders of groups with orders of cyclic subgroups 103/head
Dmitry Meshkov [Thu, 27 Dec 2018 10:03:13 +0000 (13:03 +0300)]
Replace orders of groups with orders of cyclic subgroups

According to OpenSSL documentation EC_GROUP's member named order contains the cardinality of cyclic subgroup. Some paramsets contain cardinalities of elliptic curves' groups.

5 years agoBugfix of seq decrement
Dmitry Belyavskiy [Thu, 27 Dec 2018 23:34:46 +0000 (02:34 +0300)]
Bugfix of seq decrement

5 years agoCryptoPro compatibility
Dmitry Belyavskiy [Thu, 27 Dec 2018 17:39:35 +0000 (20:39 +0300)]
CryptoPro compatibility

5 years agoMerge pull request #101 from vt-alt/master
Dmitry Belyavskiy [Thu, 27 Dec 2018 07:30:30 +0000 (10:30 +0300)]
Merge pull request #101 from vt-alt/master

benchmark: Extend sign/verify benchmark.

5 years agoTypo
Dmitry Belyavskiy [Tue, 25 Dec 2018 15:25:16 +0000 (18:25 +0300)]
Typo

5 years agoAvoid memory leak
Dmitry Belyavskiy [Tue, 25 Dec 2018 15:18:59 +0000 (18:18 +0300)]
Avoid memory leak

5 years agoAvoid double-free, restore ephemeral mode self-compatibility
Dmitry Belyavskiy [Tue, 25 Dec 2018 13:34:24 +0000 (16:34 +0300)]
Avoid double-free, restore ephemeral mode self-compatibility

5 years agoNon-ephemeral sec_key, more on TLS 1.2, remove extra params from VKO
Dmitry Belyavskiy [Tue, 25 Dec 2018 10:39:59 +0000 (13:39 +0300)]
Non-ephemeral sec_key, more on TLS 1.2, remove extra params from VKO

5 years agobenchmark: Extend sign/verify benchmark. 101/head
Vitaly Chikunov [Mon, 24 Dec 2018 14:02:29 +0000 (17:02 +0300)]
benchmark: Extend sign/verify benchmark.

- Cycle through all supported parameters.
- Also do verification tests.
- Increase precision of timer (allow test to work faster).

5 years agoAs "openssl speed" does not support GOST parameters,
Dmitry Belyavskiy [Mon, 24 Dec 2018 09:25:29 +0000 (12:25 +0300)]
As "openssl speed" does not support GOST parameters,
benchmark is done separately.

5 years agoMerge pull request #100 from vt-alt/master
Dmitry Belyavskiy [Sat, 22 Dec 2018 11:48:16 +0000 (14:48 +0300)]
Merge pull request #100 from vt-alt/master

Split and integrate tests

5 years agoMove tests from gost89.c into test_gost89.c. 100/head
Vitaly Chikunov [Fri, 21 Dec 2018 17:56:35 +0000 (20:56 +0300)]
Move tests from gost89.c into test_gost89.c.

5 years agoMake keyexpimp independent test.
Vitaly Chikunov [Fri, 21 Dec 2018 17:47:08 +0000 (20:47 +0300)]
Make keyexpimp independent test.

Move test code from gost_keyexpimp.c into separate test_keyexpimp.c and
link into test target.

Also, make tests work without requiring config.

5 years agoErrors adjusted
Dmitry Belyavskiy [Tue, 18 Dec 2018 12:07:28 +0000 (15:07 +0300)]
Errors adjusted

5 years agoNew master API versioning.
Dmitry Belyavskiy [Thu, 6 Dec 2018 16:03:22 +0000 (19:03 +0300)]
New master API versioning.

6 years agoGOST md aliases
Dmitry Belyavskiy [Sun, 18 Nov 2018 12:06:43 +0000 (15:06 +0300)]
GOST md aliases

6 years agoMerge branch 'master' of https://github.com/gost-engine/engine
Dmitry Belyavskiy [Sun, 18 Nov 2018 11:07:04 +0000 (14:07 +0300)]
Merge branch 'master' of https://github.com/gost-engine/engine

6 years agoMerge pull request #95 from mojoman/master
Dmitry Belyavskiy [Sun, 11 Nov 2018 11:24:55 +0000 (14:24 +0300)]
Merge pull request #95 from mojoman/master

Add LICENSE file to satisfy the lawyer in you

6 years agoAdd LICENSE file to satisfy the lawyer in you 95/head
Wartan Hachaturow [Thu, 8 Nov 2018 06:53:52 +0000 (09:53 +0300)]
Add LICENSE file to satisfy the lawyer in you

6 years agoMerge pull request #94 from candrews/cmake-improvements
Dmitry Belyavskiy [Tue, 30 Oct 2018 18:45:22 +0000 (21:45 +0300)]
Merge pull request #94 from candrews/cmake-improvements

Cmake improvements

6 years agoSupport out-of-source building and have Travis do it 94/head
Craig Andrews [Tue, 30 Oct 2018 01:29:30 +0000 (21:29 -0400)]
Support out-of-source building and have Travis do it

6 years agoDiscover OpenSSL engines directory
Craig Andrews [Tue, 30 Oct 2018 00:41:12 +0000 (20:41 -0400)]
Discover OpenSSL engines directory

The directory can be overriden by setting the CMake variable OPENSSL_ENGINES_DIR

6 years agoUse `make test` to run tests 93/head
Craig Andrews [Mon, 29 Oct 2018 19:48:21 +0000 (15:48 -0400)]
Use `make test` to run tests

CMakeLists.txt uses `add_test` to execute `test/run_tests` which does the same thing as the `prove` line did.

6 years agoMake it compileable
Dmitry Belyavskiy [Fri, 12 Oct 2018 19:31:31 +0000 (22:31 +0300)]
Make it compileable

6 years agoInitial commit
Dmitry Belyavskiy [Fri, 12 Oct 2018 18:28:07 +0000 (21:28 +0300)]
Initial commit
GOST 28147-89 test suite from
https://github.com/openssl/openssl/blob/26906f2d93ad4bc092b8b5783d1b35f8c9f0c6d8/engines/ccgost/gost2814789t.c
WIP

6 years agoMerge branch 'master' of https://github.com/gost-engine/engine
Dmitry Belyavskiy [Tue, 2 Oct 2018 07:28:54 +0000 (10:28 +0300)]
Merge branch 'master' of https://github.com/gost-engine/engine

6 years agoLink to page related to GOST crypto in Open Source projects
Dmitry Belyavskiy [Tue, 2 Oct 2018 07:28:00 +0000 (10:28 +0300)]
Link to page related to GOST crypto in Open Source projects

6 years agoMerge pull request #86 from vt-alt/curves
Dmitry Belyavskiy [Thu, 20 Sep 2018 08:09:35 +0000 (11:09 +0300)]
Merge pull request #86 from vt-alt/curves

Test to validate curve parameters

6 years agoUpdated MAC size
Dmitry Belyavskiy [Wed, 19 Sep 2018 14:31:32 +0000 (17:31 +0300)]
Updated MAC size

6 years agoResult check
Dmitry Belyavskiy [Wed, 19 Sep 2018 14:30:44 +0000 (17:30 +0300)]
Result check

6 years agoFormatting
Dmitry Belyavskiy [Wed, 19 Sep 2018 10:43:29 +0000 (13:43 +0300)]
Formatting

6 years agoTLSTREE ctrl
Dmitry Belyavskiy [Wed, 19 Sep 2018 10:31:04 +0000 (13:31 +0300)]
TLSTREE ctrl

6 years agoTODO
Dmitry Belyavskiy [Wed, 19 Sep 2018 10:26:23 +0000 (13:26 +0300)]
TODO

6 years agoTLSTREE - OMAC processing, not tested.
Dmitry Belyavskiy [Tue, 18 Sep 2018 13:58:07 +0000 (16:58 +0300)]
TLSTREE - OMAC processing, not tested.

6 years agoTLSTREE examples for Grasshopper
Dmitry Belyavskiy [Tue, 18 Sep 2018 13:45:22 +0000 (16:45 +0300)]
TLSTREE examples for Grasshopper

6 years agoAdd more GOST R 34.10-2012 parameters 86/head
Vitaly Chikunov [Sun, 16 Sep 2018 04:58:08 +0000 (07:58 +0300)]
Add more GOST R 34.10-2012 parameters

NID_id_tc26_gost_3410_2012_256_paramSetA
NID_id_tc26_gost_3410_2012_512_paramSetC

6 years agoAdd basic tests for curves parameters
Vitaly Chikunov [Sun, 16 Sep 2018 04:23:31 +0000 (07:23 +0300)]
Add basic tests for curves parameters

6 years agoMerge pull request #85 from vt-alt/in-places
Dmitry Belyavskiy [Sat, 15 Sep 2018 13:18:05 +0000 (16:18 +0300)]
Merge pull request #85 from vt-alt/in-places

test_context: make tests return values affect overall test result

6 years agotest_context: make tests return values affect overall test result 85/head
Vitaly Chikunov [Sat, 15 Sep 2018 01:22:00 +0000 (04:22 +0300)]
test_context: make tests return values affect overall test result

6 years agoMerge pull request #83 from vt-alt/in-places
Dmitry Belyavskiy [Thu, 13 Sep 2018 07:59:03 +0000 (10:59 +0300)]
Merge pull request #83 from vt-alt/in-places

In-place encryption tests and fixes

6 years agoAdd test_context to test context copy 83/head
Vitaly Chikunov [Thu, 13 Sep 2018 03:48:56 +0000 (06:48 +0300)]
Add test_context to test context copy

Currently, for Grasshopper only.

6 years agoFix in-place decryption for CBC mode
Vitaly Chikunov [Thu, 13 Sep 2018 00:26:19 +0000 (03:26 +0300)]
Fix in-place decryption for CBC mode

6 years agoIn-place cipher tests
Vitaly Chikunov [Wed, 12 Sep 2018 22:41:30 +0000 (01:41 +0300)]
In-place cipher tests

6 years agoDefault size of imitovstavka adjusted
Dmitry Belyavskiy [Tue, 11 Sep 2018 12:49:59 +0000 (15:49 +0300)]
Default size of imitovstavka adjusted

6 years agoFixed in-place encryption for CTR and CTR-ACPKM modes
Dmitry Belyavskiy [Tue, 11 Sep 2018 10:11:29 +0000 (13:11 +0300)]
Fixed in-place encryption for CTR and CTR-ACPKM modes

6 years agoFormatting
Dmitry Belyavskiy [Tue, 11 Sep 2018 09:28:40 +0000 (12:28 +0300)]
Formatting

6 years agoFormatting
Dmitry Belyavskiy [Tue, 11 Sep 2018 09:27:19 +0000 (12:27 +0300)]
Formatting

6 years agoRemove unused functions
Dmitry Belyavskiy [Tue, 11 Sep 2018 08:55:47 +0000 (11:55 +0300)]
Remove unused functions

6 years agoWe should get key nid from our private key, not from peer's ephemeral
Dmitry Belyavskiy [Fri, 7 Sep 2018 12:59:06 +0000 (15:59 +0300)]
We should get key nid from our private key, not from peer's ephemeral

6 years agoMissing NID
Dmitry Belyavskiy [Fri, 7 Sep 2018 12:48:20 +0000 (15:48 +0300)]
Missing NID

6 years agoMake Travis more happy
Dmitry Belyavskiy [Thu, 6 Sep 2018 15:36:53 +0000 (18:36 +0300)]
Make Travis more happy

6 years agoTemporary FIXME to make engine kuznyuechik-omac friendly.
Dmitry Belyavskiy [Thu, 6 Sep 2018 15:22:44 +0000 (18:22 +0300)]
Temporary FIXME to make engine kuznyuechik-omac friendly.

6 years agoMkae kuznyechik recognizable by libssl
Dmitry Belyavskiy [Thu, 6 Sep 2018 14:51:57 +0000 (17:51 +0300)]
Mkae kuznyechik recognizable by libssl

6 years agoOne more TODO
Dmitry Belyavskiy [Thu, 6 Sep 2018 13:25:42 +0000 (16:25 +0300)]
One more TODO

6 years agoLet's wrap old and new key enncryption together
Dmitry Belyavskiy [Tue, 4 Sep 2018 14:02:57 +0000 (17:02 +0300)]
Let's wrap old and new key enncryption together

6 years agoUpdate comment to match reality
Dmitry Belyavskiy [Tue, 4 Sep 2018 13:32:48 +0000 (16:32 +0300)]
Update comment to match reality

6 years agoGOST key transport 2018 - decrypt as separate function
Dmitry Belyavskiy [Tue, 4 Sep 2018 13:10:01 +0000 (16:10 +0300)]
GOST key transport 2018 - decrypt as separate function

6 years agoGOST key export, separate function
Dmitry Belyavskiy [Tue, 4 Sep 2018 11:41:01 +0000 (14:41 +0300)]
GOST key export, separate function

6 years agoASN1 definitions
Dmitry Belyavskiy [Tue, 4 Sep 2018 08:38:32 +0000 (11:38 +0300)]
ASN1 definitions

6 years agoMerge pull request #82 from vt-alt/fix
Dmitry Belyavskiy [Mon, 3 Sep 2018 18:30:40 +0000 (21:30 +0300)]
Merge pull request #82 from vt-alt/fix

Sanity checking in gost_grasshopper_cipher_cleanup