viff

changeset 1353:3f9b8ebb7de6

Orlandi:We can send to self.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Tue, 27 Oct 2009 21:22:38 +0100
parents f19dce86dc4d
children f0ef1b584a44
files viff/orlandi.py
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/viff/orlandi.py	Tue Oct 27 21:03:02 2009 +0100
     1.2 +++ b/viff/orlandi.py	Tue Oct 27 21:22:38 2009 +0100
     1.3 @@ -200,16 +200,11 @@
     1.4                  shares, rho = additive_shares_with_rho(number)
     1.5                  Cx = commitment.commit(number, rho[0].value, rho[1].value)
     1.6                  # Distribute the shares
     1.7 -                the_others = []
     1.8                  for other_id, xi, rhoi in shares:
     1.9 -                    if other_id == self.id:
    1.10 -                        results.append(OrlandiShare(self, field, xi, rhoi, Cx))
    1.11 -                    else:
    1.12 -                        # Send ``xi``, ``rhoi``, and commitment
    1.13 -                        self._send_orlandi_share(other_id, pc, xi, rhoi, Cx)
    1.14 -            else:
    1.15 -                # Expect ``xi``, ``rhoi``, and commitment
    1.16 -                results.append(self._expect_orlandi_share(peer_id, field))
    1.17 +                    # Send ``xi``, ``rhoi``, and commitment
    1.18 +                    self._send_orlandi_share(other_id, pc, xi, rhoi, Cx)
    1.19 +            # Expect ``xi``, ``rhoi``, and commitment
    1.20 +            results.append(self._expect_orlandi_share(peer_id, field))
    1.21          # do actual communication
    1.22          self.activate_reactor()
    1.23          # Unpack a singleton list.