X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fstubs%2Fpygost%2Fgost3410.pyi;h=8f0dcb8e881d50089eb2029c7bdad2f62510f79f;hb=2e336566fbe3a603b5565142f5112880035be7f1;hp=4be8b1d63ecd13653a46cfac7271f56a342483f3;hpb=2bb1a163d32e4167e6904ff3c6b4cf64ea7287bb;p=pygost.git diff --git a/pygost/stubs/pygost/gost3410.pyi b/pygost/stubs/pygost/gost3410.pyi index 4be8b1d..8f0dcb8 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] @@ -18,6 +17,7 @@ class GOST3410Curve(object): cofactor = ... # type: int e = ... # type: int d = ... # type: int + name = ... # type: str def __init__( self, @@ -30,43 +30,40 @@ 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, - 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 prv_marshal(curve: GOST3410Curve, prv: 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]: ...