changeset 1561:0e4476f175bb

BeDOZa: Test case now parameterized over paillier key size.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Thu, 30 Sep 2010 10:16:01 +0200
parents 9d183f681a7c
children 421137efef93
files viff/test/bedoza/util.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/viff/test/bedoza/util.py	Tue Sep 28 15:47:40 2010 +0200
+++ b/viff/test/bedoza/util.py	Thu Sep 30 10:16:01 2010 +0200
@@ -34,6 +34,11 @@
 
     runtime_class = BeDOZaRuntime
 
+    # In production, paillier keys should be something like 2000
+    # bit. For test purposes, it is ok to use small keys.
+    # TODO: paillier freezes if key size is too small, e.g. 13.
+    paillier_key_size = 250
+
     def setUp(self):
         RuntimeTestCase.setUp(self)
         self.security_parameter = 32
@@ -41,10 +46,8 @@
     # TODO: During test, we would like generation of Paillier keys to
     # be deterministic. How do we obtain that?
     def generate_configs(self, *args):
-        # In production, paillier keys should be something like 2000
-        # bit. For test purposes, it is ok to use small keys.
-        # TODO: paillier freezes if key size is too small, e.g. 13.
-        return generate_configs(paillier=NaClPaillier(100), *args)
+        return generate_configs(
+            paillier=NaClPaillier(self.paillier_key_size), *args)
 
 
 def skip_if_missing_packages(*test_cases):