summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-01 11:54:07 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 10:40:57 -0400
commitefa21bb94188863e4ff5d8a288144cd93db00fe3 (patch)
tree34cc8c4bd847477e4b57773f48c0d298ef15d3ef /src/common/crypto.h
parentfe5d2477aabbf06c940c33a266d6ebb3a7b19fe1 (diff)
downloadtor-efa21bb94188863e4ff5d8a288144cd93db00fe3.tar.gz
tor-efa21bb94188863e4ff5d8a288144cd93db00fe3.zip
Implement proposal 228: cross-certification with onion keys
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 526619766d..15d1f6e3a9 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -147,9 +147,9 @@ int crypto_pk_write_private_key_to_filename(crypto_pk_t *env,
const char *fname);
int crypto_pk_check_key(crypto_pk_t *env);
-int crypto_pk_cmp_keys(crypto_pk_t *a, crypto_pk_t *b);
-int crypto_pk_eq_keys(crypto_pk_t *a, crypto_pk_t *b);
-size_t crypto_pk_keysize(crypto_pk_t *env);
+int crypto_pk_cmp_keys(const crypto_pk_t *a, const crypto_pk_t *b);
+int crypto_pk_eq_keys(const crypto_pk_t *a, const crypto_pk_t *b);
+size_t crypto_pk_keysize(const crypto_pk_t *env);
int crypto_pk_num_bits(crypto_pk_t *env);
crypto_pk_t *crypto_pk_dup_key(crypto_pk_t *orig);
crypto_pk_t *crypto_pk_copy_full(crypto_pk_t *orig);
@@ -161,11 +161,11 @@ int crypto_pk_public_encrypt(crypto_pk_t *env, char *to, size_t tolen,
int crypto_pk_private_decrypt(crypto_pk_t *env, char *to, size_t tolen,
const char *from, size_t fromlen,
int padding, int warnOnFailure);
-int crypto_pk_public_checksig(crypto_pk_t *env, char *to, size_t tolen,
+int crypto_pk_public_checksig(const crypto_pk_t *env, char *to, size_t tolen,
const char *from, size_t fromlen);
int crypto_pk_public_checksig_digest(crypto_pk_t *env, const char *data,
size_t datalen, const char *sig, size_t siglen);
-int crypto_pk_private_sign(crypto_pk_t *env, char *to, size_t tolen,
+int crypto_pk_private_sign(const crypto_pk_t *env, char *to, size_t tolen,
const char *from, size_t fromlen);
int crypto_pk_private_sign_digest(crypto_pk_t *env, char *to, size_t tolen,
const char *from, size_t fromlen);