]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost3410.pyi
Human readable curve name
[pygost.git] / pygost / stubs / pygost / gost3410.pyi
index 7f55fa9c2b9ba0fd83b1260ff516bd7e9ee89840..8f0dcb8e881d50089eb2029c7bdad2f62510f79f 100644 (file)
@@ -17,6 +17,7 @@ class GOST3410Curve(object):
     cofactor = ...  # type: int
     e = ...  # type: int
     d = ...  # type: int
+    name = ...  # type: str
 
     def __init__(
             self,
@@ -29,22 +30,25 @@ class GOST3410Curve(object):
             cofactor: int = 1,
             e: int = None,
             d: int = None,
+            name: str = None,
     ) -> None: ...
 
     def pos(self, v: int) -> int: ...
 
-    def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
+    def exp(self, degree: int, x: int = ..., y: int = ...) -> int: ...
 
     def st(self) -> Tuple[int, int]: ...
 
     @property
     def point_size(self) -> int: ...
 
+    def contains(self, point: Tuple[int, int]) -> bool: ...
+
 
 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
 
 
-def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes=None) -> bytes: ...
+def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes = None) -> bytes: ...
 
 
 def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes) -> bool: ...
@@ -53,6 +57,9 @@ def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes
 def prv_unmarshal(prv: bytes) -> int: ...
 
 
+def prv_marshal(curve: GOST3410Curve, prv: int) -> bytes: ...
+
+
 def pub_marshal(pub: PublicKey) -> bytes: ...