diff --git a/contrib/keygen-html/src/curve25519_generate.c b/contrib/keygen-html/src/curve25519_generate.c
index e7873a6..8b4bbb3 100644
--- a/contrib/keygen-html/src/curve25519_generate.c
+++ b/contrib/keygen-html/src/curve25519_generate.c
@@ -48,7 +48,7 @@ static __always_inline void normalize_secret(u8 secret[CURVE25519_POINT_SIZE])
secret[31] |= 64;
}
-#include "../../../../src/crypto/curve25519-generic.h"
+#include "../../../../src/crypto/curve25519-fiat32.h"
EMSCRIPTEN_KEEPALIVE void curve25519_generate_public(u8 public[static 32], const u8 private[static 32])
{
diff --git a/src/curve25519.c b/src/curve25519.c
index 50b95a9..901becd 100644
--- a/src/curve25519.c
+++ b/src/curve25519.c
@@ -39,11 +39,11 @@ static noinline void memzero_explicit(void *s, size_t count)
}
#ifdef __SIZEOF_INT128__
-#define CONFIG_ARCH_SUPPORTS_INT128
+#include "../crypto/curve25519-hacl64.h"
+#else
+#include "../crypto/curve25519-fiat32.h"
#endif
-#include "../crypto/curve25519-generic.h"
-
void curve25519_generate_public(uint8_t pub[static CURVE25519_POINT_SIZE], const uint8_t secret[static CURVE25519_POINT_SIZE])
{
static const uint8_t basepoint[CURVE25519_POINT_SIZE] = { 9 };