diff options
| author | J08nY | 2019-04-24 19:26:11 +0200 |
|---|---|---|
| committer | J08nY | 2019-04-24 19:26:11 +0200 |
| commit | 2a109ad4502bc7983c9fd4fc29a62b6f028762b0 (patch) | |
| tree | ab0074015d3e2008fa0071efbfb49f2c224e78c7 /pyecsca/ec/coordinates.py | |
| parent | f4bcb085cfc9ddac71fe8bb82e8f6719309b2637 (diff) | |
| download | pyecsca-2a109ad4502bc7983c9fd4fc29a62b6f028762b0.tar.gz pyecsca-2a109ad4502bc7983c9fd4fc29a62b6f028762b0.tar.zst pyecsca-2a109ad4502bc7983c9fd4fc29a62b6f028762b0.zip | |
Diffstat (limited to 'pyecsca/ec/coordinates.py')
| -rw-r--r-- | pyecsca/ec/coordinates.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pyecsca/ec/coordinates.py b/pyecsca/ec/coordinates.py index 817bff9..585fb28 100644 --- a/pyecsca/ec/coordinates.py +++ b/pyecsca/ec/coordinates.py @@ -1,7 +1,8 @@ from ast import parse, Expression, Module -from pkg_resources import resource_listdir, resource_isdir, resource_stream from typing import List, Any, MutableMapping, Union +from pkg_resources import resource_listdir, resource_isdir, resource_stream + from .formula import (Formula, EFDFormula, AdditionEFDFormula, DoublingEFDFormula, TriplingEFDFormula, DifferentialAdditionEFDFormula, LadderEFDFormula, ScalingEFDFormula, @@ -94,3 +95,8 @@ class EFDCoordinateModel(CoordinateModel): self.assumptions.append( parse(line[7:].replace("=", "==").replace("^", "**"), mode="eval")) line = f.readline().decode("ascii") + + def __eq__(self, other): + if not isinstance(other, EFDCoordinateModel): + return False + return self.curve_model == other.curve_model and self.name == other.name |
