viff

changeset 1348:0fa9c0cad8eb

Orlandi:Remove self.threshold.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Tue, 27 Oct 2009 19:44:41 +0100
parents c12e4a568741
children aa7eb230e042
files viff/orlandi.py
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/viff/orlandi.py	Tue Oct 27 19:25:33 2009 +0100
     1.2 +++ b/viff/orlandi.py	Tue Oct 27 19:44:41 2009 +0100
     1.3 @@ -112,8 +112,8 @@
     1.4              delta.append(product(j))
     1.5          return delta
     1.6  
     1.7 -    def output(self, share, receivers=None, threshold=None):
     1.8 -        return self.open(share, receivers, threshold)
     1.9 +    def output(self, share, receivers=None):
    1.10 +        return self.open(share, receivers)
    1.11  
    1.12      def _send_orlandi_share(self, other_id, pc, xi, rhoi, Cx):
    1.13          """Send the share *xi*, *rhoi*, and the commitment *Cx* to
    1.14 @@ -150,7 +150,7 @@
    1.15          sls.addCallbacks(combine, self.error_handler)
    1.16          return sls
    1.17  
    1.18 -    def secret_share(self, inputters, field, number=None, threshold=None):
    1.19 +    def secret_share(self, inputters, field, number=None):
    1.20          """Share the value *number* among all the parties using
    1.21          additive sharing.
    1.22  
    1.23 @@ -164,7 +164,6 @@
    1.24          Send ``[x]_i = (x_i, rho_xi, C_x)`` to party ``P_i``.
    1.25          """
    1.26          assert number is None or self.id in inputters
    1.27 -        self.threshold = self.num_players - 1
    1.28  
    1.29          self.increment_pc()
    1.30  
    1.31 @@ -226,7 +225,7 @@
    1.32              return results[0]
    1.33          return results
    1.34  
    1.35 -    def open(self, share, receivers=None, threshold=None):
    1.36 +    def open(self, share, receivers=None):
    1.37          """Share reconstruction.
    1.38  
    1.39          Every partyi broadcasts a share pair ``(x_i', rho_x,i')``.
    1.40 @@ -240,8 +239,6 @@
    1.41          # all players receive result by default
    1.42          if receivers is None:
    1.43              receivers = self.players.keys()
    1.44 -        assert threshold is None
    1.45 -        threshold = self.num_players - 1
    1.46  
    1.47          field = share.field
    1.48  
    1.49 @@ -407,7 +404,7 @@
    1.50          result.addCallbacks(compute_subs, self.error_handler)
    1.51          return result
    1.52  
    1.53 -    def input(self, inputters, field, number=None, threshold=None):
    1.54 +    def input(self, inputters, field, number=None):
    1.55          """Input *number* to the computation.
    1.56  
    1.57          The input is shared using the :meth:`shift` method.