diff options
author | Jack Lloyd <[email protected]> | 2019-08-23 20:09:07 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-08-23 20:09:07 -0400 |
commit | 8e828f454f2d19b18928fbd48d65b461e8fd21ed (patch) | |
tree | 5ee86cb9c1ec1af3fb47a0f77937a0b3c97945ae /src | |
parent | 0813d4c9d7057a25a3bf0e9e59e19c8aea8fcc47 (diff) |
Remove modexp based inversion from speed test
Not competitive so not interesting
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/speed.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index f198c3e63..0d5bb34cd 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -91,7 +91,6 @@ #if defined(BOTAN_HAS_NUMBERTHEORY) #include <botan/numthry.h> - #include <botan/pow_mod.h> #include <botan/reducer.h> #include <botan/curve_nistp.h> #include <botan/internal/primality.h> @@ -1528,9 +1527,6 @@ class Speed final : public Command std::unique_ptr<Timer> invmod_timer = make_timer("binext-" + bit_str); std::unique_ptr<Timer> monty_timer = make_timer("monty-" + bit_str); std::unique_ptr<Timer> ct_invmod_timer = make_timer("ct-" + bit_str); - std::unique_ptr<Timer> powm_timer = make_timer("powm-" + bit_str); - - Botan::Fixed_Exponent_Power_Mod powm_p(p - 2, p); while(invmod_timer->under(runtime)) { @@ -1545,18 +1541,13 @@ class Speed final : public Command const Botan::BigInt x_inv3 = ct_invmod_timer->run( [&] { return Botan::ct_inverse_mod_odd_modulus(x, p); }); - const Botan::BigInt x_inv4 = powm_timer->run( - [&] { return powm_p(x); }); - BOTAN_ASSERT_EQUAL(x_inv1, x_inv2, "Same result"); BOTAN_ASSERT_EQUAL(x_inv1, x_inv3, "Same result"); - BOTAN_ASSERT_EQUAL(x_inv1, x_inv4, "Same result"); } record_result(invmod_timer); record_result(monty_timer); record_result(ct_invmod_timer); - record_result(powm_timer); } } |