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 wrap: on
line diff
--- a/apps/benchmark.py	Wed Sep 17 14:39:55 2008 +0200
+++ b/apps/benchmark.py	Wed Sep 17 14:39:55 2008 +0200
@@ -67,6 +67,7 @@
 from viff.active import BasicActiveRuntime, \
     TriplesHyperinvertibleMatricesMixin, TriplesPRSSMixin
 from viff.comparison import ComparisonToft05Mixin, ComparisonToft07Mixin
+from viff.equality import ProbabilisticEqualityMixin
 from viff.paillier import PaillierRuntime
 from viff.config import load_config
 from viff.util import find_prime
@@ -90,7 +91,7 @@
     print "*" * 6
 
 
-operations = ["mul", "compToft05", "compToft07"]
+operations = ["mul", "compToft05", "compToft07", "eq"]
 
 parser = OptionParser()
 parser.add_option("-m", "--modulus",
@@ -268,6 +269,9 @@
     elif options.operation == "compToft07":
         operation = operator.ge
         mixins.append(ComparisonToft07Mixin)
+    elif options.operation == "eq":
+        operation = operator.eq
+        mixins.append(ProbabilisticEqualityMixin)
 
 print "Using the base runtime: %s." % base_runtime_class
 print "With the following mixins:"