diff options
| author | J08nY | 2024-01-11 12:21:16 +0100 |
|---|---|---|
| committer | J08nY | 2024-01-11 12:21:16 +0100 |
| commit | 72c04f94d73aaf2fbe6961b3adc9af2db822c2ef (patch) | |
| tree | 3bf8c9eeaf37b98966b8dd7e6ac1087e30eb36f4 /test | |
| parent | 64f16ba5e8157d0484307cf64eae9f5318b62825 (diff) | |
| download | pyecsca-72c04f94d73aaf2fbe6961b3adc9af2db822c2ef.tar.gz pyecsca-72c04f94d73aaf2fbe6961b3adc9af2db822c2ef.tar.zst pyecsca-72c04f94d73aaf2fbe6961b3adc9af2db822c2ef.zip | |
Compute mult-by-n map using PARI impl if available.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ec/test_divpoly.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/ec/test_divpoly.py b/test/ec/test_divpoly.py index 065e1ca..84c780c 100644 --- a/test/ec/test_divpoly.py +++ b/test/ec/test_divpoly.py @@ -171,7 +171,7 @@ def test_mult_by_n(secp128r1): def test_mult_by_n_large(secp128r1): K = FF(secp128r1.curve.prime) - mx, my = mult_by_n(secp128r1.curve, 21) + mx, my = mult_by_n(secp128r1.curve, 21, use_pari=False) with files(test.data.divpoly).joinpath("mult_21.json").open("r") as f: sage_data = json.load(f) sage_data["mx"][0] = { @@ -195,8 +195,7 @@ def test_mult_by_n_large(secp128r1): def test_mult_by_n_pari(secp128r1): _ = pytest.importorskip("cypari2") - from pyecsca.ec.divpoly import mult_by_n_pari - mx_pari = mult_by_n_pari(secp128r1.curve, secp128r1.order, 10) - mx_our, _ = mult_by_n(secp128r1.curve, 10, x_only=True) + mx_pari, _ = mult_by_n(secp128r1.curve, 10, x_only=True) + mx_our, _ = mult_by_n(secp128r1.curve, 10, x_only=True, use_pari=False) assert mx_pari == mx_our |
