diff options
Diffstat (limited to 'pyecsca/ec/mult.py')
| -rw-r--r-- | pyecsca/ec/mult.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pyecsca/ec/mult.py b/pyecsca/ec/mult.py index 36d3896..fa225b3 100644 --- a/pyecsca/ec/mult.py +++ b/pyecsca/ec/mult.py @@ -162,6 +162,8 @@ class CoronMultiplier(ScalarMultiplier): super().__init__(curve, ctx, add=add, dbl=dbl, scl=scl) def multiply(self, scalar: int, point: Optional[Point] = None): + if scalar == 0: + return copy(self.curve.neutral) q = self._init_multiply(point) p0 = copy(q) for i in range(scalar.bit_length() - 2, -1, -1): |
