aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJ08nY2025-03-29 19:06:49 +0100
committerJ08nY2025-03-29 19:06:49 +0100
commit5b4e0f2687065864f3945c25d118518957e3f1ee (patch)
tree0e708b8f2993f8da136ea6c7d9b2a52e72bee06d /test
parent87ceaa26009266a429352aa11bac586cb4bf5132 (diff)
downloadpyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.tar.gz
pyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.tar.zst
pyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.zip
Diffstat (limited to 'test')
-rwxr-xr-xtest/ec/perf_mod.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ec/perf_mod.py b/test/ec/perf_mod.py
index 4bd1e1e..ac84a39 100755
--- a/test/ec/perf_mod.py
+++ b/test/ec/perf_mod.py
@@ -105,6 +105,18 @@ def main(profiler, mod, operations, directory):
):
for _ in range(operations):
Mod.random(n)
+ click.echo(f"Profiling {operations} {n.bit_length()}-bit cubic residue checks...")
+ with Profiler(
+ profiler, directory, f"mod_256b_iscubicresidue_{operations}_{mod}", operations
+ ):
+ for _ in range(operations):
+ a.is_cubic_residue()
+ click.echo(f"Profiling {operations} {n.bit_length()}-bit cubic roots...")
+ with Profiler(
+ profiler, directory, f"mod_256b_cuberoot_{operations}_{mod}", operations
+ ):
+ for _ in range(operations):
+ b.cube_root()
if __name__ == "__main__":