From beb170e4fb4a42cf3770a731f222a63f0bdfe0f3 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 13 Mar 2018 06:51:17 -0700 Subject: Use X64 ASM ed25519 signatures on Linux/x64, which are about 10X faster. Will matter a lot for network controllers, not so much for other things. --- ext/ed25519-amd64-asm/sc25519_from64bytes.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ext/ed25519-amd64-asm/sc25519_from64bytes.c (limited to 'ext/ed25519-amd64-asm/sc25519_from64bytes.c') diff --git a/ext/ed25519-amd64-asm/sc25519_from64bytes.c b/ext/ed25519-amd64-asm/sc25519_from64bytes.c new file mode 100644 index 00000000..8e76a1b3 --- /dev/null +++ b/ext/ed25519-amd64-asm/sc25519_from64bytes.c @@ -0,0 +1,7 @@ +#include "sc25519.h" + +void sc25519_from64bytes(sc25519 *r, const unsigned char x[64]) +{ + /* assuming little-endian representation of unsigned long long */ + sc25519_barrett(r, (unsigned long long *)x); +} -- cgit v1.2.3