From 7128a0c8eeab229a4c97057833c680314158baf3 Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 21 Jul 2025 13:37:09 +0200 Subject: Fix mults_computed issue. --- test/sca/test_regress.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/sca/test_regress.py (limited to 'test/sca') diff --git a/test/sca/test_regress.py b/test/sca/test_regress.py new file mode 100644 index 0000000..067ea87 --- /dev/null +++ b/test/sca/test_regress.py @@ -0,0 +1,18 @@ +from functools import partial + +from pyecsca.ec.countermeasures import BrumleyTuveri +from pyecsca.ec.mult import LTRMultiplier +from pyecsca.ec.params import get_params +from pyecsca.sca.re.rpa import multiples_computed + + +def test_multiples_computed(): + params = get_params("secg", "secp256r1", "projective") + scalar = ( + 178351107805817428630633067540716126328949183057477388943177779766598408516705 + ) + mult_class = LTRMultiplier + mult_factory = partial(LTRMultiplier, always=False, complete=True) + full_factory = lambda *args, **kwargs: BrumleyTuveri(mult_factory(*args, **kwargs)) # noqa: E731 + r = multiples_computed(scalar, params, mult_class, full_factory) + assert r -- cgit v1.2.3-70-g09d2