diff options
| author | J08nY | 2025-06-19 15:44:41 +0200 |
|---|---|---|
| committer | J08nY | 2025-06-19 15:44:41 +0200 |
| commit | b244e5747258ad14e226a6f9df56ebc4be0f353b (patch) | |
| tree | 61ec77fc351b059a6bf4e4d08ad0ebe79fac50a6 /test | |
| parent | e355d741135d22a8fcfe620d6961e71aa6c38b31 (diff) | |
| download | pyecsca-b244e5747258ad14e226a6f9df56ebc4be0f353b.tar.gz pyecsca-b244e5747258ad14e226a6f9df56ebc4be0f353b.tar.zst pyecsca-b244e5747258ad14e226a6f9df56ebc4be0f353b.zip | |
Diffstat (limited to 'test')
| -rw-r--r-- | test/sca/test_rpa.py | 10 | ||||
| -rw-r--r-- | test/sca/test_zvp.py | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/sca/test_rpa.py b/test/sca/test_rpa.py index 07757fd..8ba719c 100644 --- a/test/sca/test_rpa.py +++ b/test/sca/test_rpa.py @@ -82,6 +82,16 @@ def test_multiples(rpa_params): assert multiples == {1, 2, 4, 8, 16, 17} +def test_multiples_no_init(rpa_params): + multiples = multiples_computed( + 78699, rpa_params, LTRMultiplier, + lambda add, dbl, *args, **kwargs: LTRMultiplier( + add, dbl, None, False, AccumulationOrder.PeqPR, True, False + ), False, True + ) + assert multiples + + def test_multiples_bnaf(rpa_params): mult_partial = partial(BinaryNAFMultiplier, always=True, direction=ProcessingDirection.LTR) multiples = multiples_computed( diff --git a/test/sca/test_zvp.py b/test/sca/test_zvp.py index 496810b..6a06884 100644 --- a/test/sca/test_zvp.py +++ b/test/sca/test_zvp.py @@ -248,11 +248,12 @@ def test_addition_chain(secp128r1): secp128r1, LTRMultiplier, lambda add, dbl, *args, **kwargs: LTRMultiplier( - add, dbl, None, False, AccumulationOrder.PeqPR, True, True + add, dbl, None, False, AccumulationOrder.PeqPR, True, False ), ) assert res is not None - assert len(res) == 25 + # Plenty of operations on infty point, due to complete=True and no short_circuit + assert len(res) == 138 @pytest.mark.parametrize("k", [7, 25, 31]) |
