]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3410_vko.py
Raise copyright years
[pygost.git] / pygost / gost3410_vko.py
index 6650ca5607633375c26fef4c2314e97e8589eb38..ba489d6acb7bb3e1e64818d9b954487e4c516d38 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2018 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
 #
 # 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
@@ -60,7 +60,7 @@ def kek_34102001(curve, prv, pub, ukm):
     ).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):