SecretSharing.pyi 820 B

1234567891011121314151617181920212223
  1. from typing import Union, List, Tuple, Optional
  2. def _mult_gf2(f1: int, f2: int) -> int : ...
  3. def _div_gf2(a: int, b: int) -> int : ...
  4. class _Element(object):
  5. irr_poly: int
  6. def __init__(self, encoded_value: Union[int, bytes]) -> None: ...
  7. def __eq__(self, other) -> bool: ...
  8. def __int__(self) -> int: ...
  9. def encode(self) -> bytes: ...
  10. def __mul__(self, factor: int) -> _Element: ...
  11. def __add__(self, term: _Element) -> _Element: ...
  12. def inverse(self) -> _Element: ...
  13. def __pow__(self, exponent) -> _Element: ...
  14. class Shamir(object):
  15. @staticmethod
  16. def split(k: int, n: int, secret: bytes, ssss: Optional[bool]) -> List[Tuple[int, bytes]]: ...
  17. @staticmethod
  18. def combine(shares: List[Tuple[int, bytes]], ssss: Optional[bool]) -> bytes: ...