SecretSharing.pyi 674 B

1234567891011121314151617181920
  1. from typing import Union, List, Tuple
  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 __int__(self) -> int: ...
  8. def encode(self) -> bytes: ...
  9. def __mul__(self, factor: int) -> _Element: ...
  10. def __add__(self, term: _Element) -> _Element: ...
  11. def inverse(self) -> _Element: ...
  12. class Shamir(object):
  13. @staticmethod
  14. def split(k: int, n: int, secret: bytes) -> List[Tuple[int, bytes]]: ...
  15. @staticmethod
  16. def combine(shares: List[Tuple[int, bytes]]) -> bytes: ...