VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/blake2s_SSSE3.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-03-21 00:23:48 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-03-21 01:18:55 +0100
commita239789317646e3b0fa69a48af97144c49d67c79 (patch)
tree2a087d1029f66b2b3b80257c0a639f50f8eca180 /src/Crypto/blake2s_SSSE3.c
parenta57a79c61da52b84236a4641ac23b2924fff88b6 (diff)
downloadVeraCrypt-a239789317646e3b0fa69a48af97144c49d67c79.tar.gz
VeraCrypt-a239789317646e3b0fa69a48af97144c49d67c79.zip
Add missing Blake2s source files
Diffstat (limited to 'src/Crypto/blake2s_SSSE3.c')
-rw-r--r--src/Crypto/blake2s_SSSE3.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/Crypto/blake2s_SSSE3.c b/src/Crypto/blake2s_SSSE3.c
new file mode 100644
index 00000000..4f3252c3
--- /dev/null
+++ b/src/Crypto/blake2s_SSSE3.c
@@ -0,0 +1,47 @@
+/*
+ BLAKE2 reference source code package - optimized C implementations
+
+ Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
+ terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
+ your option. The terms of these licenses can be found at:
+
+ - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
+ - OpenSSL license : https://www.openssl.org/source/license.html
+ - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
+
+ More information about the BLAKE2 hash function can be found at
+ https://blake2.net.
+*/
+
+/* Adapted for VeraCrypt */
+
+#include "blake2.h"
+#include "Common/Endian.h"
+#include "Crypto/config.h"
+#include "Crypto/cpu.h"
+#include "Crypto/misc.h"
+
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE
+
+#define HAVE_SSSE3
+
+#include "blake2s-round.h"
+
+int blake2s_has_ssse3()
+{
+ return 1;
+}
+
+#else
+int blake2s_has_ssse3()
+{
+ return 0;
+}
+#endif
+#else
+int blake2s_has_ssse3()
+{
+ return 0;
+}
+#endif