aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cli/speed.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index 772cd6a46..6ea70d3d1 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -45,6 +45,10 @@
#include <botan/hmac_rng.h>
#endif
+#if defined(BOTAN_HAS_RDRAND_RNG)
+ #include <botan/rdrand_rng.h>
+#endif
+
#if defined(BOTAN_HAS_FPE_FE1)
#include <botan/fpe_fe1.h>
#endif
@@ -535,6 +539,14 @@ class Speed final : public Command
bench_rng(Botan::system_rng(), "System_RNG", msec, buf_size);
#endif
+#if defined(BOTAN_HAS_RDRAND_RNG)
+ if(Botan::CPUID::has_rdrand())
+ {
+ Botan::RDRAND_RNG rdrand;
+ bench_rng(rdrand, "RDRAND", msec, buf_size);
+ }
+#endif
+
#if defined(BOTAN_HAS_HMAC_DRBG)
for(std::string hash : { "SHA-256", "SHA-384", "SHA-512" })
{