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 wrap: on
line diff
--- a/viff/paillier.py	Tue Sep 29 14:19:43 2009 +0200
+++ b/viff/paillier.py	Tue Sep 29 14:56:57 2009 +0200
@@ -99,6 +99,9 @@
 
         results = []
         for peer_id in inputters:
+            # Unique program counter per input.
+            self.increment_pc()
+
             if peer_id == self.id:
                 a = field(rand.randint(0, field.modulus - 1))
                 b = number - a
--- a/viff/passive.py	Tue Sep 29 14:19:43 2009 +0200
+++ b/viff/passive.py	Tue Sep 29 14:56:57 2009 +0200
@@ -525,6 +525,9 @@
 
         results = []
         for peer_id in inputters:
+            # Unique program counter per input.
+            self.increment_pc()
+
             if peer_id == self.id:
                 pc = tuple(self.program_counter)
                 shares = shamir.share(field(number), threshold,