secure_inner_join.player module
Code for the abstract player class to implement parties performing secure set intersection
- class secure_inner_join.player.Player(identifier, pool, data_parties=('alice', 'bob'), helper='henri')[source]
Bases:
ABC
Class for a player
- __init__(identifier, pool, data_parties=('alice', 'bob'), helper='henri')[source]
Initializes the database owner
- Parameters:
identifier (
str
) – identifier of the player, either Alice or Bob or Henripool (
Pool
) – instance of tno.mpc.communication.Pooldata_parties (
Tuple
[str
,str
]) – identifiers of the data_partieshelper (
str
) – identifier of the helper
- static create_logger(name)[source]
Create logger for class
- Parameters:
name (
str
) – name of the logger- Return type:
Logger
- Returns:
logger object
- property data_parties: Tuple[str, str]
The identifiers of the data parties
- Returns:
the identifiers of the data parties
- property helper: str
The identifier of the helper player
- Returns:
the identifier of the helper
- property identifier: str
The identifier of this player
- Returns:
the identifier
- abstract property intersection_size: int
Should return the size of the intersection between the identifier columns of the data parties
- Returns:
the intersection size
- property party_alice: str
The identifier that is used to identify the first party (Alice)
- Returns:
the identifier of the first party
- property party_bob: str
The identifier that is used to identify the second party (Bob)
- Returns:
the identifier of the second party
- async receive_message(party, msg_id=None)[source]
Receive a message from party with msg_id
- Parameters:
party (
str
) – party to receive message frommsg_id (
Optional
[str
]) – optional identifier for the message
- Return type:
Any
- Returns:
the received message contents