]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost3410.pyi
Use public key tuple as an argument for convenience
[pygost.git] / pygost / stubs / pygost / gost3410.pyi
index 9151e994e009b287ceabc9cfa275a3615b8549e7..84028df4b85912fbc0b3fd4424ab63b49905e490 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,
@@ -44,9 +34,17 @@ def sign(
 
 def verify(
     curve: GOST3410Curve,
-    pubkeyX: int,
-    pubkeyY: int,
+    pub: PublicKey,
     digest: bytes,
     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: ...