aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec/countermeasures.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/countermeasures.py')
-rw-r--r--pyecsca/ec/countermeasures.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/pyecsca/ec/countermeasures.py b/pyecsca/ec/countermeasures.py
index 5e940e2..e7c1a5a 100644
--- a/pyecsca/ec/countermeasures.py
+++ b/pyecsca/ec/countermeasures.py
@@ -76,12 +76,7 @@ class ScalarMultiplierCountermeasure(ABC):
:param mult: The scalar multiplier to use.
:return: An instance of the countermeasure.
"""
- th = get_type_hints(cls.__init__)
- num = 0
- for name, arg_type in th.items():
- if name.startswith("mult"):
- num += 1
- mults = [mult] * num
+ mults = [mult] * cls.nmults
return cls(*mults, **kwargs)
def _apply_formula(self, shortname: str, *points: Point) -> Point: