aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/curve25519.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-01 19:15:28 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-02-01 19:51:50 +0100
commit93fa0d934b96179847301d3a59d3ca8f71b85f58 (patch)
tree41a0ee271fe2ef752b9ecccb54d8d458c1ed212b /src/crypto/curve25519.c
parentcurve25519: replace hacl64 with fiat64 (diff)
downloadwireguard-monolithic-historical-93fa0d934b96179847301d3a59d3ca8f71b85f58.tar.xz
wireguard-monolithic-historical-93fa0d934b96179847301d3a59d3ca8f71b85f58.zip
curve25519: replace fiat64 with faster hacl64
This reverts commit da4ff396cc5d5e0ff21f9ecbc2f951c048c63fff and adds some optimizations to hacl64.
Diffstat (limited to 'src/crypto/curve25519.c')
-rw-r--r--src/crypto/curve25519.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c
index 38020be..eba94cd 100644
--- a/src/crypto/curve25519.c
+++ b/src/crypto/curve25519.c
@@ -25,7 +25,11 @@ static __always_inline void normalize_secret(u8 secret[CURVE25519_POINT_SIZE])
void __init curve25519_fpu_init(void) { }
#endif
-#include "curve25519-generic.h"
+#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__)
+#include "curve25519-hacl64.h"
+#else
+#include "curve25519-fiat32.h"
+#endif
static const u8 null_point[CURVE25519_POINT_SIZE] = { 0 };