viff

changeset 1379:a084a491dff7

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.
author Marcel Keller <mkeller@cs.au.dk>
date Wed, 04 Nov 2009 12:26:18 +0100
parents 57b5234df725
children a466288e9280
files viff/passive.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/viff/passive.py	Mon Nov 02 13:45:36 2009 +0100
     1.2 +++ b/viff/passive.py	Wed Nov 04 12:26:18 2009 +0100
     1.3 @@ -250,6 +250,15 @@
     1.4          starting program counter. This ensures that consequetive calls
     1.5          to PRSS-related methods will use unique program counters.
     1.6          """
     1.7 +
     1.8 +        # This is called by every function using PRSS, so do it here.
     1.9 +        # If the assertion is not met, things go wrong, i.e. the PRSS
    1.10 +        # functions generate shares with higher degrees than what
    1.11 +        # open() and mul() expect.
    1.12 +        assert self.threshold >= \
    1.13 +               len(self.players) - len(self.players[self.id].keys.keys()[0]), \
    1.14 +               "PRSS functions have higher threshold than the runtime."
    1.15 +
    1.16          self.increment_pc()
    1.17          return tuple(self.program_counter)
    1.18