diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-30 23:36:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-28 10:40:56 -0400 |
commit | fe5d2477aabbf06c940c33a266d6ebb3a7b19fe1 (patch) | |
tree | 6b1ac0df25a95b8c29b44a3ccdd9b9a32a8198d7 /src/common/crypto_ed25519.h | |
parent | 818e6f939d4bd241e762970da4c6360858993cd5 (diff) | |
download | tor-fe5d2477aabbf06c940c33a266d6ebb3a7b19fe1.tar.gz tor-fe5d2477aabbf06c940c33a266d6ebb3a7b19fe1.zip |
Implement ed25519-signed descriptors
Now that we have ed25519 keys, we can sign descriptors with them
and check those signatures as documented in proposal 220.
Diffstat (limited to 'src/common/crypto_ed25519.h')
-rw-r--r-- | src/common/crypto_ed25519.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h index 8e06191fc5..79b3db8f9a 100644 --- a/src/common/crypto_ed25519.h +++ b/src/common/crypto_ed25519.h @@ -95,6 +95,13 @@ int ed25519_public_from_base64(ed25519_public_key_t *pkey, int ed25519_public_to_base64(char *output, const ed25519_public_key_t *pkey); +#define ED25519_SIG_BASE64_LEN 86 + +int ed25519_signature_from_base64(ed25519_signature_t *sig, + const char *input); +int ed25519_signature_to_base64(char *output, + const ed25519_signature_t *sig); + /* XXXX read encrypted, write encrypted. */ int ed25519_seckey_write_to_file(const ed25519_secret_key_t *seckey, @@ -112,5 +119,8 @@ int ed25519_pubkey_read_from_file(ed25519_public_key_t *pubkey_out, void ed25519_keypair_free(ed25519_keypair_t *kp); +int ed25519_pubkey_eq(const ed25519_public_key_t *key1, + const ed25519_public_key_t *key2); + #endif |