]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost3410.pyi
34.10-2012 VKO implementation and remove X.509-compatibility helpers
[pygost.git] / pygost / stubs / pygost / gost3410.pyi
index 9151e994e009b287ceabc9cfa275a3615b8549e7..aacb9ab04df00b34a833503a1cb58e7fd36fd11f 100644 (file)
@@ -3,6 +3,7 @@ from typing import Tuple
 
 
 CURVE_PARAMS = ...  # type: Dict[str, Tuple[bytes, bytes, bytes, bytes, bytes, bytes]]
+PublicKey = Tuple[int, int]
 
 
 class GOST3410Curve(object):
@@ -20,20 +21,9 @@ class GOST3410Curve(object):
     def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
 
 
-PublicKey = Tuple[int, int]
-
-
 def public_key(curve: GOST3410Curve, private_key: int) -> PublicKey: ...
 
 
-def kek(
-    curve: GOST3410Curve,
-    private_key: int,
-    ukm: bytes,
-    pubkey: PublicKey,
-) -> bytes: ...
-
-
 def sign(
     curve: GOST3410Curve,
     private_key: int,
@@ -50,3 +40,12 @@ def verify(
     signature: bytes,
     size: int=...,
 ) -> bool: ...
+
+
+def prv_unmarshal(private_key: bytes) -> int: ...
+
+
+def pub_marshal(pub: PublicKey, mode: int) -> bytes: ...
+
+
+def pub_unmarshal(pub: bytes, mode: int) -> PublicKey: ...