diff options
| author | J08nY | 2025-08-11 13:31:57 +0200 |
|---|---|---|
| committer | J08nY | 2025-08-11 13:31:57 +0200 |
| commit | 18e2a6efab3bd199adbbce2667335ff3dd8c068c (patch) | |
| tree | 23496d27b4733f8d62d4d621dc5c1ed8e5369c4d | |
| parent | f72f69a6afede50666637fb850876e16ed9dd0ed (diff) | |
| download | ECTester-18e2a6efab3bd199adbbce2667335ff3dd8c068c.tar.gz ECTester-18e2a6efab3bd199adbbce2667335ff3dd8c068c.tar.zst ECTester-18e2a6efab3bd199adbbce2667335ff3dd8c068c.zip | |
Fix check divides (ignore zeros).
| -rw-r--r-- | analysis/scalarmults/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/analysis/scalarmults/common.py b/analysis/scalarmults/common.py index 73a0947..7a2563d 100644 --- a/analysis/scalarmults/common.py +++ b/analysis/scalarmults/common.py @@ -23,7 +23,7 @@ def check_equal_multiples(k, l, q): def check_divides(k, l, q): """Checks whether q (the order of the base) divides any of the multiples input into the formula.""" - return (k % q == 0) or (l % q == 0) + return (k != 0) and (l != 0) and (k % q == 0) or (l % q == 0) def check_half_add(k, l, q): |
