kaplan_meier.player module
Module implements the base player class.
- class kaplan_meier.player.MPCProtocolMetadata(data_parties=<factory>, _secfxp=None)[source]
 Bases:
objectThis 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:
objectThis 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
- 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 additively shared results of the homomorphic encryption part of the protocol.
- Return type:
 None
- async obtain_secret_sharing_factors()[source]
 Method to obtain Shamir secret sharings of factors needed in the secure computation of the log-rank statistic.
These factors are pre-computed by Alice, leveraging her locally available information.
- Return type:
 None
- async obtain_secret_sharings()[source]
 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()[source]
 Runs the Shamir secret sharing part of the protocol using the MPyC framework
- Return type:
 None
- async secure_multivariate_log_rank_test()[source]
 Computes the multivariate log rank statistics on the shares.
- Raises:
 ValueError – raised when there are no shares available yet
- Return type:
 None
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