protocol

In tf-encrypted, a protocol represents a certain type of cryptographic protocol to achieve security.

The goal is to allow you to easily play with or use different cryptographic methods by simply changing the protocol.

import tf_encrypted as tfe

tfe.set_protocol(tfe.protocol.SecureNN())
tfe.set_protocol(tfe.protocol.Pond())
class tf_encrypted.protocol.protocol.Protocol[source]

Protocol is the base class that other protocols in tf-encrypted will extend from.

Do not directly instantiate this class. You should use a subclass instead, such as SecureNN or Pond

tf_encrypted.protocol.protocol.get_protocol() → Protocol or None[source]

Returns the current global protocol.

tf_encrypted.protocol.protocol.global_caches_updater() → tensorflow.Operation[source]

Groups all ops that have been instantiated with a memoize decoratored function into a single tf.Operation.

tf_encrypted.protocol.protocol.memoize(func) → Callable[source]

Decorates a function for memoization, which explicitly caches the function’s output.

Parameters:func (Callable) – The function to memoize
tf_encrypted.protocol.protocol.set_protocol(prot)[source]

Sets the global protocol. E.g. SecureNN or Pond.

Parameters:prot (Protocol) – An instance of a tfe protocol.