aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2024-07-10 19:23:54 +0200
committerJ08nY2024-07-10 19:23:54 +0200
commit204f3edc414aff8c7eb073329e3d47368decfd8a (patch)
tree1074291290d592bdcfb7551c2f548ddb366e68f8
parent2e23c8eecf8563f999d7462b1f44cd045a3075f4 (diff)
downloadpyecsca-204f3edc414aff8c7eb073329e3d47368decfd8a.tar.gz
pyecsca-204f3edc414aff8c7eb073329e3d47368decfd8a.tar.zst
pyecsca-204f3edc414aff8c7eb073329e3d47368decfd8a.zip
-rw-r--r--pyproject.toml2
-rw-r--r--test/ec/test_divpoly.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 1972bfa..c6081ab 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,7 +31,7 @@
dependencies = [
"numpy",
"scipy",
- "sympy>=1.7.1",
+ "sympy>=1.7.1,<1.13", # <=1.13 required because of https://github.com/sympy/sympy/issues/26789 and https://github.com/sympy/sympy/issues/26791.
"pandas",
"atpublic",
"cython",
diff --git a/test/ec/test_divpoly.py b/test/ec/test_divpoly.py
index c3c4c1f..63b3b2b 100644
--- a/test/ec/test_divpoly.py
+++ b/test/ec/test_divpoly.py
@@ -96,7 +96,7 @@ def test_divpoly0(secp128r1):
]
K = FF(secp128r1.curve.prime)
poly = divpoly0(secp128r1.curve, 11)[11]
- computed = list(map(K, poly.all_coeffs()))
+ computed = list(map(lambda x: K(int(x)), poly.all_coeffs()))
assert coeffs == computed
@@ -162,8 +162,8 @@ def test_mult_by_n(secp128r1):
}
mx, my = mult_by_n(secp128r1.curve, 2)
mx_num, mx_denom = mx
- assert coeffs_mx_num == list(map(K, mx_num.all_coeffs()))
- assert coeffs_mx_denom == list(map(K, mx_denom.all_coeffs()))
+ assert coeffs_mx_num == list(map(lambda x: K(int(x)), mx_num.all_coeffs()))
+ assert coeffs_mx_denom == list(map(lambda x: K(int(x)), mx_denom.all_coeffs()))
my_num, my_denom = my
assert my_num.as_dict() == coeffs_my_num
assert my_denom.as_dict() == coeffs_my_denom