Package viff :: Module orlandi :: Class OrlandiShare
[hide private]
[frames] | no frames]

Class OrlandiShare

source code


A share in the Orlandi runtime.

A share in the Orlandi runtime is a 3-tuple ``(x_i, rho_i, Cr_i)`` of:

- A share of a number, ``x_i``
- A tuple of two random numbers, ``rho_i = (rho_i1, rho_i2)``
- A commitment to the number and the random numbers, ``Cr_i``

The :class:`Runtime` operates on shares, represented by this class.
Shares are asynchronous in the sense that they promise to attain a
value at some point in the future.

Shares overload the arithmetic operations so that ``x = a + b``
will create a new share *x*, which will eventually contain the
sum of *a* and *b*. Each share is associated with a
:class:`Runtime` and the arithmetic operations simply call back to
that runtime.

Instance Methods [hide private]
 
__init__(self, runtime, field, value=None, rho=None, commitment=None)
Initialize a share.
source code

Inherited from runtime.Share: __add__, __del__, __eq__, __ge__, __gt__, __le__, __lt__, __mul__, __neq__, __pow__, __radd__, __rmul__, __rsub__, __rxor__, __sub__, __xor__, clone, label, old_init

Inherited from twisted.internet.defer.Deferred: __repr__, __str__, addBoth, addCallback, addCallbacks, addErrback, callback, chainDeferred, errback, pause, setTimeout, unpause

Inherited from twisted.internet.defer.Deferred (private): _continue, _runCallbacks, _startRunCallbacks

Class Variables [hide private]

Inherited from twisted.internet.defer.Deferred: called, debug, paused, timeoutCall

Inherited from twisted.internet.defer.Deferred (private): _debugInfo

Method Details [hide private]

__init__(self, runtime, field, value=None, rho=None, commitment=None)
(Constructor)

source code 

Initialize a share.

If an initial value is given, it will be passed to callback right away.

Overrides: twisted.internet.defer.Deferred.__init__