aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/shacal2/shacal2.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-14 05:33:44 -0400
committerJack Lloyd <[email protected]>2017-08-14 05:33:44 -0400
commit7e2c92527209d47098c0b7b9712fafcd2455590e (patch)
treeea8f7f18a70fa63fc54d7664509002ab68c38d0b /src/lib/block/shacal2/shacal2.cpp
parent38775f8927747c414046632dd03a436b192c95a1 (diff)
Notify callers of parallel ops for AES, IDEA, Noekeon, SHACAL2 and Threefish
Diffstat (limited to 'src/lib/block/shacal2/shacal2.cpp')
-rw-r--r--src/lib/block/shacal2/shacal2.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/block/shacal2/shacal2.cpp b/src/lib/block/shacal2/shacal2.cpp
index ea3cd9319..faf0a2d81 100644
--- a/src/lib/block/shacal2/shacal2.cpp
+++ b/src/lib/block/shacal2/shacal2.cpp
@@ -179,8 +179,27 @@ void SHACAL2::key_schedule(const uint8_t key[], size_t len)
}
}
+size_t SHACAL2::parallelism() const
+ {
+#if defined(BOTAN_HAS_SHACAL2_SIMD)
+ if(CPUID::has_simd_32())
+ {
+ return 4;
+ }
+#endif
+
+ return 1;
+ }
+
std::string SHACAL2::provider() const
{
+#if defined(BOTAN_HAS_SHACAL2_SIMD)
+ if(CPUID::has_simd_32())
+ {
+ return "simd";
+ }
+#endif
+
return "base";
}