aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-07-05 19:23:27 -0400
committerJack Lloyd <[email protected]>2019-07-05 19:23:27 -0400
commitab576a5d34bc1c7a05b821d1dbad4c2d7092afb7 (patch)
tree19c60143e76a02595a3143a2d0f29ffcf50150f5
parentbab50f163ef4449725dc15b5acbcab2ad177b18c (diff)
Report parallism for AES when hardware is available
-rw-r--r--src/lib/block/aes/aes.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/block/aes/aes.cpp b/src/lib/block/aes/aes.cpp
index 54a2668c1..568dfb1b3 100644
--- a/src/lib/block/aes/aes.cpp
+++ b/src/lib/block/aes/aes.cpp
@@ -430,6 +430,20 @@ size_t aes_parallelism()
}
#endif
+#if defined(BOTAN_HAS_AES_POWER8)
+ if(CPUID::has_ppc_crypto())
+ {
+ return 4;
+ }
+#endif
+
+#if defined(BOTAN_HAS_AES_ARMV8)
+ if(CPUID::has_arm_aes())
+ {
+ return 4;
+ }
+#endif
+
return 1;
}