diff options
| author | J08nY | 2025-03-18 17:05:40 +0100 |
|---|---|---|
| committer | J08nY | 2025-03-18 17:05:40 +0100 |
| commit | dde027debb675fa20c72eb1d9d315bdf544f3e16 (patch) | |
| tree | d0675d42581b778b65d48d9628d4e442dd8f27f8 /pyecsca | |
| parent | 9fa088ac6bddea025a869fabd5606fdd8d93fcf6 (diff) | |
| download | pyecsca-dde027debb675fa20c72eb1d9d315bdf544f3e16.tar.gz pyecsca-dde027debb675fa20c72eb1d9d315bdf544f3e16.tar.zst pyecsca-dde027debb675fa20c72eb1d9d315bdf544f3e16.zip | |
Diffstat (limited to 'pyecsca')
| -rw-r--r-- | pyecsca/ec/mod/flint.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyecsca/ec/mod/flint.py b/pyecsca/ec/mod/flint.py index d5fd432..6a64eeb 100644 --- a/pyecsca/ec/mod/flint.py +++ b/pyecsca/ec/mod/flint.py @@ -15,6 +15,7 @@ from pyecsca.ec.mod.base import Mod has_flint = False try: import flint + from flint.utils.flint_exceptions import DomainError _major, _minor, *_ = flint.__version__.split(".") if (int(_major), int(_minor)) >= (0, 5): @@ -105,7 +106,7 @@ if has_flint: try: res = flint.fmpz(int(self.x)).sqrtmod(mod) return FlintMod(self._ctx(res), self._ctx, ensure=False) - except ValueError: + except (ValueError, DomainError): raise_non_residue() if mod % 4 == 3: |
