X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fgost3410_vko.py;h=eebaf4a7ceeffeba26a1bfc8c88d10338131665e;hb=0fcc8bc147ada51d2a9a912f18ac362d54b7d49a;hp=14ad8167a8367c012e6285261e8bf1ea30389af3;hpb=3792990da210024fb097e1dd96afdf5e13318066;p=pygost.git diff --git a/pygost/gost3410_vko.py b/pygost/gost3410_vko.py index 14ad816..eebaf4a 100644 --- a/pygost/gost3410_vko.py +++ b/pygost/gost3410_vko.py @@ -1,6 +1,6 @@ # coding: utf-8 # PyGOST -- Pure Python GOST cryptographic functions library -# Copyright (C) 2015-2016 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 @@ -56,11 +56,11 @@ def kek_34102001(curve, prv, pub, ukm): """ return GOST341194( kek(curve, prv, pub, ukm, mode=2001), - "GostR3411_94_CryptoProParamSet", + "id-GostR3411-94-CryptoProParamSet", ).digest() -def kek_34102012256(curve, prv, pub, ukm=1): +def kek_34102012256(curve, prv, pub, ukm=1, mode=2012): """ Key agreement (34.10-2012, 34.11-2012 256 bit) :param GOST3410Curve curve: curve to use @@ -74,7 +74,7 @@ def kek_34102012256(curve, prv, pub, ukm=1): Shared Key Encryption Key computation is based on :rfc:`7836` VKO GOST R 34.10-2012. """ - return GOST34112012256(kek(curve, prv, pub, ukm, mode=2012)).digest() + return GOST34112012256(kek(curve, prv, pub, ukm, mode=mode)).digest() def kek_34102012512(curve, prv, pub, ukm=1):