diff options
| author | J08nY | 2020-06-14 13:55:49 +0200 |
|---|---|---|
| committer | J08nY | 2020-06-14 14:05:28 +0200 |
| commit | 925b7824f4c79d795d81b111cc531233651f18b6 (patch) | |
| tree | 762e76aeb5b2dcd95da1e61abdcd27f385116500 /test/ec/test_formula.py | |
| parent | 7e51c6546d369ec46a6ae8978147e79f2f0195a3 (diff) | |
| download | pyecsca-925b7824f4c79d795d81b111cc531233651f18b6.tar.gz pyecsca-925b7824f4c79d795d81b111cc531233651f18b6.tar.zst pyecsca-925b7824f4c79d795d81b111cc531233651f18b6.zip | |
Diffstat (limited to 'test/ec/test_formula.py')
| -rw-r--r-- | test/ec/test_formula.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ec/test_formula.py b/test/ec/test_formula.py index c0eed28..d5f8392 100644 --- a/test/ec/test_formula.py +++ b/test/ec/test_formula.py @@ -8,6 +8,7 @@ class FormulaTests(TestCase): def setUp(self): self.secp128r1 = get_params("secg", "secp128r1", "projective") self.add = self.secp128r1.curve.coordinate_model.formulas["add-2007-bl"] + self.dbl = self.secp128r1.curve.coordinate_model.formulas["dbl-2007-bl"] def test_wrong_call(self): with self.assertRaises(ValueError): @@ -23,6 +24,10 @@ class FormulaTests(TestCase): self.assertEqual(self.add.inputs, {"X1", "Y1", "Z1", "X2", "Y2", "Z2"}) self.assertEqual(self.add.outputs, {"X3", "Y3", "Z3"}) + def test_eq(self): + self.assertEqual(self.add, self.add) + self.assertNotEqual(self.add, self.dbl) + def test_num_ops(self): self.assertEqual(self.add.num_operations, 33) self.assertEqual(self.add.num_multiplications, 17) |
