Mercurial > 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 wrap: on
line diff
--- a/viff/orlandi.py Tue Oct 27 21:03:02 2009 +0100 +++ b/viff/orlandi.py Tue Oct 27 21:22:38 2009 +0100 @@ -200,16 +200,11 @@ shares, rho = additive_shares_with_rho(number) Cx = commitment.commit(number, rho[0].value, rho[1].value) # Distribute the shares - the_others = [] for other_id, xi, rhoi in shares: - if other_id == self.id: - results.append(OrlandiShare(self, field, xi, rhoi, Cx)) - else: - # Send ``xi``, ``rhoi``, and commitment - self._send_orlandi_share(other_id, pc, xi, rhoi, Cx) - else: - # Expect ``xi``, ``rhoi``, and commitment - results.append(self._expect_orlandi_share(peer_id, field)) + # Send ``xi``, ``rhoi``, and commitment + self._send_orlandi_share(other_id, pc, xi, rhoi, Cx) + # Expect ``xi``, ``rhoi``, and commitment + results.append(self._expect_orlandi_share(peer_id, field)) # do actual communication self.activate_reactor() # Unpack a singleton list.