aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/speed.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-15 07:32:52 -0400
committerJack Lloyd <[email protected]>2018-08-15 07:32:52 -0400
commitd4ab524798edd7609f9db7db5b050459fa7ad238 (patch)
tree709340699797bede48373dd6134db1eb74c74542 /src/cli/speed.cpp
parent386d98e925ba99da5f45ba82ab942ac2c9e07b44 (diff)
In speed test, check for availability of NIST reducer functions
This caused compilation to fail if MP_WORD_BITS was 8 or 16
Diffstat (limited to 'src/cli/speed.cpp')
-rw-r--r--src/cli/speed.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index 657cdd49b..dfe26c8d6 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -1589,6 +1589,7 @@ class Speed final : public Command
{
Botan::secure_vector<Botan::word> ws;
+#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32)
std::unique_ptr<Timer> p192_timer = make_timer("P-192 redc");
Botan::BigInt r192(rng(), 192*2 - 1);
while(p192_timer->under(runtime))
@@ -1628,6 +1629,7 @@ class Speed final : public Command
r384 += 1;
}
record_result(p384_timer);
+#endif
std::unique_ptr<Timer> p521_timer = make_timer("P-521 redc");
Botan::BigInt r521(rng(), 521*2 - 1);