diff options
| author | J08nY | 2025-07-21 13:37:09 +0200 |
|---|---|---|
| committer | J08nY | 2025-07-21 13:37:09 +0200 |
| commit | 7128a0c8eeab229a4c97057833c680314158baf3 (patch) | |
| tree | 5fcac7f12274dc458cfa73faa48919ef9c86d80c /test | |
| parent | 6b9da5c1b905ecbaaabc56c509772f2f9f910c60 (diff) | |
| download | pyecsca-7128a0c8eeab229a4c97057833c680314158baf3.tar.gz pyecsca-7128a0c8eeab229a4c97057833c680314158baf3.tar.zst pyecsca-7128a0c8eeab229a4c97057833c680314158baf3.zip | |
Diffstat (limited to 'test')
| -rw-r--r-- | test/sca/test_regress.py | 18 |
1 files changed, 18 insertions, 0 deletions
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 |
