@unnumbered News
@table @strong
+
+@anchor{Release 3.12}
+@item 3.12
+ @itemize
+ @item Added mode argument to @code{pygost.gost3410_vko.kek_34102012256},
+ because 256-bit private keys can be used with that algorithm too.
+ @end itemize
+
@anchor{Release 3.11}
@item 3.11
Fixed PEP247 typing stub with invalid hexdigest method.
@item 0.10
CryptoPro and GOST key wrapping, CryptoPro key meshing.
+
@end table
).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
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):
def kek_34102001(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int) -> bytes: ...
-def kek_34102012256(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int=...) -> bytes: ...
+def kek_34102012256(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int=..., mode: int=...) -> bytes: ...
def kek_34102012512(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int=...) -> bytes: ...