comparison common-kex.c @ 603:3aa74a4d83ae

Refer to RFCs rather than drafts, update some section references
author Matt Johnston <matt@ucc.asn.au>
date Sun, 27 Feb 2011 13:57:32 +0000
parents 2895626d864f
children 2b1bb792cd4d 4222a1039b06
comparison
equal deleted inserted replaced
602:2d896267f16d 603:3aa74a4d83ae
270 memcpy(&out[SHA1_HASH_SIZE], k2, outlen - SHA1_HASH_SIZE); 270 memcpy(&out[SHA1_HASH_SIZE], k2, outlen - SHA1_HASH_SIZE);
271 } 271 }
272 } 272 }
273 273
274 /* Generate the actual encryption/integrity keys, using the results of the 274 /* Generate the actual encryption/integrity keys, using the results of the
275 * key exchange, as specified in section 5.2 of the IETF secsh-transport 275 * key exchange, as specified in section 7.2 of the transport rfc 4253.
276 * draft. This occurs after the DH key-exchange. 276 * This occurs after the DH key-exchange.
277 * 277 *
278 * ses.newkeys is the new set of keys which are generated, these are only 278 * ses.newkeys is the new set of keys which are generated, these are only
279 * taken into use after both sides have sent a newkeys message */ 279 * taken into use after both sides have sent a newkeys message */
280 280
281 /* Originally from kex.c, generalized for cli/svr mode --mihnea */ 281 /* Originally from kex.c, generalized for cli/svr mode --mihnea */
530 break; 530 break;
531 } 531 }
532 } 532 }
533 533
534 /* Initialises and generate one side of the diffie-hellman key exchange values. 534 /* Initialises and generate one side of the diffie-hellman key exchange values.
535 * See the ietf-secsh-transport draft, section 6, for details */ 535 * See the transport rfc 4253 section 8 for details */
536 /* dh_pub and dh_priv MUST be already initialised */ 536 /* dh_pub and dh_priv MUST be already initialised */
537 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) { 537 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) {
538 538
539 DEF_MP_INT(dh_p); 539 DEF_MP_INT(dh_p);
540 DEF_MP_INT(dh_q); 540 DEF_MP_INT(dh_q);