/rev/c12e4a568741
changeset: 1347:c12e4a568741
user: Janus Dam Nielsen <[email protected]>
date: Tue Oct 27 19:25:33 2009 +0100
summary: Orlandi:Use increment_pc() instead of incrementing the pc directly.
diffstat:
viff/orlandi.py | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (84 lines):
diff -r e72cd064566d -r c12e4a568741 viff/orlandi.py
--- a/viff/orlandi.py Tue Oct 27 19:08:30 2009 +0100
+++ b/viff/orlandi.py Tue Oct 27 19:25:33 2009 +0100
@@ -166,7 +166,7 @@
assert number is None or self.id in inputters
self.threshold = self.num_players - 1
- self.program_counter[-1] += 1
+ self.increment_pc()
def additive_shares_with_rho(x):
"""Returns a tuple of a list of tuples (player id, share,
@@ -245,7 +245,7 @@
field = share.field
- self.program_counter[-1] += 1
+ self.increment_pc()
def recombine_value(shares, Cx):
x = 0
@@ -305,7 +305,7 @@
Party ``P_i sets [r]_i = (r_i, rho_ri, C_r)``.
"""
- self.program_counter[-1] += 1
+ self.increment_pc()
# P_i chooses at random r_i, rho_ri in Z_p x (Z_p)^2
ri = field(rand.randint(0, field.modulus - 1))
@@ -435,7 +435,7 @@
# TODO: Communitcation costs?
assert (self.id in inputters and number is not None) or (self.id not
in inputters)
- self.program_counter[-1] += 1
+ self.increment_pc()
results = []
def hack(_, peer_id):
@@ -494,7 +494,7 @@
assert isinstance(share_x, Share) or isinstance(share_y, Share), \
"At least one of share_x and share_y must be a Share."
- self.program_counter[-1] += 1
+ self.increment_pc()
field = getattr(share_x, "field", getattr(share_y, "field", None))
@@ -615,7 +615,7 @@
assert isinstance(share_x, Share) or isinstance(share_y, Share), \
"At least one of share_x and share_y must be a Share."
- self.program_counter[-1] += 1
+ self.increment_pc()
field = getattr(share_x, "field", getattr(share_y, "field", None))
n = field(0)
@@ -696,7 +696,7 @@
assert isinstance(share_x, Share) or isinstance(share_y, Share), \
"At least one of share_x and share_y must be a Share."
- self.program_counter[-1] += 1
+ self.increment_pc()
field = getattr(share_x, "field", getattr(share_y, "field", None))
n = field(0)
@@ -820,7 +820,7 @@
``[b_i] = (b_i, s_i, B)``, and ``[c_i] = (c_i, t_i, C)``.
"""
- self.program_counter[-1] += 1
+ self.increment_pc()
def random_number(p):
return field(rand.randint(0, p - 1))
@@ -1027,7 +1027,7 @@
The triple ``(a, b, c)`` is secure in the Fcrs-hybrid model.
"""
- self.program_counter[-1] += 1
+ self.increment_pc()
M = []
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk