viff

changeset 1444:0ca61834e8f8

Fixed parameters to be consistent with description.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Fri, 02 Jul 2010 10:21:13 +0200
parents d4732f3eea69
children 67def1bd577b
files viff/bedoza.py
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/viff/bedoza.py	Fri Jul 02 09:53:50 2010 +0200
     1.2 +++ b/viff/bedoza.py	Fri Jul 02 10:21:13 2010 +0200
     1.3 @@ -17,13 +17,19 @@
     1.4  
     1.5  """Full threshold actively secure runtime."""
     1.6  
     1.7 +from twisted.internet.defer import Deferred, gatherResults, succeed
     1.8 +
     1.9 +from viff.runtime import Runtime, Share
    1.10 +
    1.11 +from hash_broadcast import HashBroadcastMixin
    1.12 +
    1.13  class BeDOZaShare(Share):
    1.14      """A share in the BeDOZa runtime.
    1.15  
    1.16 -    A share in the BeDOZa runtime is a pair ``(x_i, Ks)`` of:
    1.17 +    A share in the BeDOZa runtime is a pair ``(x_i, keys)`` of:
    1.18  
    1.19      - A share of a number, ``x_i``
    1.20 -    - A n-tuple of keys, ``Ks``
    1.21 +    - A n-tuple of keys, ``keys``
    1.22  
    1.23      The :class:`Runtime` operates on shares, represented by this class.
    1.24      Shares are asynchronous in the sense that they promise to attain a
    1.25 @@ -36,11 +42,10 @@
    1.26      that runtime.
    1.27      """
    1.28  
    1.29 -    def __init__(self, runtime, field, value=None, rho=None, commitment=None):
    1.30 +    def __init__(self, runtime, field, value=None, keys=None):
    1.31          self.share = value
    1.32 -        self.rho = rho
    1.33 -        self.commitment = commitment
    1.34 -        Share.__init__(self, runtime, field, (value, rho, commitment))
    1.35 +        self.keys = keys
    1.36 +        Share.__init__(self, runtime, field, (value, keys))
    1.37  
    1.38  
    1.39  class BeDOZaRuntime(Runtime, HashBroadcastMixin):