Functions for loading and saving player configurations. Each player participating in a protocol execution must know some information about the other players, namely their hostname and port number. The player also needs to know something about itself, namely the keys used for pseudo-random secret sharing (PRSS).
The Player class encapsulates this information. Generating a player configuration is done using the generate_configs() function. The generate_config_files.py script uses that function to generate a player config and save it in a number of .ini files. Such a .ini file can be loaded with the load_config() function.
Wrapper for information about a player in the protocol.
Retrieve dealer PRSS PRFs.
The pseudo-random functions are used when this player is the dealer in a pseudo-random secret sharing.
Return a mapping from player subsets to viff.prss.PRF instances.
Generate player configurations.
Generates n configuration objects with a threshold of t. The addresses is an optional list of (host, port) pairs and prefix is a filename prefix. One can avoid generating keys for PRSS by setting skip_prss to True. This is useful when the number of players is large.
The configurations are returned as ConfigObj instances and can be saved to disk if desired.
Returns a mapping from player ID to player configuration.
Load a player configuration file.
Configuration files are simple INI-files containing information (hostname and port number) about the other players in the protocol.
One of the players own the config file and for this player additional information on PRSS keys is available.
Returns the owner ID and a mapping of player IDs to Player instances.