1 from typing import Dict
2 from typing import Tuple
5 DEFAULT_CURVE = ... # type: GOST3410Curve
6 CURVES = ... # type: Dict[str, GOST3410Curve]
7 MODE2SIZE = ... # type: Dict[int, int]
8 PublicKey = Tuple[int, int]
11 class GOST3410Curve(object):
18 cofactor = ... # type: int
35 def pos(self, v: int) -> int: ...
37 def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
39 def st(self) -> Tuple[int, int]: ...
42 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
45 def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes=None) -> bytes: ...
48 def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes) -> bool: ...
51 def prv_unmarshal(prv: bytes) -> int: ...
54 def pub_marshal(pub: PublicKey) -> bytes: ...
57 def pub_unmarshal(pub: bytes) -> PublicKey: ...
60 def uv2xy(curve: GOST3410Curve, u: int, v: int) -> Tuple[int, int]: ...
63 def xy2uv(curve: GOST3410Curve, x: int, y: int) -> Tuple[int, int]: ...