# HG changeset patch
# User Martin Geisler <[EMAIL PROTECTED]>
# Date 1214740772 -7200
# Node ID a454120c508b622a005d0746253cd6f1927020f5
# Parent 1020d7a99606dec7875ff0f25d3e3c3d3d001d15
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