diff options
| author | J08nY | 2024-07-15 14:12:30 +0200 |
|---|---|---|
| committer | J08nY | 2024-07-15 14:12:30 +0200 |
| commit | b61e1f7b4f3adb99983e2ed689c466e743c53abd (patch) | |
| tree | 49225e6d7534a1eb74cb462ae026f3cea393ec45 /test/ec | |
| parent | 2383ae17331b433b922bf6a21bffa3c58f1c665d (diff) | |
| download | pyecsca-b61e1f7b4f3adb99983e2ed689c466e743c53abd.tar.gz pyecsca-b61e1f7b4f3adb99983e2ed689c466e743c53abd.tar.zst pyecsca-b61e1f7b4f3adb99983e2ed689c466e743c53abd.zip | |
Perf test also scalarmult with tracing.
Diffstat (limited to 'test/ec')
| -rwxr-xr-x | test/ec/perf_mult.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ec/perf_mult.py b/test/ec/perf_mult.py index 3ed0cdd..e1ab60b 100755 --- a/test/ec/perf_mult.py +++ b/test/ec/perf_mult.py @@ -3,6 +3,7 @@ from typing import cast import click +from pyecsca.ec.context import local, DefaultContext from pyecsca.ec.formula import AdditionFormula, DoublingFormula from pyecsca.ec.mod import has_gmp, has_flint from pyecsca.ec.mult import LTRMultiplier @@ -45,6 +46,17 @@ def main(profiler, mod, operations, directory): one_point = mult.multiply( 0x71A55E0C1ABB3A0E069419E0F837BC195F1B9545E69FC51E53C4D48D7FEA3B1A ) + click.echo( + f"Profiling {operations} {p256.curve.prime.bit_length()}-bit scalar multiplication executions (with tracing)..." + ) + with local(DefaultContext()): + one_point = p256.generator + with Profiler(profiler, directory, f"mult_ltr_rcb_p256_wtrace_{operations}_{mod}"): + for _ in range(operations): + mult.init(p256, one_point) + one_point = mult.multiply( + 0x71A55E0C1ABB3A0E069419E0F837BC195F1B9545E69FC51E53C4D48D7FEA3B1A + ) if __name__ == "__main__": |
