diff options
| author | J08nY | 2023-10-08 20:57:24 +0200 |
|---|---|---|
| committer | J08nY | 2023-10-08 20:57:24 +0200 |
| commit | 1c2e383d8e8df323b4cebb302869fc15599961a0 (patch) | |
| tree | dfdfbf9a12acd1662cba56b46b30d8337ae81918 /test/test_impl.py | |
| parent | 71579306e7c63123426e5bda105e3ab850fbbb20 (diff) | |
| download | pyecsca-codegen-1c2e383d8e8df323b4cebb302869fc15599961a0.tar.gz pyecsca-codegen-1c2e383d8e8df323b4cebb302869fc15599961a0.tar.zst pyecsca-codegen-1c2e383d8e8df323b4cebb302869fc15599961a0.zip | |
Add fixed-base multipliers with precomputation.
Diffstat (limited to 'test/test_impl.py')
| -rw-r--r-- | test/test_impl.py | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/test/test_impl.py b/test/test_impl.py index cb5b583..da42c33 100644 --- a/test/test_impl.py +++ b/test/test_impl.py @@ -16,6 +16,9 @@ from pyecsca.ec.mult import ( ProcessingDirection, ScalarMultiplier, FixedWindowLTRMultiplier, + FullPrecompMultiplier, + BGMWMultiplier, + CombMultiplier, ) from pyecsca.ec.signature import ECDSA_SHA1, SignatureResult @@ -167,6 +170,60 @@ def additional(request): ), id="FIX2", ), + pytest.param( + ( + FullPrecompMultiplier, + "precomp", + ["add-1998-cmo", "dbl-1998-cmo"], + {"direction": ProcessingDirection.LTR}, + ), + id="PRE1", + ), + pytest.param( + ( + FullPrecompMultiplier, + "precomp", + ["add-1998-cmo", "dbl-1998-cmo"], + {"direction": ProcessingDirection.RTL}, + ), + id="PRE2", + ), + pytest.param( + ( + BGMWMultiplier, + "bgmw", + ["add-1998-cmo", "dbl-1998-cmo"], + {"width": 3, "direction": ProcessingDirection.LTR}, + ), + id="BGMW1", + ), + pytest.param( + ( + BGMWMultiplier, + "bgmw", + ["add-1998-cmo", "dbl-1998-cmo"], + {"width": 5, "direction": ProcessingDirection.RTL}, + ), + id="BGMW2", + ), + pytest.param( + ( + CombMultiplier, + "comb", + ["add-1998-cmo", "dbl-1998-cmo"], + {"width": 3}, + ), + id="Comb1", + ), + pytest.param( + ( + CombMultiplier, + "comb", + ["add-1998-cmo", "dbl-1998-cmo"], + {"width": 5}, + ), + id="Comb2", + ), ], ) def target(request, additional, secp128r1) -> ImplTarget: @@ -189,7 +246,7 @@ def target(request, additional, secp128r1) -> ImplTarget: ], env={ "CFLAGS": "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all" - } + }, ) assert res.exit_code == 0 target = HostTarget( |
