comparison common-kex.c @ 1607:0bdbb9ecc403

avoid leak of ecdh public key
author Matt Johnston <matt@ucc.asn.au>
date Thu, 08 Mar 2018 23:51:33 +0800
parents 2f64cb3d3007
children d32bcb5c557d
comparison
equal deleted inserted replaced
1606:98d2b125eb89 1607:0bdbb9ecc403
691 buf_put_ecc_raw_pubkey_string(ses.kexhashbuf, Q_C); 691 buf_put_ecc_raw_pubkey_string(ses.kexhashbuf, Q_C);
692 /* Q_S, server's ephemeral public key octet string */ 692 /* Q_S, server's ephemeral public key octet string */
693 buf_put_ecc_raw_pubkey_string(ses.kexhashbuf, Q_S); 693 buf_put_ecc_raw_pubkey_string(ses.kexhashbuf, Q_S);
694 /* K, the shared secret */ 694 /* K, the shared secret */
695 buf_putmpint(ses.kexhashbuf, ses.dh_K); 695 buf_putmpint(ses.kexhashbuf, ses.dh_K);
696
697 ecc_free(Q_them);
698 m_free(Q_them);
696 699
697 /* calculate the hash H to sign */ 700 /* calculate the hash H to sign */
698 finish_kexhashbuf(); 701 finish_kexhashbuf();
699 } 702 }
700 #endif /* DROPBEAR_ECDH */ 703 #endif /* DROPBEAR_ECDH */