From beb170e4fb4a42cf3770a731f222a63f0bdfe0f3 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 13 Mar 2018 06:51:17 -0700 Subject: 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. --- node/SHA512.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'node/SHA512.cpp') 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); +} -- cgit v1.2.3