changeset 1533:4e8c0035e894

BeDOZa: Select random numbers from the full range in add_macs.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Tue, 10 Aug 2010 11:35:52 +0200
parents efbdd25601b8
children 315e1117928a
files viff/bedoza/add_macs.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/viff/bedoza/add_macs.py	Tue Aug 10 11:31:33 2010 +0200
+++ b/viff/bedoza/add_macs.py	Tue Aug 10 11:35:52 2010 +0200
@@ -65,10 +65,8 @@
                 # TODO: This is probably not the fastes way to generate
                 # the betas.
                 beta = random.randint(0, u_bound)
-                # TODO: Outcommented until mod paillier works for negative
-                #       numbers.
-                # if rand.choice([True, False]):
-                #    beta = -beta
+                if random.choice([True, False]):
+                    beta = -beta
                 enc_beta = paillier.encrypt(beta, player_id = j + 1)
                 c_j = partial_share_content.enc_shares[ j ]
                 n2 = paillier.get_modulus_square( j + 1 )