summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-07-30 19:10:20 +0000
committerNick Mathewson <nickm@torproject.org>2003-07-30 19:10:20 +0000
commitf12fdd62aa9ac5561dc2133a2110c3f9dd42900c (patch)
treebf5ea7c1cea4a6a8e777418baac60915ea30fb2f /src/common/crypto.h
parentab0f263fb95d2c79fa0b245b854c507d9df81a1e (diff)
downloadtor-f12fdd62aa9ac5561dc2133a2110c3f9dd42900c.tar.gz
tor-f12fdd62aa9ac5561dc2133a2110c3f9dd42900c.zip
Be smarter about getting key matter from DH.
Formerly, once we had g^xy, we took the last N bytes from g^xy. Now, we take SHA(g^xy || [0]) || SHA1(g^xy || [1]) || ... , in order to use all bits from g^xy equally, and generate as much key material as we need. svn:r370
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 50b2c9540d..181101b592 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -81,7 +81,7 @@ int crypto_dh_get_public(crypto_dh_env_t *dh, char *pubkey_out,
int pubkey_out_len);
int crypto_dh_compute_secret(crypto_dh_env_t *dh,
char *pubkey, int pubkey_len,
- char *secret_out);
+ char *secret_out, int secret_out_len);
void crypto_dh_free(crypto_dh_env_t *dh);
/* symmetric crypto */