viff

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 diff
     1.1 --- a/viff/test/bedoza/util.py	Tue Sep 28 15:47:40 2010 +0200
     1.2 +++ b/viff/test/bedoza/util.py	Thu Sep 30 10:16:01 2010 +0200
     1.3 @@ -34,6 +34,11 @@
     1.4  
     1.5      runtime_class = BeDOZaRuntime
     1.6  
     1.7 +    # In production, paillier keys should be something like 2000
     1.8 +    # bit. For test purposes, it is ok to use small keys.
     1.9 +    # TODO: paillier freezes if key size is too small, e.g. 13.
    1.10 +    paillier_key_size = 250
    1.11 +
    1.12      def setUp(self):
    1.13          RuntimeTestCase.setUp(self)
    1.14          self.security_parameter = 32
    1.15 @@ -41,10 +46,8 @@
    1.16      # TODO: During test, we would like generation of Paillier keys to
    1.17      # be deterministic. How do we obtain that?
    1.18      def generate_configs(self, *args):
    1.19 -        # In production, paillier keys should be something like 2000
    1.20 -        # bit. For test purposes, it is ok to use small keys.
    1.21 -        # TODO: paillier freezes if key size is too small, e.g. 13.
    1.22 -        return generate_configs(paillier=NaClPaillier(100), *args)
    1.23 +        return generate_configs(
    1.24 +            paillier=NaClPaillier(self.paillier_key_size), *args)
    1.25  
    1.26  
    1.27  def skip_if_missing_packages(*test_cases):