/rev/a084a491dff7
changeset: 1379:a084a491dff7
user:      Marcel Keller <[email protected]>
date:      Wed Nov 04 12:26:18 2009 +0100
summary:   passive: Check threshold of PRSS functions against runtime.

open() and mul() expect the threshold of shares to be at most the
threshold of the runtime, which is not true for shares generated by
PRSS functions with higher threshold.

diffstat:

 viff/passive.py |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 57b5234df725 -r a084a491dff7 viff/passive.py
--- a/viff/passive.py   Mon Nov 02 13:45:36 2009 +0100
+++ b/viff/passive.py   Wed Nov 04 12:26:18 2009 +0100
@@ -250,6 +250,15 @@
         starting program counter. This ensures that consequetive calls
         to PRSS-related methods will use unique program counters.
         """
+
+        # This is called by every function using PRSS, so do it here.
+        # If the assertion is not met, things go wrong, i.e. the PRSS
+        # functions generate shares with higher degrees than what
+        # open() and mul() expect.
+        assert self.threshold >= \
+               len(self.players) - len(self.players[self.id].keys.keys()[0]), \
+               "PRSS functions have higher threshold than the runtime."
+
         self.increment_pc()
         return tuple(self.program_counter)
 
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to