]> Cypherpunks.ru repositories - pygost.git/blob - pygost/stubs/pygost/gost3410.pyi
Missing DEFAULT_CURVE in stubs
[pygost.git] / pygost / stubs / pygost / gost3410.pyi
1 from typing import Dict
2 from typing import Tuple
3
4
5 DEFAULT_CURVE = ...  # type: str
6 CURVE_PARAMS = ...  # type: Dict[str, Tuple[bytes, bytes, bytes, bytes, bytes, bytes]]
7 PublicKey = Tuple[int, int]
8
9
10 class GOST3410Curve(object):
11     p = ...  # type: int
12     q = ...  # type: int
13     a = ...  # type: int
14     b = ...  # type: int
15     x = ...  # type: int
16     y = ...  # type: int
17
18     def __init__(
19         self, p: bytes, q: bytes, a: bytes, b: bytes, x: bytes, y: bytes
20     ) -> None: ...
21
22     def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
23
24
25 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
26
27
28 def sign(curve: GOST3410Curve, prv: int, digest: bytes, mode: int=...) -> bytes: ...
29
30
31 def verify(
32     curve: GOST3410Curve,
33     pub: PublicKey,
34     digest: bytes,
35     signature: bytes,
36     mode: int=...,
37 ) -> bool: ...
38
39
40 def prv_unmarshal(prv: bytes) -> int: ...
41
42
43 def pub_marshal(pub: PublicKey, mode: int=...) -> bytes: ...
44
45
46 def pub_unmarshal(pub: bytes, mode: int=...) -> PublicKey: ...