aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops/crypto_dh.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-17 09:16:11 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-31 19:46:00 -0400
commitac9a470c641fd3ba826cdad07b1a7a495c00acba (patch)
tree64c3a32373d7dc34f9b0bbb441ef032d1e0f529c /src/lib/crypt_ops/crypto_dh.h
parent60a5b784803df5a1a9e467e0aa14c17b0991f68c (diff)
downloadtor-ac9a470c641fd3ba826cdad07b1a7a495c00acba.tar.gz
tor-ac9a470c641fd3ba826cdad07b1a7a495c00acba.zip
Extract the shared part of crypto_dh_compute_secret.
Diffstat (limited to 'src/lib/crypt_ops/crypto_dh.h')
-rw-r--r--src/lib/crypt_ops/crypto_dh.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/crypt_ops/crypto_dh.h b/src/lib/crypt_ops/crypto_dh.h
index 2d25ba8c85..f8e4e4f43e 100644
--- a/src/lib/crypt_ops/crypto_dh.h
+++ b/src/lib/crypt_ops/crypto_dh.h
@@ -40,7 +40,11 @@ ssize_t crypto_dh_compute_secret(int severity, crypto_dh_t *dh,
void crypto_dh_free_(crypto_dh_t *dh);
#define crypto_dh_free(dh) FREE_AND_NULL(crypto_dh_t, crypto_dh_free_, (dh))
-/* Crypto DH free */
+ssize_t crypto_dh_handshake(int severity, crypto_dh_t *dh,
+ const char *pubkey, size_t pubkey_len,
+ unsigned char *secret_out,
+ size_t secret_bytes_out);
+
void crypto_dh_free_all(void);
/* Prototypes for private functions only used by tortls.c, crypto.c, and the
@@ -48,4 +52,5 @@ void crypto_dh_free_all(void);
struct dh_st;
struct dh_st *crypto_dh_get_dh_(crypto_dh_t *dh);
+
#endif /* !defined(TOR_CRYPTO_DH_H) */