diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-07 10:40:59 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-07 10:40:59 -0700 |
commit | c952fbbd8d72c7f4e295bcacfe6e5b0b448505af (patch) | |
tree | fdfb9d0558cfc3a71a7960de074cbb4b8f54982a | |
parent | ab0228f626573381db93173cd5849cb934481ca5 (diff) | |
download | infinitytier-c952fbbd8d72c7f4e295bcacfe6e5b0b448505af.tar.gz infinitytier-c952fbbd8d72c7f4e295bcacfe6e5b0b448505af.zip |
Only enable 128-bit Poly1305 on X86_64 right now. Has compilation issues on ARM, but the 64-bit version should be fine.
-rw-r--r-- | node/Poly1305.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/node/Poly1305.cpp b/node/Poly1305.cpp index 0968170e..b78071f6 100644 --- a/node/Poly1305.cpp +++ b/node/Poly1305.cpp @@ -20,6 +20,9 @@ namespace ZeroTier { #if 0 +// "Naive" implementation, which is slower... might still want this on some older +// or weird platforms if the later versions have issues. + static inline void add(unsigned int h[17],const unsigned int c[17]) { unsigned int j; @@ -132,10 +135,10 @@ typedef struct poly1305_context { unsigned char opaque[136]; } poly1305_context; -#if defined(_MSC_VER) || defined(__GNUC__) +#if (defined(_MSC_VER) || defined(__GNUC__)) && (defined(__amd64) || defined(__amd64__) || defined(__x86_64) || defined(__x86_64__) || defined(__AMD64) || defined(__AMD64__)) ////////////////////////////////////////////////////////////////////////////// -// 128-bit implementation for MSC and GCC +// 128-bit implementation for MSC and GCC from Poly1305-donna #if defined(_MSC_VER) #include <intrin.h> |