viff

changeset 1562:421137efef93

BeDOZa: Factored out parameter to common super class.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Thu, 30 Sep 2010 10:26:11 +0200
parents 0e4476f175bb
children cb568167b140
files viff/test/bedoza/test_bedoza_runtime.py viff/test/bedoza/test_bedoza_triple.py viff/test/bedoza/test_zero_knowledge.py viff/test/bedoza/util.py
diffstat 4 files changed, 2 insertions(+), 14 deletions(-) [+]
line diff
     1.1 --- a/viff/test/bedoza/test_bedoza_runtime.py	Thu Sep 30 10:16:01 2010 +0200
     1.2 +++ b/viff/test/bedoza/test_bedoza_runtime.py	Thu Sep 30 10:26:11 2010 +0200
     1.3 @@ -40,10 +40,6 @@
     1.4  
     1.5  
     1.6  class BeDOZaBasicCommandsTest(BeDOZaTestCase):
     1.7 -    """Test for basic commands."""
     1.8 -
     1.9 -    # Number of players.
    1.10 -    num_players = 3
    1.11  
    1.12      timeout = 3
    1.13  
     2.1 --- a/viff/test/bedoza/test_bedoza_triple.py	Thu Sep 30 10:16:01 2010 +0200
     2.2 +++ b/viff/test/bedoza/test_bedoza_triple.py	Thu Sep 30 10:26:11 2010 +0200
     2.3 @@ -49,7 +49,6 @@
     2.4  
     2.5  
     2.6  class DataTransferTest(BeDOZaTestCase):
     2.7 -    num_players = 3
     2.8  
     2.9      @protocol
    2.10      def test_convolute_int(self, runtime):
    2.11 @@ -80,7 +79,6 @@
    2.12  
    2.13  
    2.14  class ModifiedPaillierTest(BeDOZaTestCase):
    2.15 -    num_players = 3
    2.16  
    2.17      @protocol
    2.18      def test_modified_paillier_can_decrypt_encrypted_one(self, runtime):
    2.19 @@ -200,7 +198,6 @@
    2.20      return gen.generate_random_shares(n)
    2.21  
    2.22  class PartialShareGeneratorTest(BeDOZaTestCase):
    2.23 -    num_players = 3
    2.24   
    2.25      @protocol
    2.26      def test_shares_have_correct_type(self, runtime):
    2.27 @@ -271,7 +268,6 @@
    2.28          return shares
    2.29  
    2.30  class ShareGeneratorTest(BeDOZaTestCase):
    2.31 -    num_players = 3
    2.32  
    2.33      @protocol
    2.34      def test_encrypted_real_share_open_correctly(self, runtime):
    2.35 @@ -318,7 +314,6 @@
    2.36          return gather_shares(results)
    2.37  
    2.38  class AddMacsTest(BeDOZaTestCase): 
    2.39 -    num_players = 3
    2.40  
    2.41      timeout = 10
    2.42  
    2.43 @@ -384,7 +379,6 @@
    2.44  # 
    2.45  
    2.46  class TripleTest(BeDOZaTestCase): 
    2.47 -    num_players = 3
    2.48  
    2.49      timeout = 25
    2.50  
    2.51 @@ -435,7 +429,6 @@
    2.52          return d
    2.53  
    2.54  class MulTest(BeDOZaTestCase): 
    2.55 -    num_players = 3
    2.56  
    2.57      timeout = 10
    2.58          
    2.59 @@ -513,7 +506,6 @@
    2.60  
    2.61  
    2.62  class FullMulTest(BeDOZaTestCase): 
    2.63 -    num_players = 3
    2.64  
    2.65      timeout = 10
    2.66          
     3.1 --- a/viff/test/bedoza/test_zero_knowledge.py	Thu Sep 30 10:16:01 2010 +0200
     3.2 +++ b/viff/test/bedoza/test_zero_knowledge.py	Thu Sep 30 10:26:11 2010 +0200
     3.3 @@ -40,8 +40,6 @@
     3.4  
     3.5  class BeDOZaZeroKnowledgeTest(BeDOZaTestCase):
     3.6  
     3.7 -    num_players = 3
     3.8 -
     3.9      def test_zk_matrix_entries_are_correct(self):
    3.10          s, k, prover_id = 5, 1, 1
    3.11          c = [None] * s
     4.1 --- a/viff/test/bedoza/util.py	Thu Sep 30 10:16:01 2010 +0200
     4.2 +++ b/viff/test/bedoza/util.py	Thu Sep 30 10:26:11 2010 +0200
     4.3 @@ -32,6 +32,8 @@
     4.4  
     4.5  class BeDOZaTestCase(RuntimeTestCase):
     4.6  
     4.7 +    num_players = 3
     4.8 +
     4.9      runtime_class = BeDOZaRuntime
    4.10  
    4.11      # In production, paillier keys should be something like 2000