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.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.h')
-rw-r--r-- | src/common/crypto.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h index d305bc17a0..526619766d 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -207,6 +207,11 @@ int crypto_digest256(char *digest, const char *m, size_t len, digest_algorithm_t algorithm); int crypto_digest_all(digests_t *ds_out, const char *m, size_t len); struct smartlist_t; +void crypto_digest_smartlist_prefix(char *digest_out, size_t len_out, + const char *prepend, + const struct smartlist_t *lst, + const char *append, + digest_algorithm_t alg); void crypto_digest_smartlist(char *digest_out, size_t len_out, const struct smartlist_t *lst, const char *append, digest_algorithm_t alg); @@ -270,6 +275,11 @@ void smartlist_shuffle(struct smartlist_t *sl); int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen); +int base64_encode_nopad(char *dest, size_t destlen, + const uint8_t *src, size_t srclen); +int base64_decode_nopad(uint8_t *dest, size_t destlen, + const char *src, size_t srclen); + /** Characters that can appear (case-insensitively) in a base32 encoding. */ #define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567" void base32_encode(char *dest, size_t destlen, const char *src, size_t srclen); |