viff

changeset 1258:bd8cf1987411

Increment the program counter for every input.
author Marcel Keller <mkeller@cs.au.dk>
date Tue, 29 Sep 2009 14:56:57 +0200
parents 1754fd1e0d9f
children 547e9bc99d12
files viff/paillier.py viff/passive.py
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/viff/paillier.py	Tue Sep 29 14:19:43 2009 +0200
     1.2 +++ b/viff/paillier.py	Tue Sep 29 14:56:57 2009 +0200
     1.3 @@ -99,6 +99,9 @@
     1.4  
     1.5          results = []
     1.6          for peer_id in inputters:
     1.7 +            # Unique program counter per input.
     1.8 +            self.increment_pc()
     1.9 +
    1.10              if peer_id == self.id:
    1.11                  a = field(rand.randint(0, field.modulus - 1))
    1.12                  b = number - a
     2.1 --- a/viff/passive.py	Tue Sep 29 14:19:43 2009 +0200
     2.2 +++ b/viff/passive.py	Tue Sep 29 14:56:57 2009 +0200
     2.3 @@ -525,6 +525,9 @@
     2.4  
     2.5          results = []
     2.6          for peer_id in inputters:
     2.7 +            # Unique program counter per input.
     2.8 +            self.increment_pc()
     2.9 +
    2.10              if peer_id == self.id:
    2.11                  pc = tuple(self.program_counter)
    2.12                  shares = shamir.share(field(number), threshold,