changeset 1381:6d2179a15b42

prss: Fixed bug in PRSS zero sharing. j**i was not be computed correctly if the field was GF256 and the threshold was higher than 1.
author Marcel Keller <mkeller@cs.au.dk>
date Wed, 04 Nov 2009 12:43:18 +0100
parents a466288e9280
children aac9e1798f87
files viff/prss.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/viff/prss.py	Wed Nov 04 12:28:53 2009 +0100
+++ b/viff/prss.py	Wed Nov 04 12:43:18 2009 +0100
@@ -201,6 +201,9 @@
     all = frozenset(range(1, n+1))
     modulus = field.modulus
 
+    # This is needed for correct exponentiation.
+    j = field(j)
+
     for subset, shares in rep_shares:
         try:
             f_in_j = _f_in_j_cache[(field, n, j, subset)]