viff

changeset 841:3f01e81fcc1a

Benchmark support for Paillier runtime.
author Martin Geisler <mg@daimi.au.dk>
date Sun, 29 Jun 2008 13:59:32 +0200
parents f7e987afbec3
children 0e9ab27bf855
files apps/benchmark.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Sun Jun 29 13:59:30 2008 +0200
     1.2 +++ b/apps/benchmark.py	Sun Jun 29 13:59:32 2008 +0200
     1.3 @@ -65,6 +65,7 @@
     1.4  from viff.runtime import Runtime, ActiveRuntime, create_runtime, gather_shares
     1.5  from viff.comparison import Toft05Runtime, Toft07Runtime
     1.6  from viff.comparison import ActiveToft05Runtime, ActiveToft07Runtime
     1.7 +from viff.paillier import PaillierRuntime
     1.8  from viff.config import load_config
     1.9  from viff.util import find_prime
    1.10  
    1.11 @@ -94,7 +95,7 @@
    1.12                    help="number of operations")
    1.13  parser.add_option("-o", "--operation", type="choice",
    1.14                    choices=["mul", "mul-active", "comp", "comp-active",
    1.15 -                           "compII", "compII-active"],
    1.16 +                           "compII", "compII-active", "mul-paillier"],
    1.17                    help=("operation to benchmark, one of 'mul', 'mul-active', "
    1.18                          "'comp', 'comp-active', 'compII', 'compII-active'"))
    1.19  parser.add_option("-p", "--parallel", action="store_true",
    1.20 @@ -251,6 +252,9 @@
    1.21  elif options.operation == "compII-active":
    1.22      operation = operator.ge
    1.23      runtime_class = ActiveToft07Runtime
    1.24 +elif options.operation == "mul-paillier":
    1.25 +    operation = operator.mul
    1.26 +    runtime_class = PaillierRuntime
    1.27  
    1.28  if options.parallel:
    1.29      benchmark = ParallelBenchmark