version 1.4, 2001/04/04 22:04:35 |
version 1.5, 2001/04/05 10:42:50 |
|
|
buffer_append(&b, skexinit, skexinitlen); |
buffer_append(&b, skexinit, skexinitlen); |
|
|
buffer_put_string(&b, serverhostkeyblob, sbloblen); |
buffer_put_string(&b, serverhostkeyblob, sbloblen); |
if (min == -1 || max == -1) |
if (min == -1 || max == -1) |
buffer_put_int(&b, wantbits); |
buffer_put_int(&b, wantbits); |
else { |
else { |
buffer_put_int(&b, min); |
buffer_put_int(&b, min); |
|
|
kbuf = xmalloc(klen); |
kbuf = xmalloc(klen); |
kout = DH_compute_key(kbuf, dh_server_pub, dh); |
kout = DH_compute_key(kbuf, dh_server_pub, dh); |
#ifdef DEBUG_KEXDH |
#ifdef DEBUG_KEXDH |
dump_digest("shared secret", kbuf, kout); |
dump_digest("shared secret", kbuf, kout); |
#endif |
#endif |
shared_secret = BN_new(); |
shared_secret = BN_new(); |
BN_bin2bn(kbuf, kout, shared_secret); |
BN_bin2bn(kbuf, kout, shared_secret); |
|
|
kbuf = xmalloc(klen); |
kbuf = xmalloc(klen); |
kout = DH_compute_key(kbuf, dh_client_pub, dh); |
kout = DH_compute_key(kbuf, dh_client_pub, dh); |
#ifdef DEBUG_KEXDH |
#ifdef DEBUG_KEXDH |
dump_digest("shared secret", kbuf, kout); |
dump_digest("shared secret", kbuf, kout); |
#endif |
#endif |
shared_secret = BN_new(); |
shared_secret = BN_new(); |
BN_bin2bn(kbuf, kout, shared_secret); |
BN_bin2bn(kbuf, kout, shared_secret); |