summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-01-31 16:53:59 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-02-01 19:51:50 +0100
commit6177bdd32d921553343c24e241bb38503746ccad (patch)
treef1a9ed14e357cd54dc6c0cd00916713d5e764c0a /src/tools
parentcurve25519: verify that specialized basepoint implementations are correct (diff)
downloadwireguard-monolithic-historical-6177bdd32d921553343c24e241bb38503746ccad.tar.xz
wireguard-monolithic-historical-6177bdd32d921553343c24e241bb38503746ccad.zip
curve25519: replace hacl64 with fiat64
For now, it's faster: hacl64: 109782 cycles per call fiat64: 108984 cycles per call It's quite possible this commit will be reverted with nice changes from INRIA, though.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/curve25519.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/tools/curve25519.c b/src/tools/curve25519.c
index 0ed4977..50b95a9 100644
--- a/src/tools/curve25519.c
+++ b/src/tools/curve25519.c
@@ -1,11 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0
*
- * Copyright (C) 2016-2017 INRIA and Microsoft Corporation.
- * Copyright (C) 2015-2016 The fiat-crypto Authors.
* Copyright (C) 2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
- *
- * This is a machine-generated formally verified implementation of curve25519 DH from:
- * https://github.com/mitls/hacl-star and https://github.com/mit-plv/fiat-crypto
*/
#include "curve25519.h"
@@ -44,11 +39,11 @@ static noinline void memzero_explicit(void *s, size_t count)
}
#ifdef __SIZEOF_INT128__
-#include "../crypto/curve25519-hacl64.h"
-#else
-#include "../crypto/curve25519-fiat32.h"
+#define CONFIG_ARCH_SUPPORTS_INT128
#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 };