# HG changeset patch
# User Martin Geisler <[EMAIL PROTECTED]>
# Date 1214740772 -7200
# Node ID dfee3c416baca15c8842449cdd1e334d497f7c8b
# Parent  ec7b02cf09c6fd89325b55fe5314f33e5467751d
Benchmark support for Paillier runtime.

diff --git a/apps/benchmark.py b/apps/benchmark.py
--- a/apps/benchmark.py
+++ b/apps/benchmark.py
@@ -65,6 +65,7 @@
 from viff.runtime import Runtime, ActiveRuntime, create_runtime, gather_shares
 from viff.comparison import Toft05Runtime, Toft07Runtime
 from viff.comparison import ActiveToft05Runtime, ActiveToft07Runtime
+from viff.paillier import PaillierRuntime
 from viff.config import load_config
 from viff.util import find_prime
 
@@ -94,7 +95,7 @@
                   help="number of operations")
 parser.add_option("-o", "--operation", type="choice",
                   choices=["mul", "mul-active", "comp", "comp-active",
-                           "compII", "compII-active"],
+                           "compII", "compII-active", "mul-paillier"],
                   help=("operation to benchmark, one of 'mul', 'mul-active', "
                         "'comp', 'comp-active', 'compII', 'compII-active'"))
 parser.add_option("-p", "--parallel", action="store_true",
@@ -258,6 +259,9 @@
 elif options.operation == "compII-active":
     operation = operator.ge
     runtime_class = ActiveToft07Runtime
+elif options.operation == "mul-paillier":
+    operation = operator.mul
+    runtime_class = PaillierRuntime
 
 if options.parallel:
     benchmark = ParallelBenchmark
_______________________________________________
viff-patches mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-patches-viff.dk

Reply via email to