aboutsummaryrefslogtreecommitdiff
path: root/lib/ed25519/src
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-03-03 11:18:07 +0000
committerMark Haines <mark.haines@matrix.org>2015-03-03 11:18:07 +0000
commit315caaba7e83eb6680a0407ea13e04b5f7739788 (patch)
tree23141186153b59f493e9e8e09fc1f207a6f8cee4 /lib/ed25519/src
parent3ce450fc1984ac480ae158a40d60e9d42f77f74a (diff)
Add functions for signing and verifying messages using curve25519 keys
Diffstat (limited to 'lib/ed25519/src')
-rw-r--r--lib/ed25519/src/fe.c4
-rw-r--r--lib/ed25519/src/sc.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/ed25519/src/fe.c b/lib/ed25519/src/fe.c
index 448e3e9..07f9f05 100644
--- a/lib/ed25519/src/fe.c
+++ b/lib/ed25519/src/fe.c
@@ -1,6 +1,8 @@
#include "fixedint.h"
#include "fe.h"
+#ifndef ED25519_LOAD_BYTES
+#define ED25519_LOAD_BYTES
/*
helper functions
@@ -26,7 +28,7 @@ static uint64_t load_4(const unsigned char *in) {
return result;
}
-
+#endif
/*
h = 0
diff --git a/lib/ed25519/src/sc.c b/lib/ed25519/src/sc.c
index ca5bad2..a883907 100644
--- a/lib/ed25519/src/sc.c
+++ b/lib/ed25519/src/sc.c
@@ -1,6 +1,9 @@
#include "fixedint.h"
#include "sc.h"
+#ifndef ED25519_LOAD_BYTES
+#define ED25519_LOAD_BYTES
+
static uint64_t load_3(const unsigned char *in) {
uint64_t result;
@@ -22,6 +25,8 @@ static uint64_t load_4(const unsigned char *in) {
return result;
}
+#endif
+
/*
Input:
s[0]+256*s[1]+...+256^63*s[63] = s