X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fstubs%2Fpygost%2Fgost3410.pyi;h=345a3e69f1d401c375796f60e4f4e34ae12f38c0;hb=9ab3b1d03f734f4aae28364f7a6c7c7c223b30a9;hp=66494455102d91c4fad69c1f773d451f72ef29a3;hpb=82af8726ef5d5e2752089a45750e56c9910398c7;p=pygost.git diff --git a/pygost/stubs/pygost/gost3410.pyi b/pygost/stubs/pygost/gost3410.pyi index 6649445..345a3e6 100644 --- a/pygost/stubs/pygost/gost3410.pyi +++ b/pygost/stubs/pygost/gost3410.pyi @@ -4,7 +4,6 @@ from typing import Tuple DEFAULT_CURVE = ... # type: GOST3410Curve CURVES = ... # type: Dict[str, GOST3410Curve] -MODE2SIZE = ... # type: Dict[int, int] PublicKey = Tuple[int, int] @@ -34,15 +33,20 @@ class GOST3410Curve(object): 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: ... @@ -51,6 +55,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: ...