X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fstubs%2Fpygost%2Fgost3410.pyi;h=4be9bbbadbd77ccbd02e7381fa03e9a94e6cd999;hb=61d68bda6f6d7c39243701b5f647f62cc4d9d286;hp=f2071cc4f3040813443b00902fb809ed0b34b7ae;hpb=312c6b813adbf8a04253e3b1da28e02780c61d07;p=pygost.git diff --git a/pygost/stubs/pygost/gost3410.pyi b/pygost/stubs/pygost/gost3410.pyi index f2071cc..4be9bbb 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] @@ -15,6 +14,7 @@ class GOST3410Curve(object): b = ... # type: int x = ... # type: int y = ... # type: int + cofactor = ... # type: int e = ... # type: int d = ... # type: int @@ -26,39 +26,39 @@ class GOST3410Curve(object): b: int, x: int, y: int, + cofactor: int = 1, e: int = None, d: int = 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, mode: int=...) -> bytes: ... +def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes = None) -> bytes: ... -def verify( - curve: GOST3410Curve, - pub: PublicKey, - digest: bytes, - signature: bytes, - mode: int=..., -) -> bool: ... +def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes) -> bool: ... def prv_unmarshal(prv: bytes) -> int: ... -def pub_marshal(pub: PublicKey, mode: int=...) -> bytes: ... +def pub_marshal(pub: PublicKey) -> bytes: ... -def pub_unmarshal(pub: bytes, mode: int=...) -> PublicKey: ... +def pub_unmarshal(pub: bytes) -> PublicKey: ... def uv2xy(curve: GOST3410Curve, u: int, v: int) -> Tuple[int, int]: ...