aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto_curve25519.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-05 22:53:32 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-05 22:53:32 -0500
commit31d888c834b135d8f36ceec181f3d1ea7af62267 (patch)
treea1bbab98107d8a154875083e1b3c63be5b103e30 /src/common/crypto_curve25519.h
parentdffc8e359bcfeb00813a3afde6aa2328f6a6a476 (diff)
downloadtor-31d888c834b135d8f36ceec181f3d1ea7af62267.tar.gz
tor-31d888c834b135d8f36ceec181f3d1ea7af62267.zip
Make the = at the end of ntor-onion-key optional.
Makes bug 7869 more easily fixable if we ever choose to do so.
Diffstat (limited to 'src/common/crypto_curve25519.h')
-rw-r--r--src/common/crypto_curve25519.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h
index e768b8c427..9c732b9c46 100644
--- a/src/common/crypto_curve25519.h
+++ b/src/common/crypto_curve25519.h
@@ -51,6 +51,13 @@ int curve25519_keypair_read_from_file(curve25519_keypair_t *keypair_out,
char **tag_out,
const char *fname);
+#define CURVE25519_BASE64_PADDED_LEN 44
+
+int curve25519_public_from_base64(curve25519_public_key_t *pkey,
+ const char *input);
+int curve25519_public_to_base64(char *output,
+ const curve25519_public_key_t *pkey);
+
#ifdef CRYPTO_CURVE25519_PRIVATE
int curve25519_impl(uint8_t *output, const uint8_t *secret,
const uint8_t *basepoint);