viff

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 diff
     1.1 --- a/viff/bedoza/add_macs.py	Tue Aug 10 11:31:33 2010 +0200
     1.2 +++ b/viff/bedoza/add_macs.py	Tue Aug 10 11:35:52 2010 +0200
     1.3 @@ -65,10 +65,8 @@
     1.4                  # TODO: This is probably not the fastes way to generate
     1.5                  # the betas.
     1.6                  beta = random.randint(0, u_bound)
     1.7 -                # TODO: Outcommented until mod paillier works for negative
     1.8 -                #       numbers.
     1.9 -                # if rand.choice([True, False]):
    1.10 -                #    beta = -beta
    1.11 +                if random.choice([True, False]):
    1.12 +                    beta = -beta
    1.13                  enc_beta = paillier.encrypt(beta, player_id = j + 1)
    1.14                  c_j = partial_share_content.enc_shares[ j ]
    1.15                  n2 = paillier.get_modulus_square( j + 1 )