summaryrefslogtreecommitdiff
path: root/node/SHA512.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2018-03-13 06:51:17 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2018-03-13 06:51:17 -0700
commitbeb170e4fb4a42cf3770a731f222a63f0bdfe0f3 (patch)
tree11cde6c7374affaaf88a3eed48bd0018d6268fc4 /node/SHA512.cpp
parenta59912f3afa7627f3da79804a9be693a7d314ebc (diff)
downloadinfinitytier-beb170e4fb4a42cf3770a731f222a63f0bdfe0f3.tar.gz
infinitytier-beb170e4fb4a42cf3770a731f222a63f0bdfe0f3.zip
Use X64 ASM ed25519 signatures on Linux/x64, which are about 10X faster. Will matter a lot for network controllers, not so much for other things.
Diffstat (limited to 'node/SHA512.cpp')
-rw-r--r--node/SHA512.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/node/SHA512.cpp b/node/SHA512.cpp
index 589913d7..d3c938af 100644
--- a/node/SHA512.cpp
+++ b/node/SHA512.cpp
@@ -357,4 +357,11 @@ void SHA512::hash(void *digest,const void *data,unsigned int len)
} // namespace ZeroTier
-#endif
+#endif // !ZT_HAVE_NATIVE_SHA512
+
+// Internally re-export to included C code, which includes some fast crypto code ported in on some platforms.
+// This eliminates the need to link against a third party SHA512() from this code
+extern "C" void ZT_sha512internal(void *digest,const void *data,unsigned int len)
+{
+ ZeroTier::SHA512::hash(digest,data,len);
+}