curve25519: replace fiat64 with faster hacl64
This reverts commit da4ff396cc5d5e0ff21f9ecbc2f951c048c63fff and adds some optimizations to hacl64. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
40ae0e0bba
commit
bee5bbb6f3
|
@ -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])
|
||||
{
|
||||
|
|
|
@ -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 };
|
||||
|
|
Reference in New Issue