ecc kind of works, needs fixing/testing

--HG--
branch : ecc
This commit is contained in:
Matt Johnston
2013-04-07 01:36:42 +08:00
parent a8135dec1e
commit c6bdc810ab
32 changed files with 174 additions and 120 deletions

View File

@@ -34,7 +34,7 @@
#include "bignum.h"
#include "random.h"
#include "runopts.h"
#include "ecc.h"
static void send_msg_kexdh_reply(mp_int *dh_e, buffer *ecdh_qs);
@@ -59,7 +59,7 @@ void recv_msg_kexdh_init() {
}
} else {
#ifdef DROPBEAR_ECDH
buffer *ecdh_qs = buf_getstringbuf(ses.payload);
ecdh_qs = buf_getstringbuf(ses.payload);
#endif
}
@@ -104,14 +104,14 @@ static void send_msg_kexdh_reply(mp_int *dh_e, buffer *ecdh_qs) {
struct kex_ecdh_param *ecdh_param = gen_kexecdh_param();
kexecdh_comb_key(ecdh_param, ecdh_qs, svr_opts.hostkey);
buf_put_ecc_pub(ses.writepayload, &ecdh_param->key);
buf_put_ecc_pubkey_string(ses.writepayload, &ecdh_param->key);
free_kexecdh_param(ecdh_param);
#endif
}
/* calc the signature */
buf_put_sign(ses.writepayload, svr_opts.hostkey,
ses.newkeys->algo_hostkey, ses.hash, SHA1_HASH_SIZE);
ses.newkeys->algo_hostkey, ses.hash);
/* the SSH_MSG_KEXDH_REPLY is done */
encrypt_packet();