diff options
| author | J08nY | 2023-09-20 12:55:32 +0200 |
|---|---|---|
| committer | J08nY | 2023-09-20 12:55:32 +0200 |
| commit | 8ff37cdc9fd366627670ea9271b510fbb7377881 (patch) | |
| tree | 58ebea5598ec2d92d11b8868adec605745888c6a /pyecsca/ec | |
| parent | c341419b7a67fe2ac1367f56e0c5a91ab551fe05 (diff) | |
| download | pyecsca-8ff37cdc9fd366627670ea9271b510fbb7377881.tar.gz pyecsca-8ff37cdc9fd366627670ea9271b510fbb7377881.tar.zst pyecsca-8ff37cdc9fd366627670ea9271b510fbb7377881.zip | |
Bump EFD version and fix formula names.
Diffstat (limited to 'pyecsca/ec')
| -rw-r--r-- | pyecsca/ec/coordinates.py | 18 | ||||
| m--------- | pyecsca/ec/efd | 0 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pyecsca/ec/coordinates.py b/pyecsca/ec/coordinates.py index 82b74e7..8cc21bc 100644 --- a/pyecsca/ec/coordinates.py +++ b/pyecsca/ec/coordinates.py @@ -33,6 +33,10 @@ class CoordinateModel: """Variables that the coordinate model uses.""" satisfying: List[Module] """Relationship between the coordinate system and affine coordinates.""" + toaffine: List[Module] + """Map to affine coordinates from system coordinates.""" + tosystem: List[Module] + """Map from coordinate system to affine coordinates.""" parameters: List[str] """Coordinate system parameters.""" assumptions: List[Module] @@ -78,6 +82,8 @@ class EFDCoordinateModel(CoordinateModel): self.curve_model = curve_model self.variables = [] self.satisfying = [] + self.toaffine = [] + self.tosystem = [] self.parameters = [] self.assumptions = [] self.neutral = [] @@ -126,6 +132,18 @@ class EFDCoordinateModel(CoordinateModel): self.satisfying.append(code) except SyntaxError: pass + elif line.startswith("toaffine"): + try: + code = parse(line[9:].replace("^", "**"), mode="exec") + self.toaffine.append(code) + except SyntaxError: + pass + elif line.startswith("tosystem"): + try: + code = parse(line[9:].replace("^", "**"), mode="exec") + self.tosystem.append(code) + except SyntaxError: + pass elif line.startswith("parameter"): self.parameters.append(line[10:]) elif line.startswith("assume"): diff --git a/pyecsca/ec/efd b/pyecsca/ec/efd -Subproject bfecf9e69ae1b20f0fe1b83496407c2ac09cd72 +Subproject 39ca92b31719956dd72edaca20928d21fae3088 |
