aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/threefish
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-12 19:44:26 -0400
committerJack Lloyd <[email protected]>2017-10-12 19:44:26 -0400
commitf42cb6cf37c7e8c24aac726fb450f46fa2a3569e (patch)
tree4b9b043a899bf8bcd156fc6b1bb15d78768576e1 /src/lib/block/threefish
parentebf147bcf6b84249cf289009ba81c3f3611ea2de (diff)
Use SIMD for in Threefish
GCC 7 can actually vectorize this for AVX2
Diffstat (limited to 'src/lib/block/threefish')
-rw-r--r--src/lib/block/threefish/threefish.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/block/threefish/threefish.cpp b/src/lib/block/threefish/threefish.cpp
index 937a673fd..804d6003a 100644
--- a/src/lib/block/threefish/threefish.cpp
+++ b/src/lib/block/threefish/threefish.cpp
@@ -134,7 +134,7 @@ void Threefish_512::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
}
#endif
- BOTAN_PARALLEL_FOR(size_t i = 0; i < blocks; ++i)
+ BOTAN_PARALLEL_SIMD_FOR(size_t i = 0; i < blocks; ++i)
{
uint64_t X0, X1, X2, X3, X4, X5, X6, X7;
load_le(in + BLOCK_SIZE*i, X0, X1, X2, X3, X4, X5, X6, X7);
@@ -214,7 +214,7 @@ void Threefish_512::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
THREEFISH_INJECT_KEY(R2); \
} while(0)
- BOTAN_PARALLEL_FOR(size_t i = 0; i < blocks; ++i)
+ BOTAN_PARALLEL_SIMD_FOR(size_t i = 0; i < blocks; ++i)
{
uint64_t X0, X1, X2, X3, X4, X5, X6, X7;
load_le(in + BLOCK_SIZE*i, X0, X1, X2, X3, X4, X5, X6, X7);