diff common-kex.c @ 410:b895f91c2ee6

merge of 'b1dd3b94e60a07a176dba2b035ac79968595990a' and 'bcb33fce2fad01a7626598209d43af3571bd86f0'
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Feb 2007 10:32:59 +0000
parents 3e098639b05f 0e69e948caba
children 7e43f5e473b9
line wrap: on
line diff
--- a/common-kex.c	Sat Feb 03 08:20:34 2007 +0000
+++ b/common-kex.c	Sun Feb 04 10:32:59 2007 +0000
@@ -217,12 +217,10 @@
  * already initialised hash_state hs, which should already have processed
  * the dh_K and hash, since these are common. X is the letter 'A', 'B' etc.
  * out must have at least min(SHA1_HASH_SIZE, outlen) bytes allocated.
- * The output will only be expanded once, since that is all that is required
- * (for 3DES and SHA, with 24 and 20 bytes respectively). 
+ * The output will only be expanded once, as we are assured that
+ * outlen <= 2*SHA1_HASH_SIZE for all known hashes.
  *
- * See Section 5.2 of the IETF secsh Transport Draft for details */
-
-/* Duplicated verbatim from kex.c --mihnea */
+ * See Section 7.2 of rfc4253 (ssh transport) for details */
 static void hashkeys(unsigned char *out, int outlen, 
 		const hash_state * hs, const unsigned char X) {