summaryrefslogtreecommitdiff
path: root/src/ext/ed25519/donna/ed25519.h
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2015-06-24 14:51:00 +0000
committerYawning Angel <yawning@schwanenlied.me>2015-07-06 08:00:01 +0000
commit7b10741be4280d84a7ac9f41c54380cbc1f09c1b (patch)
tree07b0a153138949654750e046dd8b3ac18698cf1b /src/ext/ed25519/donna/ed25519.h
parent19440b9e58b3d824057abd3a0faf08fd7cb891ff (diff)
downloadtor-7b10741be4280d84a7ac9f41c54380cbc1f09c1b.tar.gz
tor-7b10741be4280d84a7ac9f41c54380cbc1f09c1b.zip
Import Andrew Moon's ed25519-donna.
This is a clean copy of ed25519-donna as of commit: 8757bd4cd209cb032853ece0ce413f122eef212c https://github.com/floodyberry/ed25519-donna
Diffstat (limited to 'src/ext/ed25519/donna/ed25519.h')
-rw-r--r--src/ext/ed25519/donna/ed25519.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ext/ed25519/donna/ed25519.h b/src/ext/ed25519/donna/ed25519.h
new file mode 100644
index 0000000000..dc86675cd1
--- /dev/null
+++ b/src/ext/ed25519/donna/ed25519.h
@@ -0,0 +1,30 @@
+#ifndef ED25519_H
+#define ED25519_H
+
+#include <stdlib.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+typedef unsigned char ed25519_signature[64];
+typedef unsigned char ed25519_public_key[32];
+typedef unsigned char ed25519_secret_key[32];
+
+typedef unsigned char curved25519_key[32];
+
+void ed25519_publickey(const ed25519_secret_key sk, ed25519_public_key pk);
+int ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
+void ed25519_sign(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS);
+
+int ed25519_sign_open_batch(const unsigned char **m, size_t *mlen, const unsigned char **pk, const unsigned char **RS, size_t num, int *valid);
+
+void ed25519_randombytes_unsafe(void *out, size_t count);
+
+void curved25519_scalarmult_basepoint(curved25519_key pk, const curved25519_key e);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // ED25519_H