diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-04-08 23:12:20 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-04-08 23:12:20 +0800 |
commit | 48c83aa9d0f46ec0cdc92a7a3b9cb1e39ffaf2e3 (patch) | |
tree | 8abe1bcfdd92d43d60b1b5640410755866db575f /common-kex.c | |
parent | c797c1750c46d2e111874e31adf5627b24e97462 (diff) |
ecdh works against OpenSSH
--HG--
branch : ecc
Diffstat (limited to 'common-kex.c')
-rw-r--r-- | common-kex.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/common-kex.c b/common-kex.c index 1543fb8..729b5d8 100644 --- a/common-kex.c +++ b/common-kex.c @@ -304,7 +304,7 @@ void gen_new_keys() { hash_process_mp(hashdesc, &hs, ses.dh_K); mp_clear(ses.dh_K); m_free(ses.dh_K); - sha1_process(&hs, ses.hash->data, ses.hash->len); + hashdesc->process(&hs, ses.hash->data, ses.hash->len); buf_burn(ses.hash); buf_free(ses.hash); ses.hash = NULL; @@ -659,11 +659,9 @@ void free_kexecdh_param(struct kex_ecdh_param *param) { void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them, sign_key *hostkey) { const struct dropbear_kex *algo_kex = ses.newkeys->algo_kex; - hash_state hs; // public keys from client and server ecc_key *Q_C, *Q_S, *Q_them; - // XXX load Q_them Q_them = buf_get_ecc_pubkey(pub_them, algo_kex->ecc_curve); ses.dh_K = dropbear_ecc_shared_secret(Q_them, ¶m->key); @@ -689,12 +687,6 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them, buf_putmpint(ses.kexhashbuf, ses.dh_K); /* calculate the hash H to sign */ - algo_kex->hashdesc->init(&hs); - buf_setpos(ses.kexhashbuf, 0); - algo_kex->hashdesc->process(&hs, buf_getptr(ses.kexhashbuf, ses.kexhashbuf->len), - ses.kexhashbuf->len); - - /* calculate the hash H to sign */ finish_kexhashbuf(); } #endif |