viff-devel | 4 Nov 12:44
Picon
Favicon

viff: prss: Fixed bug in PRSS zero sharing.

/rev/6d2179a15b42
changeset: 1381:6d2179a15b42
user:      Marcel Keller <mkeller <at> cs.au.dk>
date:      Wed Nov 04 12:43:18 2009 +0100
summary:   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.

diffstat:

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

diffs (13 lines):

diff -r a466288e9280 -r 6d2179a15b42 viff/prss.py
--- 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)]
(Continue reading)

viff-devel | 4 Nov 12:44
Picon
Favicon

viff: apps/aes: Determine the threshold from PRSS keys in the co...

/rev/a466288e9280
changeset: 1380:a466288e9280
user:      Marcel Keller <mkeller <at> cs.au.dk>
date:      Wed Nov 04 12:28:53 2009 +0100
summary:   apps/aes: Determine the threshold from PRSS keys in the config file.

diffstat:

 apps/aes.py |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r a084a491dff7 -r a466288e9280 apps/aes.py
--- a/apps/aes.py	Wed Nov 04 12:26:18 2009 +0100
+++ b/apps/aes.py	Wed Nov 04 12:28:53 2009 +0100
@@ -23,6 +23,7 @@
 import time
 from optparse import OptionParser
 from pprint import pformat
+import sys

 import viff.reactor
 viff.reactor.install()
@@ -178,7 +179,13 @@
     from viff.passive import PassiveRuntime
     runtime_class = PassiveRuntime

-rt = create_runtime(id, players, 1, options, runtime_class)
+try:
(Continue reading)

viff-devel | 4 Nov 12:44
Picon
Favicon

viff: passive: Check threshold of PRSS functions against runtime.

/rev/a084a491dff7
changeset: 1379:a084a491dff7
user:      Marcel Keller <mkeller <at> cs.au.dk>
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 >= \
(Continue reading)

viff-devel | 2 Nov 13:46
Picon
Favicon

viff: benchmark: better argument name

/rev/98059854fc52
changeset: 1376:98059854fc52
user:      Martin Geisler <mg <at> cs.au.dk>
date:      Tue Oct 27 15:32:47 2009 +0100
summary:   benchmark: better argument name

diffstat:

 apps/benchutil.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 3f6c65d4c9c1 -r 98059854fc52 apps/benchutil.py
--- a/apps/benchutil.py	Tue Oct 27 14:54:54 2009 +0100
+++ b/apps/benchutil.py	Tue Oct 27 15:32:47 2009 +0100
@@ -80,11 +80,11 @@
         self.rt.schedule_callback(d, self.finished, termination_function)
         return d

-    def sync_test(self, x):
+    def sync_test(self, preprocessed_data):
         print "Synchronizing test start."
         sys.stdout.flush()
         sync = self.rt.synchronize()
-        self.rt.schedule_callback(sync, lambda y: x)
+        self.rt.schedule_callback(sync, lambda _: preprocessed_data)
         return sync

     def run_test(self, _):
(Continue reading)

viff-devel | 2 Nov 13:46
Picon
Favicon

viff: Merged.

/rev/57b5234df725
changeset: 1378:57b5234df725
user:      Martin Geisler <mg <at> cs.au.dk>
date:      Mon Nov 02 13:45:36 2009 +0100
summary:   Merged.

diffstat:

 apps/benchmark.py |  6 ++++--
 apps/benchutil.py |  4 ++--
 viff/runtime.py   |  8 +++++---
 3 files changed, 11 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r 8144c02c12f6 -r 57b5234df725 apps/benchmark.py
--- a/apps/benchmark.py	Fri Oct 30 12:23:46 2009 +0100
+++ b/apps/benchmark.py	Mon Nov 02 13:45:36 2009 +0100
@@ -87,8 +87,10 @@
 last_timestamp = time.time()

 operations = {"mul"       : ("mul", [], BinaryOperation),
-              "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
-              "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
+              "compToft05": ("greater_than_equal",
+                             [ComparisonToft05Mixin], BinaryOperation),
+              "compToft07": ("greater_than_equal",
+                             [ComparisonToft07Mixin], BinaryOperation),
               "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
               "triple_gen": ("triple_gen", [], NullaryOperation)}
(Continue reading)

viff-devel | 2 Nov 13:46
Picon
Favicon

viff: benchmark: fix compToft05 and compToft07 benchmarks

/rev/3f6c65d4c9c1
changeset: 1375:3f6c65d4c9c1
user:      Martin Geisler <mg <at> cs.au.dk>
date:      Tue Oct 27 14:54:54 2009 +0100
summary:   benchmark: fix compToft05 and compToft07 benchmarks

diffstat:

 apps/benchmark.py |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 568f9c696979 -r 3f6c65d4c9c1 apps/benchmark.py
--- a/apps/benchmark.py	Tue Oct 27 11:43:37 2009 +0100
+++ b/apps/benchmark.py	Tue Oct 27 14:54:54 2009 +0100
@@ -87,8 +87,10 @@
 last_timestamp = time.time()

 operations = {"mul"       : ("mul", [], BinaryOperation),
-              "compToft05": ("ge", [ComparisonToft05Mixin], BinaryOperation),
-              "compToft07": ("ge", [ComparisonToft07Mixin], BinaryOperation),
+              "compToft05": ("greater_than_equal",
+                             [ComparisonToft05Mixin], BinaryOperation),
+              "compToft07": ("greater_than_equal",
+                             [ComparisonToft07Mixin], BinaryOperation),
               "eq"        : ("eq", [ProbabilisticEqualityMixin], BinaryOperation),
               "triple_gen": ("triple_gen", [], NullaryOperation)}
viff-devel | 2 Nov 13:46
Picon
Favicon

viff: runtime: correct base class order

/rev/73a79bf6c5d0
changeset: 1377:73a79bf6c5d0
user:      Martin Geisler <mg <at> cs.au.dk>
date:      Tue Oct 27 15:35:18 2009 +0100
summary:   runtime: correct base class order

diffstat:

 viff/runtime.py |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (20 lines):

diff -r 98059854fc52 -r 73a79bf6c5d0 viff/runtime.py
--- a/viff/runtime.py	Tue Oct 27 15:32:47 2009 +0100
+++ b/viff/runtime.py	Tue Oct 27 15:35:18 2009 +0100
@@ -947,10 +947,12 @@
     if mixins is None:
         return runtime_class
     else:
-        # We must include at least one new-style class in bases. We
-        # include it last to avoid overriding __init__ from the other
-        # base classes.
-        bases = (runtime_class,) + tuple(mixins) + (object,)
+        # The order is important: we want the most specific classes to
+        # go first so that they can override methods from later
+        # classes. We must also include at least one new-style class
+        # in bases -- we include it last to avoid overriding __init__
+        # from the other base classes.
+        bases = tuple(mixins) + (runtime_class, object)
(Continue reading)

viff-devel | 30 Oct 12:20
Picon
Favicon

viff: Orlandi: Increased timeout, and removed debug info.

/rev/8a4d4e8e99eb
changeset: 1373:8a4d4e8e99eb
user:      Janus Dam Nielsen <janus.nielsen <at> alexandra.dk>
date:      Fri Oct 30 12:22:46 2009 +0100
summary:   Orlandi: Increased timeout, and removed debug info.

diffstat:

 viff/test/test_orlandi_runtime.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 62c4034a06a3 -r 8a4d4e8e99eb viff/test/test_orlandi_runtime.py
--- a/viff/test/test_orlandi_runtime.py	Thu Oct 29 14:43:25 2009 +0100
+++ b/viff/test/test_orlandi_runtime.py	Fri Oct 30 12:22:46 2009 +0100
@@ -269,7 +269,7 @@

     runtime_class = OrlandiRuntime

-    timeout = 25
+    timeout = 700

     def generate_configs(self, *args):
         global keys
@@ -638,7 +638,6 @@

     def generate_configs(self, *args):
         global keys
-        print "AAA"
(Continue reading)

viff-devel | 30 Oct 12:20
Picon
Favicon

viff: Merged with Marcel.

/rev/8144c02c12f6
changeset: 1374:8144c02c12f6
user:      Janus Dam Nielsen <janus.nielsen <at> alexandra.dk>
date:      Fri Oct 30 12:23:46 2009 +0100
summary:   Merged with Marcel.

diffstat:

 viff/runtime.py |  11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diffs (28 lines):

diff -r 8a4d4e8e99eb -r 8144c02c12f6 viff/runtime.py
--- a/viff/runtime.py	Fri Oct 30 12:22:46 2009 +0100
+++ b/viff/runtime.py	Fri Oct 30 12:23:46 2009 +0100
@@ -804,14 +804,7 @@
         example of a method fulfilling this interface.
         """

-        def update(results, program_counters, start_time, count, what):
-            stop = time.time()
-
-            print
-            print "Total time used: %.3f sec" % (stop - start_time)
-            print "Time per %s operation: %.0f ms" % (what, 1000*(stop - start_time) / count)
-            print "*" * 6
-
+        def update(results, program_counters):
             # Update the pool with pairs of program counter and data.
(Continue reading)

viff-devel | 29 Oct 15:45
Picon
Favicon

viff: runtime: Removed timing output in preprocessing.

/rev/151d4f58ff49
changeset: 1372:151d4f58ff49
user:      Marcel Keller <mkeller <at> cs.au.dk>
date:      Thu Oct 29 15:42:26 2009 +0100
summary:   runtime: Removed timing output in preprocessing.

diffstat:

 viff/runtime.py |  11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diffs (28 lines):

diff -r 62c4034a06a3 -r 151d4f58ff49 viff/runtime.py
--- a/viff/runtime.py	Thu Oct 29 14:43:25 2009 +0100
+++ b/viff/runtime.py	Thu Oct 29 15:42:26 2009 +0100
@@ -804,14 +804,7 @@
         example of a method fulfilling this interface.
         """

-        def update(results, program_counters, start_time, count, what):
-            stop = time.time()
-
-            print
-            print "Total time used: %.3f sec" % (stop - start_time)
-            print "Time per %s operation: %.0f ms" % (what, 1000*(stop - start_time) / count)
-            print "*" * 6
-
+        def update(results, program_counters):
             # Update the pool with pairs of program counter and data.
(Continue reading)

viff-devel | 29 Oct 14:38
Picon
Favicon

viff: Orlandi: Fix Python 2.4 issue.

/rev/62c4034a06a3
changeset: 1371:62c4034a06a3
user:      Janus Dam Nielsen <janus.nielsen <at> alexandra.dk>
date:      Thu Oct 29 14:43:25 2009 +0100
summary:   Orlandi: Fix Python 2.4 issue.

diffstat:

 viff/test/test_orlandi_runtime.py |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r d93acdb61f34 -r 62c4034a06a3 viff/test/test_orlandi_runtime.py
--- a/viff/test/test_orlandi_runtime.py	Thu Oct 29 13:46:21 2009 +0100
+++ b/viff/test/test_orlandi_runtime.py	Thu Oct 29 14:43:25 2009 +0100
@@ -274,7 +274,7 @@
     def generate_configs(self, *args):
         global keys
         if not keys:
-            keys = generate_configs(*args, paillier=NaClPaillier(1024))
+            keys = generate_configs(paillier=NaClPaillier(1024), *args)
         return keys

 
@@ -638,8 +638,9 @@

     def generate_configs(self, *args):
         global keys
+        print "AAA"
(Continue reading)


Gmane