예제 #1
0
 def test_one(self):
     model = ShortWeierstrassModel()
     coords = model.coordinates["projective"]
     scalarmult = {
         "cls": LTRMultiplier,
         "add": coords.formulas["add-1998-cmo"],
         "dbl": coords.formulas["dbl-1998-cmo"],
         "scl": None,
         "always": True,
         "complete": False,
         "short_circuit": True
     }
     configs = list(
         all_configurations(model=model,
                            coords=coords,
                            scalarmult=scalarmult,
                            **self.base_independents()))
     self.assertEqual(len(configs), 1)
     scalarmult = LTRMultiplier(coords.formulas["add-1998-cmo"],
                                coords.formulas["dbl-1998-cmo"], None, True,
                                False, True)
     configs = list(
         all_configurations(model=model,
                            coords=coords,
                            scalarmult=scalarmult,
                            **self.base_independents()))
     self.assertEqual(len(configs), 1)
     configs = list(
         all_configurations(model=model,
                            scalarmult=scalarmult,
                            **self.base_independents()))
     self.assertEqual(len(configs), 1)
예제 #2
0
 def test_weierstrass_projective(self):
     model = ShortWeierstrassModel()
     coords = model.coordinates["projective"]
     configs = list(
         all_configurations(model=model,
                            coords=coords,
                            **self.base_independents()))
     self.assertEqual(len(configs), 1960)
예제 #3
0
 def test_mult_class(self):
     model = ShortWeierstrassModel()
     coords = model.coordinates["projective"]
     scalarmult = LTRMultiplier
     configs = list(
         all_configurations(model=model,
                            coords=coords,
                            scalarmult=scalarmult,
                            **self.base_independents()))
     self.assertEqual(len(configs), 560)
예제 #4
0
 def test_all(self):
     j = 0
     for _ in all_configurations(model=ShortWeierstrassModel()):
         j += 1