aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.cpp
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2015-12-03 12:18:21 +0000
committerRichard van der Hoff <richard@matrix.org>2015-12-03 17:08:04 +0000
commit25953b350b157744dd32dd364c5eb276c3172dc6 (patch)
treee5aedb5c8d6f07206634cb0aba2afdf8742ed189 /src/crypto.cpp
parent2416658443d0a232b17ca533ad589e4a8f3065fa (diff)
Use header files where possible
This fixes an incorrect re-declaration of ed25519_sign. Implement header files for some of the other library bits so that we don't need to declare functions in crypto.cpp.
Diffstat (limited to 'src/crypto.cpp')
-rw-r--r--src/crypto.cpp41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/crypto.cpp b/src/crypto.cpp
index 8024355..8867688 100644
--- a/src/crypto.cpp
+++ b/src/crypto.cpp
@@ -19,49 +19,14 @@
extern "C" {
-int curve25519_donna(
- uint8_t * output,
- const uint8_t * secret,
- const uint8_t * basepoint
-);
-
#include "crypto-algorithms/aes.h"
#include "crypto-algorithms/sha256.h"
-int ed25519_sign(
- unsigned char *signature,
- const unsigned char *message, size_t message_len,
- const unsigned char *public_key,
- const unsigned char *private_key
-);
-
-
-int ed25519_verify(
- const unsigned char *signature,
- const unsigned char *message, size_t message_len,
- const unsigned char *public_key
-);
-
-
-void convert_curve25519_to_ed25519(
- unsigned char * public_key,
- unsigned char * signature
-);
-
-
-void convert_ed25519_to_curve25519(
- unsigned char const * public_key,
- unsigned char * signature
-);
-
-
-void ed25519_keypair(
- unsigned char * private_key,
- unsigned char * public_key
-);
-
}
+#include "ed25519/src/ed25519.h"
+#include "ed25519_additions.h"
+#include "curve25519-donna.h"
namespace {