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):
33 def pos(self, v: int) -> int: ...
35 def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
37 def st(self) -> Tuple[int, int]: ...
40 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
43 def sign(curve: GOST3410Curve, prv: int, digest: bytes, mode: int=...) -> bytes: ...
55 def prv_unmarshal(prv: bytes) -> int: ...
58 def pub_marshal(pub: PublicKey, mode: int=...) -> bytes: ...
61 def pub_unmarshal(pub: bytes, mode: int=...) -> PublicKey: ...
64 def uv2xy(curve: GOST3410Curve, u: int, v: int) -> Tuple[int, int]: ...
67 def xy2uv(curve: GOST3410Curve, x: int, y: int) -> Tuple[int, int]: ...