Pond¶
Pond is an implementation of the SPDZ algorithm for MPC.
-
class
tf_encrypted.protocol.pond.Pond(server_0: Optional[tf_encrypted.player.player.Player] = None, server_1: Optional[tf_encrypted.player.player.Player] = None, crypto_producer: Optional[tf_encrypted.player.player.Player] = None, tensor_factory: Optional[tf_encrypted.tensor.factory.AbstractFactory] = None, fixedpoint_config: Optional[tf_encrypted.tensor.fixed.FixedpointConfig] = None)[source]¶ -
define_private_variable(initial_value: Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, PondPublicTensor, PondPrivateTensor], apply_scaling: bool = True, name: Optional[str] = None, factory: Optional[tf_encrypted.tensor.factory.AbstractFactory] = None) → tf_encrypted.protocol.pond.PondPrivateVariable[source]¶ Define a private variable.
This will take the passed value and construct shares that will be split up between those involved in the computationself.
For example, in a two party architecture, this will split the value into two sets of shares and transfer them between each party in a secure manner.
-
define_public_variable(initial_value, apply_scaling: bool = True, name: Optional[str] = None, factory: Optional[tf_encrypted.tensor.factory.AbstractFactory] = None) → tf_encrypted.protocol.pond.PondPublicVariable[source]¶ Define a public variable.
This is like defining a variable in tensorflow except it creates one that can be used by the protocol.
For most cases, you can think of this as the same as the one from tensorflow and you don’t generally need to consider the difference.
For those curious, under the hood, the major difference is that this function will pin your data to a specific device which will be used to optimize the graph later on.
-