viff

changeset 923:560a15b4b360

Added equality to benchmark.
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 17 Sep 2008 14:39:55 +0200
parents 71428d0f7888
children 77ab7ee29e4c
files apps/benchmark.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Wed Sep 17 14:39:55 2008 +0200
     1.2 +++ b/apps/benchmark.py	Wed Sep 17 14:39:55 2008 +0200
     1.3 @@ -67,6 +67,7 @@
     1.4  from viff.active import BasicActiveRuntime, \
     1.5      TriplesHyperinvertibleMatricesMixin, TriplesPRSSMixin
     1.6  from viff.comparison import ComparisonToft05Mixin, ComparisonToft07Mixin
     1.7 +from viff.equality import ProbabilisticEqualityMixin
     1.8  from viff.paillier import PaillierRuntime
     1.9  from viff.config import load_config
    1.10  from viff.util import find_prime
    1.11 @@ -90,7 +91,7 @@
    1.12      print "*" * 6
    1.13  
    1.14  
    1.15 -operations = ["mul", "compToft05", "compToft07"]
    1.16 +operations = ["mul", "compToft05", "compToft07", "eq"]
    1.17  
    1.18  parser = OptionParser()
    1.19  parser.add_option("-m", "--modulus",
    1.20 @@ -268,6 +269,9 @@
    1.21      elif options.operation == "compToft07":
    1.22          operation = operator.ge
    1.23          mixins.append(ComparisonToft07Mixin)
    1.24 +    elif options.operation == "eq":
    1.25 +        operation = operator.eq
    1.26 +        mixins.append(ProbabilisticEqualityMixin)
    1.27  
    1.28  print "Using the base runtime: %s." % base_runtime_class
    1.29  print "With the following mixins:"