aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/ec
diff options
context:
space:
mode:
authorJán Jančár2023-10-02 17:18:28 +0200
committerGitHub2023-10-02 17:18:28 +0200
commitf6f7b982a8c0abdc44e9aa3e84a231a808a331c2 (patch)
treec7a542910b77270aa80afb1d86e626203d590a4d /pyecsca/ec
parent7ecd65a67bf83ee11400ace2b9c44d679bfc4c99 (diff)
parent5002973741806be30ba04a4a976fb96c62130cf9 (diff)
downloadpyecsca-f6f7b982a8c0abdc44e9aa3e84a231a808a331c2.tar.gz
pyecsca-f6f7b982a8c0abdc44e9aa3e84a231a808a331c2.tar.zst
pyecsca-f6f7b982a8c0abdc44e9aa3e84a231a808a331c2.zip
Merge pull request #43 from vojtechsu/master
Add filtering of non-homogeneous polynomials
Diffstat (limited to 'pyecsca/ec')
-rw-r--r--pyecsca/ec/coordinates.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyecsca/ec/coordinates.py b/pyecsca/ec/coordinates.py
index 8684223..25c4d09 100644
--- a/pyecsca/ec/coordinates.py
+++ b/pyecsca/ec/coordinates.py
@@ -86,6 +86,7 @@ class EFDCoordinateModel(CoordinateModel):
self.satisfying = []
self.toaffine = []
self.tosystem = []
+ self.homogweights = {}
self.parameters = []
self.assumptions = []
self.neutral = []
@@ -146,6 +147,12 @@ class EFDCoordinateModel(CoordinateModel):
self.tosystem.append(code)
except SyntaxError:
pass
+ elif line.startswith("homogweight"):
+ try:
+ var, weight = line[11:].split("=")
+ self.homogweights[var.strip()] = int(weight)
+ except SyntaxError:
+ pass
elif line.startswith("parameter"):
self.parameters.append(line[10:])
elif line.startswith("assume"):