summaryrefslogtreecommitdiff
path: root/src/common/crypto_ed25519.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-26 21:35:25 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-25 15:08:31 -0400
commit006e6d3b6f52e193b14dc17db4502e14f9ffeb82 (patch)
tree0f7dc82793ca9191eb2d455f776d9957c77cb549 /src/common/crypto_ed25519.h
parent9e43ee5b4ca3650ecd9c4ee8a1b77843b273d480 (diff)
downloadtor-006e6d3b6f52e193b14dc17db4502e14f9ffeb82.tar.gz
tor-006e6d3b6f52e193b14dc17db4502e14f9ffeb82.zip
Another ed25519 tweak: store secret keys in expanded format
This will be needed/helpful for the key blinding of prop224, I believe.
Diffstat (limited to 'src/common/crypto_ed25519.h')
-rw-r--r--src/common/crypto_ed25519.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h
index 6b00c3d043..a68f2ec2b1 100644
--- a/src/common/crypto_ed25519.h
+++ b/src/common/crypto_ed25519.h
@@ -8,7 +8,8 @@
#include "torint.h"
#define ED25519_PUBKEY_LEN 32
-#define ED25519_SECKEY_LEN 32
+#define ED25519_SECKEY_LEN 64
+#define ED25519_SECKEY_SEED_LEN 32
#define ED25519_SIG_LEN 64
/** An Ed25519 signature. */
@@ -35,6 +36,9 @@ typedef struct {
#ifdef CURVE25519_ENABLED
int ed25519_secret_key_generate(ed25519_secret_key_t *seckey_out,
int extra_strong);
+int ed25519_secret_key_from_seed(ed25519_secret_key_t *seckey_out,
+ const uint8_t *seed);
+
int ed25519_public_key_generate(ed25519_public_key_t *pubkey_out,
const ed25519_secret_key_t *seckey);
int ed25519_keypair_generate(ed25519_keypair_t *keypair_out, int extra_strong);