kaplan_meier.player module¶
Module implements the base player class.
- class kaplan_meier.player.MPCProtocolMetadata(data_parties=<factory>, _secfxp=None)[source]¶
Bases:
object
This class contains some metadata that relates to the part of the protocol that relies on the MPyC framework.
- data_parties:
list
[Party
]¶
- property secfxp: type[SecureFixedPoint]¶
Type of SecureFixedPoint that we use throughout the protocol
- Returns:
SecureFixedPoint object
- Raises:
ValueError – raised when object has not yet been set
- data_parties:
- class kaplan_meier.player.Player(identifier, party_A='alice', party_B='bob', helper='helper')[source]¶
Bases:
object
This class is the base class for players
- __init__(identifier, party_A='alice', party_B='bob', helper='helper')[source]¶
Initializes player
- Parameters:
identifier (
str
) – (unique) name of the playerparty_A (
str
) – identifier of party Aliceparty_B (
str
) – identifier of party Bobhelper (
str
) – identifier of the helper party
Additive share used as an input for the Shamir secret sharing part of the protocol.
- Returns:
additive share
- Raises:
ValueError – raised when sharing is not set
- property data_parties: tuple[str, str]¶
The identifiers of data parties involved in the protocol
- Returns:
a collection of data parties
- property helper: str¶
The identifier of the helper party
- Returns:
the identifier of the helper party
- property identifier: str¶
Identifier of this instance
- Returns:
the identifier of this instance
Method to obtain Shamir secret sharings of the results of the homomorphic encryption part of the protocol.
- Return type:
None
- property party_A: str¶
The identifier of party Alice
- Returns:
the identifier of Alice
- property party_B: str¶
The identifier of party Bob
- Returns:
the identifier of Bob
- async run_mpyc_logrank_test()[source]¶
Runs the Shamir secret sharing part of the protocol using the MPyC framework
- Return type:
None