]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/kdf.py
Remove excess mode kwargs from gost3410* functions
[pygost.git] / pygost / kdf.py
index 73d716fb1e420b8fe061735ce907a216c7d12b23..3f355a7069bc4b7f37d3371dca7110f5ffeb66b5 100644 (file)
@@ -61,7 +61,7 @@ def kdf_tree_gostr3411_2012_256(key, label, seed, keys, i_len=1):
     return keymat
 
 
-def keg(curve, prv, pub, h, mode=2001):
+def keg(curve, prv, pub, h):
     """Export key generation (Р 1323565.1.020-2018)
 
     :param GOST3410Curve curve: curve to use
@@ -75,7 +75,7 @@ def keg(curve, prv, pub, h, mode=2001):
     ukm = bytes2long(h[:16])
     if ukm == 0:
         ukm = 1
-    if mode == 2012:
+    if curve.point_size == 64:
         return kek_34102012512(curve, prv, pub, ukm)
-    k_exp = kek_34102012256(curve, prv, pub, ukm, mode=2001)
+    k_exp = kek_34102012256(curve, prv, pub, ukm)
     return b"".join(kdf_tree_gostr3411_2012_256(k_exp, b"kdf tree", h[16:24], 2))